Subject | Re: [Firebird-Architect] External Engines (and Plugins) |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2008-06-25T10:52:44Z |
Vlad Khorsun escreveu:
and I said no, with a "listener" (instead of factory) example that come
to my mind. I'm not proposing it or discussing if it's better than
fb_shutdown_callback.
plugins. It's it that offer plugins to FB engine. And different kind of
plugins may use different (factory is not good for all) interfaces.
check in passed object is from correct implementation. It also introduce
need of casts in the engine.
you want.
Adriano
>> Plugin is object constructed and destructed by FB. It can't receiveIt seems we lost again. You asked if all plugins should use factories
>> notifications on destructor.
>>
>
> User library implements factory which creates some user-defined object. This
> object have constructor, destructor (or its equivalents) and able to use
> fb_shutdown_callback. Is it clean now ?
>
and I said no, with a "listener" (instead of factory) example that come
to my mind. I'm not proposing it or discussing if it's better than
fb_shutdown_callback.
>> I see no advantage. Just some class/method rename and inability to haveI disagree. The (internal) PluginManager should understand "kind" of
>> non-factories plugins.
>>
>
> It not forced us to introduce methods in PluginManager for every new plugin
> kind supported by the engine. I think its good and correct approach. Also i see
> no sence to introduce PluginFactory interface and allow to not use it. And i see
> important task to name things correctly
plugins. It's it that offer plugins to FB engine. And different kind of
plugins may use different (factory is not good for all) interfaces.
> - generic plugin API must be separateAnd it introduces enumeration and abstract factory without a way to
> from all other XXX API's.
>
check in passed object is from correct implementation. It also introduce
need of casts in the engine.
>Redesign the example to fit your needs. ;-)
>>>>> So, you offer to declare as many REPLICATE triggers as destination datasources
>>>>> and mark each of them by corresponding datasource name in <misc info> ? I don't
>>>>> think its OK. Instead i would put all destinations names into separate table and
>>>>> read this table in one REPLICATE trigger.
>>>>>
>> No. Example was with one trigger per table. It just encode info
>> necessary to the trigger work in the entrypoint.
>>
>
> Imagine i have N destinations. How must i change your trigger example, to
> replicate to the all of them ?
>
>It's optional clause not interpreted by lower layers. You could do what
>> Otherwise a new table
>> should be created mapping trigger metadata names to misc info.
>>
>
> And remove <misc info> from trigger declaration ?
you want.
Adriano