thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjørn Borud <bbo...@gmail.com>
Subject Re: Store client data in server thread?
Date Thu, 06 May 2010 07:27:01 GMT
On Thu, May 6, 2010 at 5:33 AM, Bryan Duxbury <bryan@rapleaf.com> wrote:

> People have asked for this in the past, and unfortunately we don't
> currently
> offer it. What kind of interface do think we should support? I'd love to
> see
> a patch for this (hint hint).
>

I would like two things.  I'd like a way to associate some properties with a
client session so that these properties are sent with every request -- much
like you can in HTTP with some client libraries.   and of course, some way
of accessing these properties on the server end.

  MyService.Client client = new MyService.Client(protocol);
  client.putProperty("name", value);

Where the value can be a thrift structure.

The second thing I'd like is sort of the same as Kenny wants: a per-client
storage mechanism on the server end.

It might also be nice to have an API for hooking in code that can process a
request
before it gets sent by the client and before the request is dispatched in
the server, but if we get a mechanism for out-of-band data and per-client
(memory) storage on the server I'm a happy guy :-)

This would enable implementation of various authentication and authorization
schemes without the need for polluting APIs with this information.  It would
also make it easier to change authentication strategies and implementations
without cluttering the APIs of services unnecessarily.

-Bjørn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message