Design pattern for client/server sessions?
Posted
by
nonot1
on Programmers
See other posts from Programmers
or by nonot1
Published on 2013-04-24T23:08:29Z
Indexed on
2013/11/08
10:19 UTC
Read the original article
Hit count: 352
design-patterns
|distributed-computing
|server-client
|rpc
|asynchronous-programming
Are there any common patterns or general guidance I can learn from for how to design a client/server system where the both the client and server must maintain some kind per-client session state?
I've found any number of libraries that can help with some of the plumbing, but it's the overall design I'm wondering about.
Open issues in my mind:
- How to structure the client/server communication so that bidirectional synchronous and asynchronous requests are possible?
- The server side needs to spawn a couple of per-connected-client session-long helper process. How to manage that?
- How to manage the mapping from a given client (and any of it's requests) to server state and helper process instances in the face of multiple clients and intermittent network connectivity.
- Most communication can be simple blocking request/reply, but some will be long running processing tasks that the client will want to keep tabs on.
To the extent that it matters, the platform is Linux/C/C++. Not web based. Just an existing thick-client software app being modified to talk to backend servers for some tasks.
© Programmers or respective owner