You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Charles Mason <ch...@gmail.com> on 2009/05/05 22:54:12 UTC

Two way RPC & Encryption

Hi All,

I was wondering is it possible to have two way RPC style communication
over a single Thrift transport. What I mean is say the client connects
to the server and calls a few service functions, then later whilst the
connection is still open the server wants to call a service on the
client. I have a need to occasionally push notifications to the client
and I would rather not have the client polling from them as they may
only happen every few hours and I really need the client to respond to
the push in a few seconds.

Also is it possible to make the transport connections stateful. In a
previous generation of the my app it  would store connection sate info
such as an authenticated role. Then any future connection would check
the authentication before continuing. I realize I could pass some sort
of token back and forth with every call but thats hardly efficient if
the token is sufficiently large to be secure.

Finally has anyone produced an encrypted transport for Thrift. I
imagine it should be relatively easy once you have the securely
negotiated the session key, it should be possible just to split the
stream into blocks and run them through a block cipher like AES. The
only slight complication would be padding out the block to make sure
its alway of the correct size. Has anyone tried this already ?


Thanks

Charlie M