[Cubicweb] Service API implementation with ømq

Pierre-Yves David pierre-yves.david at logilab.fr
Thu Mar 1 17:34:42 CET 2012


On Thu, Mar 01, 2012 at 05:28:02PM +0100, Sylvain Thénault wrote:
> On 01 mars 10:51, Pierre-Yves David wrote:
> > > On the repo side, simply type :
> > > 
> > >  vreg['services'].select(regid, session, **kwargs).call(**kwargs)
> > > 
> > > ie services may be used directly as other registry objects.
> > 
> > But this is different code than client side one. Having different API for the
> > same thing is an hassle because this prevent your to write generic code running
> > fine on both side. The API should be unified.
> 
> IMO generic code for server/web is currently badly achieved, and also need
> for redesign. We won't try to unify this api until this is fixed, this is
> to much pain for the gain. And even if I was happy with the implementation,
> I don't see cases where we would need an unified service API.

I do not see how this is painful to unify this API. And I can provide patch if
necessary.

I do have such cache in client code.

I still do not understand your "We are already doing bad thing, so we should
keep doing other bad thing)

> Remember web/repo have very different goals and have access to very different 
> ressources, so we should not try to do more unification than necessary.

There is a lot of generic shared code between repo and client. I do not see why
generic code would not need a services. I have several instance of this in
client code.

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20120301/74b175da/attachment-0271.sig>


More information about the Cubicweb mailing list