Article View: borland.public.cppbuilder.internet.socket
Article #5279Re: TServerSocket v/s Indy
From: JD
Date: Thu, 16 Sep 2004 16:21
Date: Thu, 16 Sep 2004 16:21
77 lines
3553 bytes
3553 bytes
Hans Galema <dontusethis@dontusethis.nl> wrote:
>
>> All I want to do (at this point)
>> is prevent multiple clients from writing to the database at
>> the same time
>
>Suddenly there is a database.
I didn't consider it relevent (yet) to the basic design of the
server ... but what do I know ... (?)
> Why would you prevent access at the same timet ?
Only prevent writing at the same time. 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..
>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. The demand dictates that
the first priority is to get it working on a networked system
for multiple users the fastest way possible.
> 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
>> (which I know I don't *need* a server for)
>
>Would you really let the clients of your server also connect to
>a databaseserver ?
The server will eventually become a database server of sorts.
The database is just a collection of regular files and as
such, I need some way to regulate writing to them. I could
just use an API to lock the files but a server will have to be
used in the future no matter what and since I want (need) to
make the other clients aware that the db has changed, a server
is better than monitoring the folder because the server can
tell the client exactly what information changed. That way the
client can determine if they are using stale information and
if they need to refresh their view of the db.
For example, if one client lowers a customers credit limit and
another client is in the process of taking an order for that
same customer, that client needs to know to refresh that
customers data.
I thought that I could handle this with a basic message with
params that indicate which file (table) and record (key) were
changed.
>> There are other design considerations like distributed
>> processing
>
>Please explain.
Doing just what you have suggested: having only the server
read and write to the db.
>> and dial-up/web-based access but they're for
>> the future.
>You can have webbased acces if your cgi application
>behaves like a client.
It will - by time we get to the dial-up.
~ JD
Technical Details
Message-ID:
<4149bd96$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!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>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a7601bf51960fa65 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: TServerSocket v/s Indy Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 172.156.216.124 References: <41415d94$1@newsgroups.borland.com> <41491592$1@newsgroups.borland.com> <4149ab54$1@newsgroups.borland.com> <4149af10$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4149bd96$1@newsgroups.borland.com> Date: 16 Sep 2004 09:21:42 -0700 X-Trace: newsgroups.borland.com 1095351702 207.105.83.66 (16 Sep 2004 09:21:42 -0700) Lines: 78 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail