<div dir="ltr">Hi,<div><br></div><div>We are using the python openid on GAE with the threaded python27 runtime and we didn't see any problems with it. We use the gaecache.MemcacheStore as store and a separate instance of openid.Server per thread (using threadlocal).</div>
<div><br></div><div>Regards,</div><div>Attila</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 11, 2013 at 10:15 AM, michail alexakis <span dir="ltr"><<a href="mailto:alexakis@imis.athena-innovation.gr" target="_blank">alexakis@imis.athena-innovation.gr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello to all<div><div class="gmail_quote"><div dir="ltr"><font face="tahoma, sans-serif"></font><div><font face="tahoma, sans-serif"><br>
</font></div><div><font face="tahoma, sans-serif">I have posted the same question yesterday, but since i was a non-subscribed user, it probably<br>
</font></div><div><font face="tahoma, sans-serif">got automatically rejected. So, i re-send my question verbatim, and i apologize for the duplicate:<br></font></div><div><font face="tahoma, sans-serif"><br></font></div><div>
<font face="tahoma, sans-serif">I am using the server component (OP provider) from the python-openid library (class openid.server.server:Server)</font></div>
<div><font face="tahoma, sans-serif">inside a (Pylons-based) web application that spawns about 5-10 threads for serving requests.</font></div><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">To be precise, the following methods are invoked in several places:</font></div>
<div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Server.decodeRequest</font></div><div><font face="tahoma, sans-serif">Server.handleRequest</font></div><div><font face="tahoma, sans-serif">Server.encodeResponse</font></div>
<div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Can i assume that these calls are thread-safe?</font></div><div><font face="tahoma, sans-serif">I suppose that if these methods alter the inner state of the Server's instance, then it's a matter of time (and traffic) </font></div>
<div><font face="tahoma, sans-serif">to see unpredictable behavior. </font></div><div><font face="tahoma, sans-serif">Shall i wrap all these methods (maybe a proxy object) and implement my own locking?</font></div><div><font face="tahoma, sans-serif"><br>
</font></div><div><font face="tahoma, sans-serif">Another similar question is how safe is the store mechanism? The docs state that the FileStore class is reasonably safe. </font></div><div><font face="tahoma, sans-serif"><br>
</font></div><div><font face="tahoma, sans-serif">Τhanks for your time!</font></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Michail Alexakis, </font></div>
<div><font face="tahoma, sans-serif">Software engineer, Athens, Greece</font></div>
</font></span></font></span></div>
</div><br></div></div>
<br>_______________________________________________<br>
Code mailing list<br>
<a href="mailto:Code@lists.openid.net">Code@lists.openid.net</a><br>
<a href="http://lists.openid.net/mailman/listinfo/openid-code" target="_blank">http://lists.openid.net/mailman/listinfo/openid-code</a><br>
<br></blockquote></div><br></div>