freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [FR-devel] Plugin dependencies proposal


From: Curt Hibbs
Subject: RE: [FR-devel] Plugin dependencies proposal
Date: Wed, 6 Nov 2002 09:37:20 -0800

Rich Kilmer wrote:
>
> Team,
>
> Our current dependency management is being revamped.  The problem that
> Laurent and I observed last weekend was caused because of the way that
> the dependencies were being managed...specifically there was a race
> condition that was intermittent...which sucks.  The other thing I
> noticed upon analysis is that we send over 2000 notifications between
> plugins when they are coming up.  This is WAY to many.  We have 29
> plugins...imagine what will happen when we have one or two hundred...
>
> So...I have been working on a redesign.  The plugins themselves will not
> change, only freebase (core, plugin, etc).  As I was implementing this I
> realized that the current dependency expressions were able to create
> really nasty situations (I think they are too flexible).
>
> The current system is (in psudocode)
>
> if PluginA's state=="UNLOADED" call "load"
>   when "PluginX" is "LOADED"
>   and
>   when "PluginY" is "LOADED"
> end
>
> This seams straightforward, but you can encode almost anything:
>
> If PluginA's state="RUNNING" call "stop"
>   when "PluginX" is "LOADING"
>   and
>   when "PluginY" is "UNLOADED"
> end
>
> which is a bit weird, but the current system allows it.
>
> What I propose is this:
> -----
> PluginA cannot load
>   until PluginX is LOADED and PluginY is LOADED
>
> Which would automatically infer:
>
> PluginA needs to be UNLOADED
>   before PluginX is UNLOADED and PluginY is UNLOADED
> -----
> And you could also would repeat for LOADED/start.

Would it make sense to simplify this even further by only dealing with
STARTED. In other words, my plugin cannot LOAD until both pluginX and
pluginY have STARTED.

Can you think of a legitimate case where this would be insufficient? If not,
then we could simply say that my plugin is dependent on a list of other
plugins.

BTW, How does Eclipse do this?

> This enables a "depends on" relationship but removes the kind of
> infinite flexibility on event-based state transitions which in the
> current system can lead to some darned weird behavior.
>
> My question is this:  Is "depends on" (from UNLOADED->LOAD and
> LOADED->START and their reverse) sufficient?

It seems sufficient to me.

Curt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]