| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Multiple threads accessing the same files |
> PS> But this C/S thing. So what you mean is that I should
> PS> 'create' a file that the
> PS> client reads directly through the server via a pipe?
> PS> Let's see, pipe can be
> PS> read via DosOpen, right? I don't remember, but if so that's the
> perfect
> PS> solution! If a node wants to write data, then the
> Yup - you read it via read/write calls. (Not "DosOpen" -
DosRead/DosWrite!)
Of course :-)
I've been thinking... The best way (since I dom't wanna spend 2 years sesigned
the server :-) would maybe be too use direkt access to the files.
I could use queues to pass on file-hanldes so that the client can read the
file. This only requires the server to stop the clients from accessing the
files when thery are to be written to. The only thing then is to make a
'smart' server that protects the files from reading when it's appropriate
(spelling?). This way, threads could launch additional threads that takes care
of the writing! The trick is as I said to make the server not to deny access
when a lot of threads want it. Normally there wouldn't be any problems, but if
4 nodes are scanning for new files (BBS system, remember?), then other nodes
would have to wait for node 1-4 to finish there scanning and then for the
waiting threads to write their data. I dunno...
> PS> server could create a temp-
> PS> file, and when the client closes the file, the server
> PS> could write the data to
> PS> it. That's perfect! Only it takes up resources, but I'll have to doo.
> It
> Actually, the server would ideally copy the info into memory, and handle
> conflicts in memory. It would only touch the disk during the write.
Hmm, I don't follow you...?
> PS> think I'll go with that unless you have another opinion maybe?
> C/S design is not easy. Especially GOOD, STABLE C/S design. I believe I
> mentioned DB2 - if you can shell the cash, it's probably your best bet. It
> already _is_ C/S and has all the protection available. Mind you,
> distribution costs may be prohibitive. I also believe I saw some sort of
> multi-thread database come through FW_PROG or whatever a few days ago - as
> shareware, its redistribution cost may be much lower. As with DB2, it was
> also cross-platform although not to the same degree as DB2.
I don't wanna use any libs, I wanna do this on my own - I wanna learn.
/ Peter Schuller [TeamOS/2] petersch{at}kuai.se
--- AdeptXBBS v1.08a26 (VC) (Registered)
* Origin: Gamma Epsilon 24h/day +46-(0)18-367781 (2:206/139)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 206/100 205/625 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.