← Back to team overview

openerp-community team mailing list archive

Re: OpenERP CMS: How is server separation implemented?

 

On Fri, Jan 17, 2014 at 3:51 PM, Houssine BAKKALI <
houssine.bakkali@xxxxxxxxx> wrote:

> I agree with Martin.
>
> And aside of that from performance point of view as far as I know(I might
> be wrong) the CMS, E-Commerce and the ERP share the same application
> server. What happen if the charge on the CMS increase at a point that it
> can slow the ERP request processing?
>


Hello folks,

this along with the in house QWeb templating language now ported to Python
is my main objection too. Though I can imagine, on a controlled environment
like SaaS (no risky module because any flaw would be dramatic as you said),
it can be secured and probably OpenERP SA makes some business with that and
it's perfect to bring a larger supporting user base to OpenERP to make it
always better.

I will demo in a few days, an alternative I've been working with: that is
integrate OpenERP with Ruby on Rails development (been a pet project since
2009). I can even take advantage of a very modular and brilliant CMS which
is LocomotiveCMS and transform it into an ecommerce
http://www.locomotivecms.com/

Of course, this is for rather for more ambitious projects and less for
shiny SaaS DIY, I think every option is going to encounter it's market.

The best of the full Rails web stack I'm building upon the Ooor connector
https://github.com/akretion/ooor
Is that I can actually REUSE the great work from OpenERP SA on v8!!
Yes, thanks to this Rack middleware
https://github.com/akretion/ooor/blob/master/lib/ooor/rack.rb (rack
middleware = Python WSGI) I can share the session with OpenERP, and I
refactored Ooor to also support several web sessions per OpenERP user (like
anonymous shopping, there is still this OpenERP v8 bug however:
https://bugs.launchpad.net/openobject-server/+bug/1265917

With an other middleware "rack proxy", I can also proxy OpenERP v8 web apps.

Like I can display OpenERP products inside LocomotiveCMS like if they were
regular LocomotiveCMS objects (all the templating works), with no data
duplication, and I can even add them to my OpenERP cart and even show the
OpenERP cart and proceed to the checkout just like if they it was OpenERP
shopping solution!

Now how is that related to the app separation ?

1) It's a different runtime. A better for the web I would argue, but it's
yet another flamewar. At least Rails is a really proven web stack withe an
extremely rich ecosystem that exists free (because it's so brilliant that
it can be a co-product) without putting you fees on migration.
2) that runtime can scale at will. Since today we are in prod with nearly 1
millions of products in catalog and using Memcache for instance.
3) I can proxy to OpenERP JUST what I need and what I want (no everything)
4) Shop users authenticate in Rails Devise
https://github.com/plataformatec/devise which do encrypt the passwords by
default and is really battle tested for security
I only remap the users as OpenERP users if and only if I need to and I can
exactly control in Rails what they will do or not in OpenERP
5) Devise can also become a well maintained free Oauth provider when
associated with the Doorkeeper gem. I even made a proto integrated with
OpenERP.
6) Pulling the catalog with JSON RPC from OpenERP is very fast. If it's not
fast enough I can take advantage of all LocomotiveCMS caching features,
standing upon the standard rack middleware caching features (ETags etc...)
7) If this still doesn't scale to your need, you can have an Apache SolR
ache proxy (and search) of the catalog thanks to solerp which does
basically the indexing part of Ruby Sunspot (targets the same schema) but
in OpenERP http://sunspot.github.io/ and I can still template my Liquid
Locomotive exactly the same (same API as Ooor or ActiveRecord) (we could
later move to ElasticSearch, no problem)
8) Aside from the possible different referential for web users (on
purpose), I have no data duplication with things with different schemas
that could lead to integrity trouble such as when you connect OpenERP to
say Magento (in my case, SolR is always a valid cache and the other data I
pull them directly from OpenERP whenever it's acceptable in term of
performance)


All right, at least, I've explained here why I'm working on that and how it
can be integrated with OpenERP v8 web features. That being said I really
whish good luck to OpenERP SA on their market and I'm sure it's a big
market. Meanwhile, I'm happy with people continuing to send me pull request
on these Rails / OpenERP technologies. So basically my message is that with
Ooor, you can reuse all the good web stull from OpenERP v8 but exactly what
you want, app by app, data by data and you have full freedom for the rest.

Hope I can demo this soon.


Cheers.


-- 
Raphaël Valyi
Founder and consultant
http://twitter.com/rvalyi <http://twitter.com/#!/rvalyi>
+55 21 2516 2954
www.akretion.com

References