On 12 Jan 15:15, marsupo...@gmail.com wrote:
> I've got a web application written using the bottle framework and I'd like 
> to use tryton for a crud part of the administration of the app and a bit on 
> the frontend, I should be able to use different databases according to the 
> request.
> Is it possible to embed tryton in a web application while keeping good 
> performances ?

Yes.

> How can I do this ? Shall I just import trytond and find my path around or 
> use proteus ?

Don't use proteus. It was not design for such usage.
I don't know bottle but I guess you could get some inspiration from:

    - Pyramid: https://code.google.com/p/tryton/wiki/TrytonPyramid
    - Flask: https://code.google.com/p/tryton/wiki/TrytonFlask
             https://code.google.com/p/flask-tryton/
    - Django: https://code.google.com/p/tryton/wiki/TrytonDjango
    - as module:
      https://code.google.com/p/tryton/wiki/HowToUseTrytondAsAModule

All the examples are not based on different database per request but
depending of the internal design of bottle it should be doable. But just
be carefull that if it is multi-process, you should start the Pool for
each databases you are going to use if you don't want to have big
performence issue.

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

Attachment: pgpoWEq3BoANZ.pgp
Description: PGP signature

Reply via email to