Netty "cookbook"

DavidDabbs dmdabbs at gmail.com
Mon Jan 25 18:22:37 EST 2010


Hello. I'm new to netty and so am just getting my head into how the gears fit
together.
Beyond the example applications, which have been very helpful, is there a
community 'cookbook?' Please do forward link(s). 

FWIW, I'm looking into implementing my own "protocol translating" proxy.
I have ~75msec to do the following:
  1. accept http POST (protobuf entity)
  2. parse protobuf, extract string field, lookup (real) user-id
     2a. Fifty percent of the time, the lookup will be local in an "L1"
cache; other 50% I need to go over a socket to make the lookup.
  3. Assemble new protobuf consumed by our backend
  4. Grab a connection from the appropriate pool.
  5. Submit request.
  6. Wait for response.
  7. Log response.
  8. Marshal internal response protobuf to external response protobuf.
  9. Lather, rinse, repeat. (requests will be over looong-running
Keep-Alives)

I know I can construct such a pipeline. What I'm not sure of is whether it
is possible to construct one that pulls the requests off the inbound socket
and processes them in _parallel_. They would of course need to be written to
the client FIFO. Because of the various lookups, etc. it is conceivable
that, for instance, Req#2 could complete before Req#1 if Req#1 has to go
over the netwoek for the initial lookup and/or if its processing server is
overloaded (or numerous other things that can happen).

I just started digging in last night, so forgive me if there's a howto I've
missed.

Cheers,

DavidD
 
-- 
View this message in context: http://n2.nabble.com/Netty-cookbook-tp4457490p4457490.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list