Re: [tryton-dev] Re: WSGI application server for Tryton

2016-12-06 Thread Fabyc
Hi

On Tuesday, September 20, 2016 at 2:19:12 AM UTC-5, Sergi Almacellas 
Abellana wrote:
>
> El 19/09/16 a les 18:07, Ali Kefia ha escrit: 
> > => We will give werkzeug a try (if you have a document that helps on 
> > configuration, please share) 
> Using uwsgi you can run trytond with the following command: 
>
> uwsgi --http :9090 --module trytond.application:app --processes 4 


Is it right that uwsgi is slow compared to other WSGI servers like is 
explained on this article [1]? Can anyone to share experience about the 
other WSGI servers are indicated on the article?

[1]
https://blog.appdynamics.com/engineering/a-performance-analysis-of-python-wsgi-servers-part-2/
 

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/5e926f4e-92f4-416f-9492-dc8fe9309a8d%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Sergi Almacellas Abellana

El 20/09/16 a les 12:02, 'Korbinian Preisler' via tryton-dev ha escrit:

I had the problem that my config files had a custom location. So i had
to create this wsgi.py:

https://gist.github.com/timitos/f74e5c6b5c75064f9c9d2417f23e6cad


For me this can be improved by allowing setting the trytond commandline 
options via environment variables and what your script does can be 
managed directly by trytond.


I also found this interesting to set the database name via environment 
variables so the pool can be initialized before any request is served.


Anyone have missed any other extra argument?

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/561b97c0-2d84-f27d-d2d7-b78adea3c785%40koolpi.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Ali Kefia


Le mardi 20 septembre 2016 11:16:39 UTC+2, Sergi Almacellas Abellana a 
écrit :
>
> El 20/09/16 a les 10:58, Ali Kefia ha escrit: 
> > 
> > 
> > Le mardi 20 septembre 2016 09:19:12 UTC+2, Sergi Almacellas Abellana a 
> > écrit : 
> > 
> > El 19/09/16 a les 18:07, Ali Kefia ha escrit: 
> > > => We will give werkzeug a try (if you have a document that helps 
> on 
> > > configuration, please share) 
> > Using uwsgi you can run trytond with the following command: 
> > 
> > uwsgi --http :9090 --module trytond.application:app --processes 4 
> > 
> > 
> > This is working, 
> > 
> >   * I have some db errors on starting (I mean first request treatments), 
> > this could be due to massive requesting => will investigate 
> Which kind of errors? 
> >   * We will push this to our deployment processes and keep nginx for 
> > protocols (http processing), redundancy and multi-servers 
> >   * I guess we will run faster because, now: 
> >   o workers are running werkzeug server which is a test server 
> >   o HTTP protocol management is done twice (nginx and werkzeug 
> layer) 
> > 
>
> Note i'm using http for uwsgi because I'm running trytond and nginx in 
> diferent users and the tcp protocol simplified the socket permisions but 
> if you are using the same user and same machine you can use a local unix 
> socket which it should be a (a little bit) faster ;-) 
>

For me they are on different docker containers => will do it in the same 
way :)
 

>
> -- 
> Sergi Almacellas Abellana 
> www.koolpi.com 
> Twitter: @pokoli_srk 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/f8d3b558-34e7-4b55-952b-b2f8dfb75697%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Ali Kefia


Le mardi 20 septembre 2016 09:19:12 UTC+2, Sergi Almacellas Abellana a 
écrit :
>
> El 19/09/16 a les 18:07, Ali Kefia ha escrit: 
> > => We will give werkzeug a try (if you have a document that helps on 
> > configuration, please share) 
> Using uwsgi you can run trytond with the following command: 
>
> uwsgi --http :9090 --module trytond.application:app --processes 4 
>

This is working,

   - I have some db errors on starting (I mean first request treatments), 
   this could be due to massive requesting => will investigate
   - We will push this to our deployment processes and keep nginx for 
   protocols (http processing), redundancy and multi-servers
   - I guess we will run faster because, now:
  - workers are running werkzeug server which is a test server
  - HTTP protocol management is done twice (nginx and werkzeug layer)
   
Thx for help Sergi
 

>
> It's a start, for full reference see the uwsgi documentation. 
>
> Hope it helps. 
>
> -- 
> Sergi Almacellas Abellana 
> www.koolpi.com 
> Twitter: @pokoli_srk 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/2c301cfe-fff9-4b94-9c95-490026f8699e%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Sergi Almacellas Abellana

El 20/09/16 a les 09:48, 'Korbinian Preisler' via tryton-dev ha escrit:

Hi Ali,

On 20.09.2016 09:32, Ali Kefia wrote:



Le mardi 20 septembre 2016 09:19:12 UTC+2, Sergi Almacellas Abellana a
écrit :

El 19/09/16 a les 18:07, Ali Kefia ha escrit:
> => We will give werkzeug a try (if you have a document that
helps on
> configuration, please share)
Using uwsgi you can run trytond with the following command:

uwsgi --http :9090 --module trytond.application:app --processes 4


I wanna make some tests
uwsgi is making load balancing (same job as nginx)? is it made this way?


You should use uwsgi together with nginx as frontend [1]. We have made
very good experiences with this combination.

We also use nginx as frontend. Basically it is used for serving static 
files (sao) and we have it configured to pass it all the POST request to 
wsgi server (uwsgi in this case but you can use another if you want). 
Here you can find the nginx config:


http://pastebin.com/2GaCyuPZ


[1] http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html

But i must say that i only managed to get tryton 4.0 run on uwgi with
some custom code. I will test Sergis command. Maybe i missed something.


I'm using it with 4.1 version without any custom code, so I imagine it 
also works on version 4.0.



--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/94622ae9-cc35-88f5-4bcc-cd06c76f5872%40koolpi.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Ali Kefia


Le mardi 20 septembre 2016 09:49:22 UTC+2, Timitos a écrit :
>
> Hi Ali,
>
> On 20.09.2016 09:32, Ali Kefia wrote:
>
>
>
> Le mardi 20 septembre 2016 09:19:12 UTC+2, Sergi Almacellas Abellana a 
> écrit : 
>>
>> El 19/09/16 a les 18:07, Ali Kefia ha escrit: 
>> > => We will give werkzeug a try (if you have a document that helps on 
>> > configuration, please share) 
>> Using uwsgi you can run trytond with the following command: 
>>
>> uwsgi --http :9090 --module trytond.application:app --processes 4 
>>
>
> I wanna make some tests
> uwsgi is making load balancing (same job as nginx)? is it made this way?
>
>
> You should use uwsgi together with nginx as frontend [1]. We have made 
> very good experiences with this combination.
>
> [1] http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html
>

Thx Timitos, I wanna give it a try !
 

>
>
> But i must say that i only managed to get tryton 4.0 run on uwgi with some 
> custom code. I will test Sergis command. Maybe i missed something.
>
>  
>
>>
>> It's a start, for full reference see the uwsgi documentation. 
>>
>> Hope it helps. 
>>
>> -- 
>> Sergi Almacellas Abellana 
>> www.koolpi.com 
>> Twitter: @pokoli_srk 
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "tryton-dev" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tryton-dev/c1dfe583-90d8-4064-822a-e60d57c240d6%40googlegroups.com
>  
> 
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/4dd3000e-9be7-4992-b029-7dd397301149%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread 'Korbinian Preisler' via tryton-dev
Hi Ali,

On 20.09.2016 09:32, Ali Kefia wrote:
>
>
> Le mardi 20 septembre 2016 09:19:12 UTC+2, Sergi Almacellas Abellana a
> écrit :
>
> El 19/09/16 a les 18:07, Ali Kefia ha escrit:
> > => We will give werkzeug a try (if you have a document that
> helps on
> > configuration, please share)
> Using uwsgi you can run trytond with the following command:
>
> uwsgi --http :9090 --module trytond.application:app --processes 4
>
>
> I wanna make some tests
> uwsgi is making load balancing (same job as nginx)? is it made this way?

You should use uwsgi together with nginx as frontend [1]. We have made
very good experiences with this combination.

[1] http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html

But i must say that i only managed to get tryton 4.0 run on uwgi with
some custom code. I will test Sergis command. Maybe i missed something.
>  
>
>
> It's a start, for full reference see the uwsgi documentation.
>
> Hope it helps.
>
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com 
> Twitter: @pokoli_srk
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "tryton-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tryton-dev/c1dfe583-90d8-4064-822a-e60d57c240d6%40googlegroups.com
> .


-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/772e1a01-e4cc-b3f7-cd66-f8df57388e2b%40googlemail.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Ali Kefia


Le mardi 20 septembre 2016 09:19:12 UTC+2, Sergi Almacellas Abellana a 
écrit :
>
> El 19/09/16 a les 18:07, Ali Kefia ha escrit: 
> > => We will give werkzeug a try (if you have a document that helps on 
> > configuration, please share) 
> Using uwsgi you can run trytond with the following command: 
>
> uwsgi --http :9090 --module trytond.application:app --processes 4 
>

I wanna make some tests
uwsgi is making load balancing (same job as nginx)? is it made this way?
 

>
> It's a start, for full reference see the uwsgi documentation. 
>
> Hope it helps. 
>
> -- 
> Sergi Almacellas Abellana 
> www.koolpi.com 
> Twitter: @pokoli_srk 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/c1dfe583-90d8-4064-822a-e60d57c240d6%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Ali Kefia


Le lundi 19 septembre 2016 18:40:03 UTC+2, Cédric Krier a écrit :
>
> On 2016-09-19 09:07, Ali Kefia wrote: 
> > 
> > 
> > Le lundi 19 septembre 2016 17:40:03 UTC+2, Cédric Krier a écrit : 
> > > 
> > > On 2016-09-19 08:19, Ali Kefia wrote: 
> > > > the issue with cache on multi workers is that invalidation does not 
> > > > propagate. 
> > > 
> > > Could you proof your statement? 
> > > 
> > 
> > Context: multi-process. 
> > I could miss something (that is why I am asking) 
> > 
> >- cache.clear: empty cache and sets ir.cache on database 
> >- cache.get: reads from memory (does not check ir.cache) 
> > 
> > => No synchronization between workers to invalidate cache horizontally 
>
> It is done on each request when starting the transaction: 
> http://hg.tryton.org/trytond/file/tip/trytond/protocols/dispatcher.py#l167 
>

Ok got it ! So we keep the situation of transaction start
Thx for information
 

>
>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@b2ck.com  
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/17cb992a-410e-4382-a090-d30c9c64275d%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-20 Thread Sergi Almacellas Abellana

El 19/09/16 a les 18:07, Ali Kefia ha escrit:

=> We will give werkzeug a try (if you have a document that helps on
configuration, please share)

Using uwsgi you can run trytond with the following command:

uwsgi --http :9090 --module trytond.application:app --processes 4

It's a start, for full reference see the uwsgi documentation.

Hope it helps.

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/ea6eb14c-f8fe-0dba-ae0a-2d3121a74272%40koolpi.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Cédric Krier
On 2016-09-19 09:07, Ali Kefia wrote:
> 
> 
> Le lundi 19 septembre 2016 17:40:03 UTC+2, Cédric Krier a écrit :
> >
> > On 2016-09-19 08:19, Ali Kefia wrote: 
> > > the issue with cache on multi workers is that invalidation does not 
> > > propagate. 
> >
> > Could you proof your statement? 
> >
> 
> Context: multi-process.
> I could miss something (that is why I am asking)
> 
>- cache.clear: empty cache and sets ir.cache on database
>- cache.get: reads from memory (does not check ir.cache)
> 
> => No synchronization between workers to invalidate cache horizontally

It is done on each request when starting the transaction:
http://hg.tryton.org/trytond/file/tip/trytond/protocols/dispatcher.py#l167


-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160919163916.GO29096%40tetsuo.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Ali Kefia


Le lundi 19 septembre 2016 17:40:03 UTC+2, Cédric Krier a écrit :
>
> On 2016-09-19 08:19, Ali Kefia wrote: 
> > the issue with cache on multi workers is that invalidation does not 
> > propagate. 
>
> Could you proof your statement? 
>

Context: multi-process.
I could miss something (that is why I am asking)

   - cache.clear: empty cache and sets ir.cache on database
   - cache.get: reads from memory (does not check ir.cache)

=> No synchronization between workers to invalidate cache horizontally
 

>
> > And since using db is counter cache principle, we took Redis. 
>
> I do not understand the reasoning. 
>

Supposed solution:

   - every time we call cache.get, it checks db (ir.cache) for validation
   - db call for every cache.get

=> Makes no sense since we cache data to avoid db calls
 

>
> > side effect advantages were: 
> > 
> >- less locks on Python code 
>
> On single-thread it should not change anything. 


Agree that in both cases, we wait for a response (we suppose that Lock on 
Python has no cost)
I will make a test and send you the result
 

>
> >- less memory usage (shared memory) 
>
> agree even but at the cost of network communication. 
>
> >- faster worker startup (since cache is already up and loaded) 
>
> except if using threaded workers. 
>

We have chosen the multi process model (because of GIL) and to be globally 
more scalable
We made a benchmark on 3.8 and it was much more comfortable / stable with 
many workers
=> We will give werkzeug a try (if you have a document that helps on 
configuration, please share)
 

>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@b2ck.com  
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/1bd4ac34-3c0c-4ce3-958b-fc340dc0e85c%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Cédric Krier
On 2016-09-19 08:19, Ali Kefia wrote:
> the issue with cache on multi workers is that invalidation does not 
> propagate.

Could you proof your statement?

> And since using db is counter cache principle, we took Redis.

I do not understand the reasoning.

> side effect advantages were:
> 
>- less locks on Python code

On single-thread it should not change anything.

>- less memory usage (shared memory)

agree even but at the cost of network communication.

>- faster worker startup (since cache is already up and loaded)

except if using threaded workers.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160919153558.GN29096%40tetsuo.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Cédric Krier
On 2016-09-19 05:32, Ali Kefia wrote:
> May be I missed something but it is worth asking a question:
> When we have 2 workers, W1 and W2, working on an instance (call it a 
> product), how to manage this situation:
> 
>- W1 added product to cache (from database)
>- W2 modified product and cleared ITS product cache
>- W1 makes get on product cache => hit an invalid version
> 
> We can not check db on each cache.get call?

You can not add to Cache Model instance because they are linked to the
transaction.
The Cache objects only store base type and the invalidation is managed
by the developer with the call to clear. It is all the cache that is
cleared so it is quite raw but normally Cache should only be used for
data that almost never change.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160919145707.GM29096%40tetsuo.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Ali Kefia


Le lundi 19 septembre 2016 14:05:02 UTC+2, Cédric Krier a écrit :
>
> On 2016-09-19 13:34, Sergi Almacellas Abellana wrote: 
> > El 19/09/16 a les 10:26, Ali Kefia ha escrit: 
> > > We faced this problem last year and worked on scaling trytond this way 
> > > 
> > >   * Shared Cache on Redis 
> > >   * Load balance with Nginx 
> > >   * Sync mechanism via redis PUB/SUB to reload Pool 
> > > 
> > > Description of Coog (trytond spécialized ERP) 
> > > here: http://coopengo.com/coog-v1-6-nouvelle-architecture/ 
> > > Implementation on a trytond fork: https://github.com/coopengo/trytond 
> > > For more details or help using it, send me an email 
> > 
> > AFAIU you need the redis chache and the sync mechaninsm because you have 
> the 
> > wsgi servers running in different machines. Am I right? 
>
> You do not need anything for the cache even if it runs on different 
> machine. But memory for cache will be used per process. 
>

May be I missed something but it is worth asking a question:
When we have 2 workers, W1 and W2, working on an instance (call it a 
product), how to manage this situation:

   - W1 added product to cache (from database)
   - W2 modified product and cleared ITS product cache
   - W1 makes get on product cache => hit an invalid version

We can not check db on each cache.get call?
 

>
> The pool invalidation is not supported but as the module management is 
> slowly moved to trytond-admin. I think there are no needs to implement 
> it. 
>

I agree, we added it later to avoid loosing a native trytond feature 
(install module on the fly)
 

>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@b2ck.com  
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/da7b526c-2e83-4b89-a5d7-e8996ef7a053%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Cédric Krier
On 2016-09-19 04:52, Ali Kefia wrote:
> We tried to investigate ir.cache and did not succeed to ensure propagating 
> invalidation

What did you miss?

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160919123315.GL29096%40tetsuo.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Cédric Krier
On 2016-09-19 13:34, Sergi Almacellas Abellana wrote:
> El 19/09/16 a les 10:26, Ali Kefia ha escrit:
> > We faced this problem last year and worked on scaling trytond this way
> > 
> >   * Shared Cache on Redis
> >   * Load balance with Nginx
> >   * Sync mechanism via redis PUB/SUB to reload Pool
> > 
> > Description of Coog (trytond spécialized ERP)
> > here: http://coopengo.com/coog-v1-6-nouvelle-architecture/
> > Implementation on a trytond fork: https://github.com/coopengo/trytond
> > For more details or help using it, send me an email
> 
> AFAIU you need the redis chache and the sync mechaninsm because you have the
> wsgi servers running in different machines. Am I right?

You do not need anything for the cache even if it runs on different
machine. But memory for cache will be used per process.

The pool invalidation is not supported but as the module management is
slowly moved to trytond-admin. I think there are no needs to implement
it.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160919120358.GJ29096%40tetsuo.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-19 Thread Ali Kefia


Le lundi 19 septembre 2016 13:34:06 UTC+2, Sergi Almacellas Abellana a 
écrit :
>
> El 19/09/16 a les 10:26, Ali Kefia ha escrit: 
> > We faced this problem last year and worked on scaling trytond this way 
> > 
> >   * Shared Cache on Redis 
> >   * Load balance with Nginx 
> >   * Sync mechanism via redis PUB/SUB to reload Pool 
> > 
> > Description of Coog (trytond spécialized ERP) 
> > here: http://coopengo.com/coog-v1-6-nouvelle-architecture/ 
> > Implementation on a trytond fork: https://github.com/coopengo/trytond 
> > For more details or help using it, send me an email 
>
> AFAIU you need the redis chache and the sync mechaninsm because you have 
> the wsgi servers running in different machines. Am I right? 
>

Different processes: this work has been done before werkzeug
We tried to investigate ir.cache and did not succeed to ensure propagating 
invalidation
BTW, with Redis, data is not duplicated on memory (when having 10 workers, 
it makes sense). The good news is that we noticed no overhead (MSGPACK - 
REDIS)
 

> > 
> > Sorry if it is still a custom code, we plan to discuss all this stuff in 
> > TUB 2016 and hopefully get part of them in tryton out of the box. 
> Will be great if we can discuss on the ML/BT/discuss server so other 
> peopole not attending at TUB can also join the discussion ;-) 
>

Sure ! I just need to work on a presentation and a small demonstration to 
get things ready to show (I am making the effort for TUB)
Discussions will continue later with all the community
 

>
> -- 
> Sergi Almacellas Abellana 
> www.koolpi.com 
> Twitter: @pokoli_srk 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/9ceb1530-43a5-4611-b5d2-6ee243c902e3%40googlegroups.com.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-14 Thread Cédric Krier
On 2016-09-14 07:28, Sergio Morillo wrote:
> El martes, 13 de septiembre de 2016, 10:54:51 (UTC+2), Sergi Almacellas 
> Abellana escribió:
> I'm a little bit curious about how you manage the tryton cache. Are you 
> > using the standard implementation or using another backend (i.e: Redis)? 
> >
> Standard implementation. I'm still newbie in tryton and unfamiliar with 
> tryton cache management problems (if exist). So I would appreciate your 
> comments about it.

The cache is per process and there is by default an invalidation
mechanism between processes. So normally, there are no problem.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160914152942.GT87878%40tetsuo.


Re: [tryton-dev] Re: WSGI application server for Tryton

2016-09-13 Thread Sergi Almacellas Abellana

El 07/09/16 a les 19:39, Sergio Morillo ha escrit:

Finally I used uWSGI following the example of previous wsgi tryton patch
[1] but using new trytond.application.app [2].

Are you using multiple workers?
I'm a little bit curious about how you manage the tryton cache. Are you 
using the standard implementation or using another backend (i.e: Redis)?


Also: how you manage to reload the workers when a new module is 
updated/installed. Do you reload the services manually?


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/dfe35213-4ea6-5068-795f-f95dcd517995%40koolpi.com.


[tryton-dev] Re: WSGI application server for Tryton

2016-09-07 Thread Sergio Morillo
Finally I used uWSGI following the example of previous wsgi tryton patch 
[1] but using new trytond.application.app [2].

[1] http://downloads.tryton.org/TUL2014/WSGI_Deployment.pdf
[2] http://doc.tryton.org/4.0/trytond/doc/topics/start_server.html


El viernes, 26 de agosto de 2016, 18:07:17 (UTC+2), Sergio Morillo escribió:
>
> I want to deploy a balanced Tryton 4.0 server for the first time, so I 
> would like to have some feedback about which one choose.
> After googling I've noticed people use uWSGI, or Gunicorn, or Gunicorn + 
> Nginx, 
>
> I would appreciate If someone could advise me (and to the community) about 
> this topic.
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/f7692527-eebc-4d2f-b227-445b54cd2fab%40googlegroups.com.