Subject Re: [Firebird-Architect] Vulcan services engine info
Author Dimitry Sibiryakov
On 10 May 2006 at 12:35, Dmitry Yemanov wrote:

>should it specify a particular provider to process the call? Does the
>Y-valve support this stuff? Perhaps via some config trickery? If so,
>the Y-valve becomes not so dumb as we expect it to be.

It is already not dumb. It performs config-based routing. The same
it must do for services API. DB-based services will be handled by
remote or engine providers, some - by special provider for services
and the rest (as the last resort) by Dispatcher itself.

>The services provider may
>decode SPB and then launch utilities via threads or processes, those
>utilities will then call the Y-valve and so on.

This is job for engine providers. What version of backup you hope
to get from the service? Nevest one or corresponding for appropriate

> It can also return the
>log file contents, provide a configuration management, etc.

It may be job for dedicated services provider.

> The only feature that doesn't is the
>information requests that started this discussion. In order to process
>those requests, the services provider should poll all engine

And this is definitelly a job for service handling code built-into

>the scheme looks like:
>isc_service_start, backup (Y-valve)
> |- SPB processing code (services provider)
> |- gbak
> |- isc_attach_database (Y-valve)
> |- attachment processing code (engine provider)
> ...

Not good. gbak must not be here. Vulcan is wittingly threaded. No
non-threaded classic services should be there.

>isc_service_start, number of attachments (Y-valve)
> |- SPB processing code (services provider)
> |- fb_engine_info (Y-valve)
> |- engine info code (engine provider 1)
> |- engine info code (engine provider 2)

It must depend on "service" param. If just "srvc_mgr" is provided,
the request is handled by engine or Dispatcher. If, say,
"remote_server:srvc_mgr" is provided, the request goes into remote
provider because it (when asked) accept it. That's all.

>The above means the compatibility mode, i.e. usage of the Services
>API. Alternatively, one could use fb_engine_info() directly from the
>client side.

fb_engine_info() may be just a shorcut for calling local service

>Some information requests require a subsystem poll. Those are
>enumeration of databases/attachments/users. But there are other calls
>that require to call only one subsystem. A version information is a
>good example. Now imagine that SPB contains mixed enumeration and
>version requests, so both goes into fb_engine_info(). Should the
>Y-valve parse its input buffer and process requests differently?

Yes if "service" point to local manager. Otherwise - go to config
and (most probably) remote provider.

>IMHO, it looks pretty outside its intelligence.

It is not more complicated than TPC transaction. And they are
handled in Y-valve.

SY, Dimitry Sibiryakov.