| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Client/server - two choices |
Hi!
I've been trying to figure out how to handle a BBS systems files as you might
have noticed. I've decided to go with a client/server thing. Now there are two
"sorts" of servers I can use, but which ever I use I've got some
questions, so:
(I like server #2 better than #1)
Server #1)
I could make a server SPECIFICLY for the BBS' different parts. Ie, a server
that takes messages like "read next message", or "scan for
new files", or
"write this message to area 123" etc... The questions I have on
creating this
server is: How should the server give the client the extracted information? If
the client send "get next message", how should the client get
it's hands on
the message? Pipe? Som sort of RAM-file? Temp file on disk?
And also: How do I handle BIG requests? I could queue'em (stuff like "scan for
new files") in one thread, and simply put away a certain amount of time for
each client until the operation is finished. Would this be the best way? Ie.
handeling a bit of the operation at a time.
Server #2)
I could also make a all-files-server, that simply acts as a middle-man
between the clients and the files. This way a SINGLE server could take care of
ANY file I/O, instead of creating one server for files, one for messages etc.
I like this one best. But the questions is:
How do I do it? I suppose there has to be some sort of combination of queues
and pipes. I could use queues to send messages to the server, like "read the
next 23 bytes", then the server would put the 23 bytes in a pipe that the
client reads. But this creates a few problems. First of all it's a CPU hog. If
I send a message to the server for every character I wanna read it'll be slow
AND CPU hogging. If I let the server read 10 kb:s at a time or more/less
depending on the situation it would be pretty fast, but CPU hogging. This
could cause the client to request 10 kb:s, read 2 and find what it's looking
for and the rest (8 kb) would have been transfered for nothing - unneccessary
data-transfers that is. I'm not sure how to solve this. ANY help would be
appreciated. I would really like to be able to go with this sort of server
since it's best due to a lot of reasons.
Thank you very much!
/ 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™.