Jean-Sebastien Delfino wrote:
Simon Laws wrote:
There are some reorganized domain/node classes under modules/distributed and modules/distributed-impl dirs. Here the SCADomain is replaced by a Node. A
node runs all or part of a domain. A Node has contributions added and
removed and has components started/stoppped etc. If available (a domain and node name are provided and the domain is running) a Node registers with a DomainManager service and a ServiceDiscovery service. Here's what's in the
new code

Node
- A node implementation (NodeImpl)
- A contributions manager for adding/removing contributions
- A component manager
- A management SCA application that provides access to these features
remotely
- a web page for looking at the node

Domain
- A ServiceDiscovery service
- A domain manager service
- A sample domain application that pulls two together and includes
- A web page for looking at the domain and provides links to each nodes web
page.


This looks pretty good to me! So far I've looked at the interfaces and the implementation, and will try the web pages next :)

I'd like to make a proposal to change ServiceDiscovery a bit, but I'll do that in a separate email.

You can try this by running the calculator distributed sample. This runs and exercises some distributed nodes as it always has but uses the new classes
now. If you run the nodes independently from the command line they stay
around long enough for you to point a browser at them. Try
htpp://localhost:8080/node/index.html (or whatever port the node has come
up on) and see the components in a node.


There is a new sample (sample-domain-webapp). The intention here is to
provide a generic domain and a node so you can start the domain and node and then add contributions. Not complete yet as the "add contribution" function
needs turning into a remote service but you can use the domain
implementation along with nodes from the distributed calculator sample which
have hard coded contributions.

Here are some todos

I've copied all of the interfaces I need to make this work into
modules/distributed so there is code/interfaces here that is also elsewhere,
for
example, the component manager classes. I would like to move the new code to
new modules

modules/host-node - for the node related code?
modules/host-domain - for the domain related code?

How about this?
modules/node
modules/domain

IMO host-* is for the integration with hosting environments like Tomcat, Jetty, an HTTP or RMI server.
And host-embedded should probably not be called host-embedded :)

I have used the interfaces Node and Domain currently should this be SCANode
and SCADomain?

I'm OK with both, not sure what others prefer.

host-embedded can stay as it provides the runtime and embedded support but
there are numerous domain implementations that we can remove assuming we
get to the stage where we are comfortable with Node. Ant has already ported
the hot update web app to use the new domain (currently working through
an issue with uris)

I'd like to start using the Node implementation in the samples. I'll have a
go at converting some and see how it goes.

Great!

I'd suggest to move the API methods (expected to be used in application business logic) like getService(), getServiceReference() and cast() to a separate interface in a separate domain-api or node-api module.

Simon


On top of what you already have, I'd like to be able to describe Nodes with something like follows:

<composite name="MyNodes">

 <component name="NodeA">
   <implementation.node composite="bb:BigbankAccount"/>
 </component>

 <component name="NodeB">
   <implementation.node composite="bb:BigbankCalculator"/>
 </component>

</composite>

allowing, as a next step, to do something like follows:

<composite name="MyNodes">

 <component name="NodeA">
   <service name="ContributionManager>
     <binding.ws/>
   </service>
   <service name="ComponentManager>
     <binding.ws/>
   </service>
   <implementation.node composite="bb:BigbankAccount"/>
 </component>

or for example

 <component name="NodeB">
   <service name="ContributionManager>
     <binding.atom/>
   </service>
   <service name="ComponentManager>
     <binding.jsonrpc/>
   </service>
   <implementation.node composite="bb:BigbankCalculator"/>
 </component>

</composite>

I'm starting on working on an implementation-node module to support that.

--
Jean-Sebastien


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

Reply via email to