ant elder wrote:
On 7/16/07, ant elder <[EMAIL PROTECTED]> wrote:



On 7/16/07, Simon Laws <[EMAIL PROTECTED]> wrote:
>
>
>
> On 7/16/07, ant elder < [EMAIL PROTECTED]> wrote:
> >
> > Thanks, that helps a lot, couple of followup questions:
> >
> > On 7/16/07, Simon Laws < [EMAIL PROTECTED] > wrote:
> >
> > <snip>
> >
> >  At the moment the application domain has a components list that is
> > > populated when the domain is activated.
> > >
> >
> > I can't find where this is happening, thats calling the
> > setComponentNode method on DefaultComponentRegistry right? Is that being
> > called right now?
> >
>
> The part I was talking about is in the following method in
> DistributeSCADomain (and also in EmbeddedSCADomain)
>
>         public void activateDomain() throws ActivationException {
>             CompositeActivator compositeActivator =
> runtime.getCompositeActivator();
>             compositeActivator.activate(domainComposite);
> for (Component component : domainComposite.getComponents())
> {
>                 components.put(component.getName(), component);
>             }
>
> So the domain has a list of all of it's components.
>
> It would be relatively straighforward to make this list and/or the
> > > application domain itself known to the management components that require
> > > it.
> > >
> >
> > How are you thinking this would be done? If the management components > > are just regular SCA components that would need some sort of new property > > annotation wouldn't it, or are you thinking of just some sort of static
> > helper ComponentManager.getInstance() type of thing?
> >
>
> Excuse pseudo code but I was thinking something along the lines of the
> following code added to the activate processing.
>
> ComponentReguistry componentRegistry = nodeDomain.getService(
> ComponentRegistry.class, "ComponentRegistry");
>
> ...
>
> for (Component component : domainComposite.getComponents()) {
>         components.put(component.getName(), component);
>         componentRegistry.addComponentModel(component.getName(),
> component);
> }
>
> Not sure ComponentRegistry is the right management component for your
> purposes but you get the idea.
>
> I am concerned here that we rely on a component that had been declared
> in the ".node" file. Someone could come along and just delete if from that
> configuration file. What do we do then? Raise and error? Switch to non
> distributed mode?
>
> Anyhow there are a number of management components that we need to
> design, for example, these are the kinds of things we want to do;
>
> Set default URIs for Domain
> Allocate domain components to node
> Add/remove/update a contribution
> Add/remove/update a composite
> Start/Stop domain
> Start/stop component
> Query
> Events
>

Some of this is starting to sound a little bigger than what TUSCANY-1379is about,
i.e just start/stop/query running components. So i'd like to start small
with just that for now and see how it goes, and we can look at adding the
domain and node stuff as it progresses. To get things going I've just
committed a ComponentManager interface and updated EmbeddedSCADomain to use that, its just rough start, anyone feel free to chip in with any comments as
I'm completely open to changing any aspect of it. I'll now try to add
something which actually uses it to start/stop things and we can go from
there...

    ...ant


Last call for comments on this before I go clean it up and javadoc it etc...

  ...ant


It looks pretty good but, building on what you already have, I'd like to suggest the following: - separate ComponentManager (working directly off the assembly model and supporting listeners) and a simpler SOA friendly ComponentManagerService which works off names and XSD friendly types. - flow a ComponentInfo object in ComponentManagerService instead of just names and an isStarted flag (to avoid network round-trips in an SOA).

I have in mind a scenario where a remote admin console will:
- Display component info for all available components (call getComponentInfos) - You can also directly go to a specific component and display its status information (call getComponentInfo by name) - You click on start/stop buttons then refresh the component status information (calling getComponentInfo again)

To make what I'm proposing clear, I have committed in revision r558357 a proposal under a host.embedded.management.variation package to show what it would look like. The proposed ComponentManagerService interface should translate to a WSDL portType without problems.

On a related note, I'd like to propose similar improvements to the ContributionService as well. I'll do that in a separate thread.

Thoughts?

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to