Odoo with Google App Engine NDB | Porting from postgresql to NDB -
i planning port odoo google app engine web application. came know odoo uses postgresql., possible port database connections, queries , from postgresql db ndb can run on google app engine ?
it big job ;-) think way approach such exercise see how re-implement odoo orm engine (custom odoo), , asses effort.
https://github.com/odoo/odoo/blob/9.0/openerp/models.py
it explicit homegrown orm, emboddies things relations/constraints grouping, etc... many of have no analog in datastore.
so the effort involved become quite huge.
higher level abstractions in odoo depend on model methods of orm
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=none, context=none, orderby=false, lazy=true): """ list of records in list view grouped given ``groupby`` fields :param cr: database cursor :param uid: current user id :param domain: list specifying search criteria [['field_name', 'operator', 'value'], ...] :param list fields: list of fields present in list view specified on object :param list groupby: list of groupby descriptions records grouped. groupby description either field (then grouped field) or string 'field:groupby_function'. right now, functions supported 'day', 'week', 'month', 'quarter' or 'year', , make sense date/datetime fields. .... clearly of irrelevant or not doable in datastore, directly (groupby) done in memory - hence in own orm replacement.
in orm see lot of counting going on (hmm doesn't work in datastore).
also odoo depend on locking/consistancy model of rdbms not same datastores eventual consistancy. there fundamental approach considered. if create lots of ancestors keys consistency, may find lot of contention created. may need other locking mechanisms, may cas in memcache.
so might have higher layer of abstraction in odoo port replacement orm maps datastore. guess there isn't uniform higher level, haven't looked ;-)
i haven't looked higher yet ;-)
there appear models of odoo data structures , relationships mean possibly find higher abstraction layer , auto generate set of classes representing of application data entities model/uml or existing code (reverse engineer). none of deals code may use sql, directly, reporting requirements etc... of become harder again, maybe need hybrid model of datastore , big query, , search apps.
i familiar datastore, , closely @ odoo orm , datamodel, , feasability study, , proof of concept of core areas asses if it's doable, , if work.
good luck ;-)
Comments
Post a Comment