Request for Code Review [Decoupling of Task Context Server and Name Service]

Bernd Langpap <[email protected]> Mon, 30 Mar 2015 17:26:33 +0200
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <[email protected]>
Dear Orocos Development Team,

Since this e-mail is my first e-mail to the orocos-dev mailing-list, I'd 
like to say "Hello" first to everyone :-)

So, now back to work: For the task of separating the implementation of 
task context server and the therewith connected name service
for transportation means and RPCs, I forked the rtt repository under my 
name in order to add an additional layer for remote communication.

This abstraction layer claims the following:

  * Decoupling of the implementation of task context server and name
    services,
    hence more flexibility in terms of using different implementations
  * General API, which is applicable to all different implementations
  * Backwards compatibility, i.e. interfaces, e.g. for old applications
    using CORBA, shall remain (for example by using an adapter)

The basis for this decoupling process s the introduction of two 
component factories, one for the task context server and one for
the different name service implementations (see the two class diagrams 
attached).
They provide the functionality of creating different task context server 
and different name service implementations
based upon the type specified (see the enumeration class diagram).

The usage will encompass the following steps and is demonstrated by the 
enclosed code snippet and sequence diagram:

 1. Create a task context
 2. Create a task context server and initialize it with the task context
    created before
    [This can be done multiple time for the different kind of task
    context servers]
 3. Store each task context server in an array/collection
 4. Create a name service and register the different task context server
    under self-defined name
    [This can be done for each name service as well]

Up to now, I've implemented the architecture in terms of types, 
interfaces and members. Before I go any further,
I'd like to ensure to be on the right track.
Could you therefore please review the code under "rtt/rtt/remote" and 
provide any feedback for the architecture
and the interfaces specified.

If you have any questions, don't hesitate to contact me via e-mail or 
phone. I appreciate your comments!

Best regards,
Bernd

-- 
  Bernd Langpap
  Robotics Innovation Center
  
  Besuchsadresse der Nebengeschäftsstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany
  
  Tel.:     +49 421 178 45-4157
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   [email protected]
  
  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------

-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
CD_NameServiceFactory.png (image/png, 9.1 KB) - not displayed
CD_TaskContextServerFactory.png (image/png, 12.6 KB) - not displayed
CD_Enumerations.png (image/png, 2.7 KB) - not displayed
CodeSnippet.cpp (text/x-c++src, 1 KB)
       TaskContextServerCollection tcsCollection;
       
       // Create a task context
       TaskContext* pTaskContext = new TaskContext("TestTaskContext");
       
       // Use the task context server factory in order to create a task context server for the given task context in the desired implementation, e.g. CORBA
       ITaskContextServer::shared_ptr CorbaTaskContextServer = TaskContextServerFactory::GetInstance()->createTaskContextServer(TCS_CORBA, pTaskContext);
       
       // Build a collection of task context server for this task context
       tcsCollection.add(CorbaTaskContextServer);
       
       // Use the name service factory in order to create a name service in the desired implementation, e.g. CORBA
       INameService::shared_ptr CorbaNameService = NameServiceFactory::GetInstance()->createNameService(NSI_CORBA);
       
       // Register the different task context server at the name service using the specified name
       CorbaNameService->RegisterTaskContextServer("NameToBeRegistered", tcsCollection);s
SD_TaskContextServer-NameServiceConnectivity.png (image/png, 17.4 KB) - not displayed