[Cubicweb] Service API implementation with ømq
pierre-yves.david at logilab.fr
Thu Mar 1 10:51:07 CET 2012
On Thu, Mar 01, 2012 at 09:25:16AM +0100, Sylvain Thénault wrote:
> On 29 février 19:35, Pierre-Yves David wrote:
> > On Wed, Feb 29, 2012 at 04:26:18PM +0100, Sylvain Thénault wrote:
> > > On 29 février 14:33, Pierre-Yves David wrote:
> > > > > > Pyro is never used repo-side so it does not cache any error here.
> > > > >
> > > > > As I said, this api is not designed to be used on the repo side.
> > > >
> > > > Then, it is a major bug. The repo side on such matter the repo side **need** to
> > > > have at least as much capability than the web side. I have multiple instance of
> > > > code used both repo and web side.
> > >
> > > You can barely call services from the repo side without having to
> > > go through this repository method (which is there to allow keeping
> > > the client/web side from the data repository side while allowing
> > > access to more exotic stuff without monkey patching or such).
> > This is a very bad design choice. Why does repo side woudl want less powerful
> > tool than the client on ?
> Are you reading me or simply complaining?
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: Digital signature
More information about the Cubicweb