IRC logs of #tryton for Friday, 2013-09-06

chat.freenode.net #tryton log beginning Fri Sep 6 00:00:02 CEST 2013
2013-09-06 03:49 <HeBD> where can i find the release scheduel for the next version of tryton?
2013-09-06 07:23 <Pilou> HeBD: See http://www.tryton.org/events.html
2013-09-06 07:27 <HeBD> 6 weeks to 3.0 should i learn to use 2.8 or wait for 3.0? is there a beta version of 3.0 i can try?
2013-09-06 07:27 <Pilou> and http://code.google.com/p/tryton/wiki/ReleaseGeneral (there is a major release every six months)
2013-09-06 07:28 <HeBD> the wiki links to http://www.tryton.org/community/calendar.html for release dates :(
2013-09-06 07:33 <Pilou> don't wait :) demo server (http://www.tryton.org/download.html#demo) use 2.8, but you could easily try the trunk
2013-09-06 07:38 -!- vernicho1(~Thunderbi@gex01-1-78-234-55-95.fbx.proxad.net) has left #tryton
2013-09-06 07:39 <HeBD> ok thanks
2013-09-06 07:39 -!- priyankarani(~priyanka@122.177.85.209) has left #tryton
2013-09-06 11:02 <jvblasco> morning everyone
2013-09-06 11:02 <jeancavallo> jvblasco: morning
2013-09-06 13:25 <jvblasco> how do i add methods to the RPC interface with write permissions? i always get the same error: http://pastebin.com/qCrLaE1C
2013-09-06 13:25 <jvblasco> i already tried with the admin user and with: with Transaction().set_user(0, set_context=True):
2013-09-06 13:28 <jvblasco> and this is the code i use to add the methods in the RPC interface: http://pastebin.com/9aRzLETD
2013-09-06 13:28 <jvblasco> i'm starting to run out of ideas
2013-09-06 13:29 <jeancavallo> jvblasco: the RPC class __init__ method has a readonly parameter
2013-09-06 13:30 <jeancavallo> jvblasco: http://hg.tryton.org/trytond/file/5bd1e13ab72d/trytond/rpc.py#l17
2013-09-06 13:30 <jeancavallo> jvblasco: So in your cls.__rpc__.update use RPC(readonly=False) should do the trick
2013-09-06 13:33 <jvblasco> jeancavallo: YEAH! that did the trick. Didn't know that the RPC had readonly=true by default. Thnx so much man ;)
2013-09-06 13:34 <jeancavallo> jvblasco: you're welcome :) Took some time to figure this one out the first time :)
2013-09-06 14:09 -!- priyankarani(~priyanka@122.177.85.209) has left #tryton
2013-09-06 15:35 <sharoonthomas> cedk: we once discussed about improving the current trytond.cache.Cache with a possibility to use something like memcached
2013-09-06 15:36 <sharoonthomas> cedk: is that on the roadmap ? would you be interested to have such an improvement ?
2013-09-06 15:37 <cedk> sharoonthomas: I don't know
2013-09-06 15:37 <cedk> sharoonthomas: indeed I don't see how it could work
2013-09-06 15:38 <sharoonthomas> cedk: I think we could have subclasses of trytond.cache.Cache which change the get and set methods to work with different caching backends ?
2013-09-06 15:38 <sharoonthomas> cedk: do we cache objects which cannot be serialized/pickled ?
2013-09-06 15:39 <cedk> sharoonthomas: no and indeed, we should try to never cache anything
2013-09-06 15:40 <sharoonthomas> cedk: i did not understand the last part, could you elaborate please ?
2013-09-06 15:42 <cedk> sharoonthomas: http://martinfowler.com/bliki/TwoHardThings.html
2013-09-06 15:42 <sharoonthomas> cedk: invalidation ?
2013-09-06 15:44 <cedk> sharoonthomas: better to not use it
2013-09-06 15:44 <sharoonthomas> cedk: with our kind of relational system invalidation may need to be done for a change in any model
2013-09-06 15:44 <sharoonthomas> cedk: but there are performance issues in that case ?
2013-09-06 15:45 <cedk> sharoonthomas: what do you want to cache?
2013-09-06 15:45 <cedk> sharoonthomas: that's doesn't fit in a dict
2013-09-06 15:46 <sharoonthomas> cedk: for our (nereid) own caching needs we have a generic cache backend… this is about the tryton cache which is troublesome especially when you run multiple workers/gunicorn instances
2013-09-06 15:48 <cedk> sharoonthomas: what is the problem with Tryton cache?
2013-09-06 15:49 <sharoonthomas> cedk: that is works per instance and when you write it may happen on one instance and the read from another
2013-09-06 15:49 <sharoonthomas> cedk: so the data though consistent in DB, is inconsistent in memory across the server daemons
2013-09-06 15:50 <cedk> sharoonthomas: not if you setup mutlti_server
2013-09-06 15:52 <sharoonthomas> cedk: not sure why but it still seems to have issues with the translated fields
2013-09-06 15:52 <cedk> sharoonthomas: just use something like: https://github.com/thadeusb/flask-cache to cache pages
2013-09-06 15:52 <sharoonthomas> cedk: i am trying to debug
2013-09-06 15:52 <cedk> sharoonthomas: translated fields are not cached
2013-09-06 15:53 <cedk> sharoonthomas: there are very few stuff cached in Tryton because invalidation is too complex in most case and we add it only on critical place
2013-09-06 15:58 <tarunbhardwaj> cedk: https://github.com/tryton/trytond/blob/2.6/trytond/ir/translation.py#L72
2013-09-06 16:00 <cedk> tarunbhardwaj: ha yes
2013-09-06 16:00 <cedk> but translation is quite static
2013-09-06 16:01 <tarunbhardwaj> cedk: but after translation content get cached
2013-09-06 16:01 <cedk> tarunbhardwaj: don't understand
2013-09-06 16:03 <tarunbhardwaj> cedk: after translation translated content get cached in tryton instance, refer: https://github.com/tryton/trytond/blob/develop/trytond/ir/translation.py#L216
2013-09-06 16:03 <cedk> tarunbhardwaj: and what?
2013-09-06 16:05 <sharoonthomas> cedk: looks like this works even if multi_server is True ?
2013-09-06 16:05 <tarunbhardwaj> cedk: lets consider there are multiple instances and then on update in translated content cache will only get clear for an instance only
2013-09-06 16:06 <cedk> I don't understand what you want ?
2013-09-06 16:06 <tarunbhardwaj> other instance cache will still be invalid
2013-09-06 16:06 <cedk> tarunbhardwaj: false
2013-09-06 16:07 <sharoonthomas> cedk: the way the cache works is fine, but get and set methods of cache does not respect multi_server setting on tryton config
2013-09-06 16:07 <cedk> sharoonthomas: proof ?
2013-09-06 16:08 <sharoonthomas> cedk: the check for multi_server is done on the methods in the cache class
2013-09-06 16:08 <sharoonthomas> cedk: like: https://github.com/tryton/trytond/blob/develop/trytond/cache.py#L75
2013-09-06 16:08 <sharoonthomas> cedk: https://github.com/tryton/trytond/blob/develop/trytond/cache.py#L97
2013-09-06 16:08 <sharoonthomas> cedk: https://github.com/tryton/trytond/blob/develop/trytond/cache.py#L105
2013-09-06 16:08 <sharoonthomas> cedk: but for get and set you don't look at it (see: https://github.com/tryton/trytond/blob/develop/trytond/cache.py#L44)
2013-09-06 16:08 <cedk> sharoonthomas: there is sense to look at it
2013-09-06 16:09 <sharoonthomas> cedk: so from the reference of tarunbhardwaj it can be seen that you call get which will not check if the configuration currently says multi_server
2013-09-06 16:10 <tarunbhardwaj> cedk: yes
2013-09-06 16:10 <cedk> sharoonthomas: we don't care
2013-09-06 16:10 <sharoonthomas> cedk: similarly, the set when called from translation (https://github.com/tryton/trytond/blob/develop/trytond/ir/translation.py#L434) will not respect multi_server
2013-09-06 16:10 <cedk> sharoonthomas: we don't care
2013-09-06 16:11 <cedk> cache is local !!!
2013-09-06 16:11 <sharoonthomas> cedk: why ? then the information on some servers would be wrong
2013-09-06 16:12 <cedk> sharoonthomas: no
2013-09-06 16:12 <sharoonthomas> cedk: rather "stale" would be right word as the data is outdated and only the server which made the update would have it in the cache
2013-09-06 16:12 <cedk> sharoonthomas: with cache there are always delays
2013-09-06 16:12 <cedk> sharoonthomas: no just put multi_server !!!
2013-09-06 16:13 <sharoonthomas> cedk: agree with caching and delays, but when you use multi_server the cache should not be there ?
2013-09-06 16:14 <cedk> sharoonthomas: cache should always be there
2013-09-06 16:14 <cedk> sharoonthomas: with multi_server it is just invalidated between instances
2013-09-06 16:15 <sharoonthomas> cedk: in this case when would the invalidation happen ?
2013-09-06 16:15 <sharoonthomas> cedk: i think it would only happen when the restart does
2013-09-06 16:15 <cedk> sharoonthomas: on new request
2013-09-06 16:15 <sharoonthomas> cedk: well that does not happen
2013-09-06 16:16 <cedk> sharoonthomas: it does: http://hg.tryton.org/trytond/file/5bd1e13ab72d/trytond/protocols/dispatcher.py#l133
2013-09-06 18:37 <jvblasco> have a nice weekend everyone ;)
2013-09-06 18:37 <jvblasco> see u on monday ^^
2013-09-06 18:49 -!- abhisar(~abhisar@42.110.56.172) has left #tryton
2013-09-06 19:03 -!- abhisar(~abhisar@42.110.56.172) has left #tryton
2013-09-06 19:50 -!- vcardon(~vcardon@LNeuilly-152-23-15-185.w193-252.abo.wanadoo.fr) has left #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!