Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[hyades-dev] Execution team ISession impl's

OK.  I have spent a few hours plugging at what Antony had initially wrote
up.  I will try and be brief and explain what I did and describe what I
feel needs to be changed in the interfaces we have.  There is an overview
as well as a class by class discussion of the impl.  I have included the
entire project files for the three plugins as I have them right now.
There were a couple of issues with the internal classes that arose as this
was written.  Also, there were neccessary changes to the plugin
definitions.  You would be better off working from these projects.

BTW, I'm a bit bagged right now and I hope this is entirely readable ....

Overview
I have written a simple test case
org.eclipse.hyades.test.execution.local.InitializeSessionDemo.  This
illustrates how a session is created above the execution interfaces we have
created.   It looks like the following:

public static void main(String[] args) {
      try {
            /* Specify our node we want to run on */
            INode node=new LocalNode(args[0]);

            /* Create a session */
            ISession session=node.connect(null, null);

      } catch (Throwable e) {
            e.printStackTrace();
      }
}

This is simple as it is intended to be.  The code opens a session on the
machine designated by args[0].   The only major change from a programmers
standpoint would have to be the addition of the factories to create the
specific types that are desired.


org.eclipse.hyades.execution.core.IExecutionComponentStateChangeListener
I have mentioned the need for a interface such as this is previous notes.
I added this to the code so that i could decouple the implementation
classes in a better manner then I would end up without this type of
behaviour.  This became very appenent when tring to implement synchronous
invocations across multiple threads such as the INode.connect( ) call that
returns a fully geared up ISession.

org.eclipse.hyades.execution.core.IExecutionComponent
I added two things.  First, an API to add the previously stated state
change listeners.  Second, I added some publis state fields so state
checking can be decoupled from the implementation classes.  i think we need
to revisit the state change stuff a bit as there is a couple of approaches
to doing this.; each with its strengths/weeknesses.   In addition to these
changes I think we need two more methods added to the interface.  We need a
getNode() API to navigate back to the INode container.  We also need a
fireStateChangeEvent( ) method to correspond with the state change listener
stuff.  This is because the implementation of the statechange notifiers is
dependant upon the data structure used to store the listeners.   Without
this you cannot get proper implementation replacement.

org.eclipse.hyades.execution.local.LocalExecutionComponent
This is essentially the same class that Antony provided in his code mailed
earlier today.     There were a couple of changes to accomadate the state
change stuff I have already beaten to death. We should take a look at this
as well as the one the data collection team previously dropped in the
org.eclipse.hyades.execution.framework plugin.  This could be made slighly
more generic and mazimize code reuse.

org.eclipse.hyades.execution.local.LocalNode
This is the class that provides most of the delegation down to the internal
existing RAC API's.  The connect method is quite lengthy as it provides a
sesies of anonymous listeners to deal with RAC events from a connection and
process management perspective.    Alot of the code to make this error
resistant and fully functional needs to be plugged into the annymous
listeners.

org.eclipse.hyades.execution.local.LocalSession
This was built of the base taht was initially provided by Antony as well.
It is entirely differnt and provides all the behaviour required for the
local session object.  It also has a listener to deal with the events
comming back from the remote objects.  THIS IS WHERE THE STUBS NEED TO PLUG
IN.

org.eclipse.hyades.execution.remote.RemoteSession
This is the class launched by the local session object.  It then blocks
until it is told to exit by the local session.  This does not implement
ISession yet but this should not be a far stretch once we create a more
generic realization of IExecutionComponent.  THIS IS WHERE THE SKELETONS
NEED TO PLUG IN.


(See attached file: org.eclipse.hyades.execution.core.zip)(See attached
file: org.eclipse.hyades.execution.local.zip)(See attached file:
org.eclipse.hyades.execution.remote.zip)


Thanks,


Richard K. Duggan
Problem Determination Enablement
IBM Toronto Laboratory
External: 905-413-2396
Internal: 969-2396

Attachment: org.eclipse.hyades.execution.core.zip
Description: Zip archive

Attachment: org.eclipse.hyades.execution.local.zip
Description: Zip archive

Attachment: org.eclipse.hyades.execution.remote.zip
Description: Zip archive


Back to the top