thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Imbert <matthieu.imb...@ens-lyon.fr>
Subject per-connexion state with txthrift
Date Thu, 11 Feb 2010 13:58:46 GMT
Hi,

Is there a way to maintain some per-connexion state with a python twisted thrift server?

Currently, my twisted thrift server's code is inside a handler which is instanciated only
once, when initializing the server, with this kind of code:

  factory = ThriftServerFactory(
    processor = MyService.Processor(MyHandler()),
    iprot_factory = TBinaryProtocol.TBinaryProtocolFactory())
  reactor.listenTCP(some_port, factory)
  reactor.run()

There is only one MyHandler instance, thus this instance is shared for all incoming client
connexions, i see no way to maintain per-connexion state.

regards,

-- 
Matthieu Imbert <matthieu.imbert@ens-lyon.fr>
INRIA engineer / SED / GRAAL and RESO teams
http://www.inria.fr http://www.ens-lyon.fr/LIP
+33(0)472728741 / +33(0)437287473
LIP ENS-Lyon, 46 allée d'Italie
69364 Lyon cedex 07, FRANCE

Mime
View raw message