<div dir="ltr"><div><span style="font-family:tahoma,sans-serif">Hello Atilla and thanks for your response!<br><br></span></div><div><span style="font-family:tahoma,sans-serif">Unfortunately, i dont have the option to deploy under the GAE or use any GAE-specific libraries. <br>
</span></div><div><span style="font-family:tahoma,sans-serif">There is a way to force the openid.Server instances to be thread-local but this won't be adequate<br></span></div><div><span style="font-family:tahoma,sans-serif">if the storage level is not functioning in an thread-safe manner.<br>
</span></div><div><span style="font-family:tahoma,sans-serif">Well, my question had more to do with the openid.Server being inherently safe, i.e. managing to <br></span></div><div><span style="font-family:tahoma,sans-serif">maintain all it's state in a isolated thread-safe store. <br>
</span></div><div><span style="font-family:tahoma,sans-serif"><br></span></div><span style="font-family:tahoma,sans-serif">Kind regards, Michail</span><br><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Sep 11, 2013 at 2:28 PM, Attila-Mihaly Balazs <span dir="ltr"><<a href="mailto:dify.ltd@gmail.com" target="_blank">dify.ltd@gmail.com</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">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"><div><div class="h5">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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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><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></div></div>_______________________________________________<br>
Code mailing list<br>
<a href="mailto:Code@lists.openid.net" target="_blank">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>
</blockquote></div><br></div>