thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Imbert <>
Subject sessions on top of thrift
Date Fri, 15 May 2009 08:35:48 GMT
Hi thrift users,

I want to add sessions to my thrift service. A client of the service has
to open one (or several) session(s), then all calls to the thrift
service are done in the context of the session. And sessions can be
comitted (or rollbacked) when needed, and closed when finished.

For all this, I simply declare the following functions in my service:

SessionId session_open(1: string id_client)
void session_commit(1: SessionId id_session)
void session_rollback(1: SessionId id_session)
void session_close(1: SessionId id_session)

and all other functions of my service take a SessionId as first parameter.

I would now like that sessions have a timeout. For example, a session
not used during 1 minutes would be automatically closed on the server,
in order to avoid buggy or ill-intentioned clients to consume server

My service is implemented in python, and can use one of the python
server implementations: TSimpleServer, TThreadedServer,
TThreadPoolServer, but is there a way to add this timeout limitation to
these servers?

best regards,

Matthieu Imbert

View raw message