Hi
In my Distributed Remoting Application i am using Command Pattern for Remoting.
Now i want to add session management in the application. Whenever commad executor called it should check for the session.
The design scenario is
C# - SQL Server 2000 - Windows Application.
Multiple Client.
Single Business Logic (Middle Tier).
Single DB Server.
Suggest me the best way to do session management.

Session Management for Distributed Remote Application in C#
AngelaWoman
The common way to manage the session between the client and the server is to use a session token (see http://en.wikipedia.org/wiki/Session_token)
As far as managing the session on the server side - the exact way to model it depends on several critiria for example:
Once you answer these questions (and probably a few more) you can decide whether to store the session info (state) in the DB/ in memory and how to model it further
By the way, another option is to use a reactor pattern (http://www.cs.wustl.edu/~schmidt/PDF/reactor-siemens.pdf) where you allocate a specific handler for each session request (this is usually appropriate for a low number of sessions)
Arnon
VB 2005 Technical Support
Is the identity (reference) to a UserContext or Session object, available during all the session a easier way to implement session
I think that in remoting, we should use basics available mechanisms before create a new one.
XiNO
Hi Mathieu,
You are right that when using a given technology (remoting in this case) it is (usually) best to utilize its mechanisms rather than reinvent the wheel. However this is not the case here. I was merely stating two possible architectural approaches to the solution and not the technology mapping and design.
This is based on my understanding that this is an architecture forum and not a design/remoting forum.Since this forum is new, I don't know what the general expectation from answers here - I guess time will tell if answers here are expected to be more technology oriented or architecture oriented.
Arnon
[edited]
One more thing
When I set out to design an architecture I try to first decide which architectural approach is best fitted to the problem
Then if I am free to do the technology mapping I try to choose one that fits the architectural approach.
When the technology mapping is a constraint I try to see how well the architectural approach is supported in the given technology/tooling and if there's a mis-match I evaluate the tradeoffs of going against the stream" and implemnt the architecture using the technolgoy or changing the architectural decision
What I am saying is that in my opinion it is architecture first, technology later :)
Arnon