Article View: borland.public.cppbuilder.internet.socket
Article #5282Re: TServerSocket v/s Indy
From: Hans Galema
Date: Fri, 17 Sep 2004 08:35
Date: Fri, 17 Sep 2004 08:35
66 lines
3319 bytes
3319 bytes
JD wrote: >>Why would you prevent access at the same timet ? > > > Only prevent writing at the same time. Writing to the same row of a table ok. But do not block a complete table or even worse the whole database. > It's a relational db of > my own design that's super fast and has an extreemly small > foot print and there's nothing (additional) to install or > licence ect.. Heh why do we all build our own relational db ? Welcome. Dit you implement some SQL-like features ? >>I do not grab this. Clients would not read/write from/to a database >>I would think, only your server. > > That's how it *will* work in the future. The application was > developed as a stand alone and as such, all of the code > resides in what will be the client. Well I can only advise you to make that your server. Then make clients that can request tables or rows or communicate by sql. > The demand dictates that > the first priority is to get it working on a networked system > for multiple users the fastest way possible. If your original app has GUI and database well separated then you can use the GUI for the clients. >>How do you want to set up all this ? > > Ask server for permission to write > Wait for permission > Tell the server it's finished writing > Server tells other clients the data has changed So the clients do all. The server does not know the database. This is a possible solution indeed. Where clients should have network permissions on a shared directory. This solution is not suitable for clients in internet as there the directory is unknown. So thats why I think you should do all contact with the database by one databaseserver only. If a client askes the server for permission you better make a blocking client. Once you have the blocking client receive/send routines then the rest of the code will be easier then when using a non- blocking client as then the client goes to rest after sending a request and then has to wait for an event which brings the answer. > I thought that I could handle this with a basic message with > params that indicate which file (table) and record (key) were > changed. Indeed. Hans.
Technical Details
Message-ID:
<414aa102$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41415d94$1@newsgroups.borland.com> <41491592$1@newsgroups.borland.com> <4149ab54$1@newsgroups.borland.com> <4149af10$1@newsgroups.borland.com> <4149bd96$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a7601bf51960fa65 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 17 Sep 2004 10:35:05 +0200 From: Hans Galema <dontusethis@dontusethis.nl> User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: TServerSocket v/s Indy References: <41415d94$1@newsgroups.borland.com> <41491592$1@newsgroups.borland.com> <4149ab54$1@newsgroups.borland.com> <4149af10$1@newsgroups.borland.com> <4149bd96$1@newsgroups.borland.com> In-Reply-To: <4149bd96$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <414aa102$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1095409922 129.125.201.248 (17 Sep 2004 01:32:02 -0700) Lines: 66 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail