[Cubicweb] Service API implementation with ømq

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Mar 1 09:25:16 CET 2012


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.

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (09.54.03.55.76)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the Cubicweb mailing list