11
Motivation and Random Thoughts • Need to share objects between different AIDA implementations. • Two kinds of changes to track: – “Tree change” – AIDA Objects created, deleted, copied, etc. – “Object change” – change in internal state of AIDA object. Mainly data updates.

Motivation and Random Thoughts

  • Upload
    emilie

  • View
    32

  • Download
    2

Embed Size (px)

DESCRIPTION

Motivation and Random Thoughts. Need to share objects between different AIDA implementations. Two kinds of changes to track: “Tree change” – AIDA Objects created, deleted, copied, etc. “Object change” – change in internal state of AIDA object. Mainly data updates. Main Ideas. - PowerPoint PPT Presentation

Citation preview

Page 1: Motivation and Random Thoughts

Motivation and Random Thoughts

• Need to share objects between different AIDA implementations.

• Two kinds of changes to track:– “Tree change” – AIDA Objects created,

deleted, copied, etc.– “Object change” – change in internal state of

AIDA object. Mainly data updates.

Page 2: Motivation and Random Thoughts

Main Ideas• Use CORBA for interoperability.• Remote AIDA Tree is a copy of the Server AIDA tree.• Objects in the Client tree are created as “Read-Only”. • Any updates in the Server tree are propagated to the

Client tree by means of events:– Event ID: node added, node removed, node updated, …– Node path in the tree– Node type

• Data that node contains are copied to Client tree by a separate request. Have to define IDL data structures for all types of AIDA objects, based on AIDA XLM:– IHistogram1D, IDataPointSet, etc. – ITuple and complex structures have to be treated differently.

Page 3: Motivation and Random Thoughts

JAIDA CORBA Example

• AIDA Remote Clients connect to AIDA Server tree through the main Server – one Server per tree.

• Server/Client can work in two modes:– “Pull” – Assume that Client asks for updates.

– “Push” or “Duplex” – Client is notified about updates. This is more effective, but more complex to implement and operate.

• For each AIDA Client that connects, main Server creates a separate Servant. Until Client disconnects, it handles all updates through the Servant.

Page 4: Motivation and Random Thoughts

AIDA CORBA Tree Options

• Create options:– ior=iorString or iorFileURL=URL_for_file_with_IOR_String

– ServerName=Name_of_AIDA_server_in_CORBA_Name_Service

– Server=true or Client=true (default)

• To connect to Sever Tree:

ITree clientTree = treeFactory.create(“Name", "corba", true, false, "iorFileURL=file:///C:/Temp/TreeServer.ior, duplex=false");

Page 5: Motivation and Random Thoughts

IDL: AIDA Update Event // Specify what kind of change happened in ITree enum EventID { NODE_UPDATED, NODE_ADDED, NODE_DELETED };

// Specify if IManagedObject or Directory has been changed enum EventFlags { OBJECT_MASK, FOLDER_MASK };

// EventStruct is passed to the TreeClient to notify it about changes in ITree struct EventStruct { EventID id; string path; string nodeType; EventFlags flags; }; typedef sequence<EventStruct> EventList;

Page 6: Motivation and Random Thoughts

IDL: DataPointSetData struct MeasurementData { double value; double errorPlus; double errorMinus; }; typedef sequence<MeasurementData> MeasurementDataList;

struct DataPointData { long dimension; MeasurementDataList measurements; }; typedef sequence<DataPointData> DataPointDataList;

struct DataPointSetData { string name; long dimension; Annotation annotation; DataPointDataList points; };

Page 7: Motivation and Random Thoughts

IDL: AIDA Tree Server interface TreeServer { // Return the name of the ITree it is connected to.

string treeName();

// Returns "true" if this TreeServer/TreeServant implementation // support "Duplex Mode".

boolean supportDuplexMode();

// connect/disconnect methods for TreeClient that does not support "Duplex" Mode.

TreeServant connectNonDuplex(in string clientID); boolean disconnectNonDuplex(in string clientID);

// connect/disconnect methods for TreeClient that does support "Duplex" Mode. // Here reference to instance of TreeClient serves as a unique client ID.

TreeServant connectDuplex(in TreeClient client); boolean disconnectDuplex(in TreeClient client); };

Page 8: Motivation and Random Thoughts

IDL: AIDA Tree Clientinterface TreeClient {

// This method can be called by the TreeServant to notify TreeClient about // updates in the server-side ITree. If "Duplex Mode" is not used, TreeClient // has to call updates() method of TreeServant to get a list of current updates.

void stateChanged(in EventList events); // Return true if TreeClient is already connected to the AidaTreeServer

boolean isConnected(); // Make initial connection to the TreeServer.

boolean connect(); // Disconnect from the TreeServer and free all resources associated with it.

boolean disconnect(); };

Page 9: Motivation and Random Thoughts

IDL: AIDA Tree Servant interface TreeServant {

StringList listObjectNames(in string path);StringList listObjectTypes(in string path);

// Get the IManagedObject, wrapped in "Any" CORBA object, at a given path in the // ITree.The path is an absolute path from the ITree root.

any find(in string path);

// This method can be called by TreeClient to tell TreeServant that it is ready to // receive information about changes/updates of IManagedObjects at "nodePaths".

void setValid(in StringList nodePaths);

// This method can be called by TreeClient to get list of current updates. // This method also cleans-up/invalidetes all updates included in the EventList.

EventList updates(); };

Page 10: Motivation and Random Thoughts

Conclusion

• We have working CORBA prototype in JAIDA. (So far for IHistogram1D and DataPointSet only).

• Demo

• Maybe need more in AIDA infrastructure, like notification mechanism:– IObservable, IListener, IEvent ?

Page 11: Motivation and Random Thoughts