Http server Session/Context management when server has Netty NIO backend
rajks
rajks at hotmail.com
Thu Nov 5 17:08:53 EST 2009
Hi,
Appreciate if anybody can guide me in what I what to achieve with Netty Http
server.
The http server is more like a proxy but not a real proxy. When a request
comes in I need to talk to at least two backend servers and I was planning
to use Netty NIO client.
1. My question is how do I maintain session/context management in such a
scenario and handle events correctly. The stack with the server pipeline
and 2 backend client pipelines end handlers
NIO Server
Server-RequstHandler
(context object)
NIO client NIO Client
Backend1-Handler Backend2-handler
As I need to maintain states/context when doing the backend I was thinking
of a single context object per request with various methods like
onServerMessage recd, onBackend1MessageRecd and more like this to keep
states/contexts to handle. I am also planning to use OMAthreads also in all
3 pipelines.
2. I would need to send response back to client in a async way by using the
writeComplete event in the Server-RequestHandler.
How can I achieve this using the various handler models. I saw the proxy
example but could not find a session/context management example.
Any help appreciated.
Thanks
Raj
--
View this message in context: http://n2.nabble.com/Http-server-Session-Context-management-when-server-has-Netty-NIO-backend-tp3955402p3955402.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list