[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FR-devel] Plugin dependencies proposal
From: |
Rich Kilmer |
Subject: |
[FR-devel] Plugin dependencies proposal |
Date: |
Wed, 6 Nov 2002 11:42:37 -0500 |
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 noticiations 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.
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?
Let me know your thoughts.
Rich
- [FR-devel] Plugin dependencies proposal,
Rich Kilmer <=