Presentation is loading. Please wait.

Presentation is loading. Please wait.

The SEAL Component Model Radovan Chytracek CERN IT/DB, LCG AA On behalf of LCG/SEAL team This work received support from Particle Physics and Astronomy.

Similar presentations


Presentation on theme: "The SEAL Component Model Radovan Chytracek CERN IT/DB, LCG AA On behalf of LCG/SEAL team This work received support from Particle Physics and Astronomy."— Presentation transcript:

1 The SEAL Component Model Radovan Chytracek CERN IT/DB, LCG AA On behalf of LCG/SEAL team This work received support from Particle Physics and Astronomy Research Council, Swindon, UK

2 September 27, 2004 R. Chytracek/CERN2 SEAL Overview  SEAL aims to –Provide the software infrastructure, basic frameworks, libraries and tools that are common among the LHC experiments –Select, integrate, develop and support foundation and utility class libraries –Develop a coherent set of basic framework services to facilitate the integration of LCG and non - LCG software  Scope –Foundation Class Libraries »Basic types (STL, Boost, CLHEP, …), utility libraries, system isolation libraries, domain specific foundation libraries –Math Libs –Basic Framework Services »Component model, reflection, plug-in management, incident (event) management, distributed computing, grid services, scripting

3 September 27, 2004 R. Chytracek/CERN3 Component Model Overview  A way of resolving software complexity  A generic set of software building blocks –components, services  Exposing well defined interface(s) –contract, protocol  Easily configurable –properties  Assembled via generic infrastructure –contexts, scopes  Compile-time and/or run-time –static and/or dynamic binding  Easy deployment based on plug-n-play architecture –plug-ins

4 September 27, 2004 R. Chytracek/CERN4 Component Model: Re-usability  The components should be ideally operating in various hosting environments independently of the one they were created in  Without a need to rebuild them  Re-configured for the target environment as/if needed –Customized or specialized as/if required »Components derived by target user  Software Hot-Swap –Replacement by compatible component during run-time –Compatible == Providing the same interface(s)

5 September 27, 2004 R. Chytracek/CERN5 Components à la SEAL  Set of “base classes” and interfaces needed to build more complex components  Provide standard functionality –Loading, instantiation, configuration, lifetime management,…  Two kinds provided –Component »A “simple” gadget providing well defined function (HistogramPlotter) »Usually exposes a single interface –Service »A sub-system grouping multiple sub-components or other services in its own scope (StorageService) »May expose multiple interfaces

6 September 27, 2004 R. Chytracek/CERN6 Contextual Composition  Components can’t live in a void space, they need: –Their working environment –Capabilities to locate other components –Life-time management –Run-time configuration scope  SEAL answer is the Context object –Context based approach is used by many modern component frameworks like J2EE, COM(+),.NET, CORBA CM –SEAL implementation is inspired by Iguana (CMS) and Gaudi (LHCb, ATLAS)  Context allows –Component instantiations organized in hierarchical tree-like structure –Manage instantiated components’ life-time –Searching for other components in the same or other contexts

7 September 27, 2004 R. Chytracek/CERN7 Components vs. Contexts Application AppContext 12345 Component1 Svc1 Svc1Context 1 … 1213 Svc3 Svc3Context 1 Svc2 Svc2Context 1 …… 4243 Component2 Component4 Component1 Component7 Component8

8 September 27, 2004 R. Chytracek/CERN8 Component Configuration  A Component may declare its own properties –Templated Property instances (any type with a stream operator<<) –References to data members (any type with a stream operator<<)  Possibility to associate “callback” update function –Ensures component consistent state when a property is updated  Properties have a “name” (scoped) and a “description”  The PropertyCatalogue is the repository of all properties of the application  Properties can be set or updated from outside of the component which has declared them to the system Application AppContext 12345 Component1 Svc1 Svc1Context 1 … 1213 /seal/Application.outputLevel = Verbose /seal/Application.outFile = “Com1.log” /seal/Svc1.outputLevel = Debug /seal/Svc1.outFile = “Com1_2.log”

9 September 27, 2004 R. Chytracek/CERN9 Component Look-up  Knowing a context or a component other components can be located –Search by type or key is supported  Search goes always from current to the top context –Search stops when a component is found or top-level context is reached Application AppContext 12345 Component7 Svc2 Svc2Context 1 …… 4243 Component1 “/seal/Com1_1” #include “SealKernel/ComponentLoader.h” #include “Component1.h” Handle handle = component (); handle->callComponent1(); Look-up by type Component7.cpp #include “SealKernel/ComponentLoader.h” #include “Component1.h” Handle handle = component (“/seal/Com1_2”); handle->callComponent1(); Look-up by key Component7.cpp 1 Component1 “/seal/Com1_2” 2

10 September 27, 2004 R. Chytracek/CERN10 Component Customization  User can perform full component customization via extending or specializing of an existing one by:  Inheritance –Overriding existing component’s behavior  Alternative implementation of an interface –Provide compatible new component implementation  Wrapping a non-SEAL class using SEAL ComponentWrapper template class –Injecting a foreign class into component hierarchy –E.g. a class which does not inherit from SEAL Component class

11 September 27, 2004 R. Chytracek/CERN11 SEAL Components Plug-n-play  Plug-n-play is enabled by using SEAL PluginManager –Writing component plug-in factories is simplified by providing generic seal::ComponentFactory class  SEAL components can become plug-ins very easy –Single line of code  Component plug-ins shipped as SEAL modules –Modules are dynamically loadable shared libraries –Multiple component plug-ins can exist inside a single module  SEAL provides generic component loader tool –seal::ComponentLoader class –Loads either single component or can load a whole bunch of components at once –Components can be loaded into specific context

12 September 27, 2004 R. Chytracek/CERN12 The Existing SEAL Services  Application –Defines the top level Context –Possibility to set the initial set of Components to be loaded in the application  Message Service –Message composition, filtering and reporting –Closely related to MessageStream  Configuration Service –Management of Component properties and loading configurations –Multiple backends foreseen: »Gaudi style options(current),.INI style,CMS style,XML,…  Dictionary Service –Enables automatic loading of SEAL C++ reflection dictionaries simply by specifying a C++ type name

13 September 27, 2004 R. Chytracek/CERN13 SEAL Components in POOL  Component model not (yet) used in full extent –Its use is constrained by the POOL clients »Experiments still use the component infrastructure provided by their frameworks  The new developments in POOL are exploiting the use of SEAL component model to implement true SEAL components and services together with the SEAL component loader.  POOL RelationalService is pure generic service which loads database back-end specific plug-ins to enable access to relational databases using their native APIs  POOL Relational Abstraction Layer (RAL) required more modular approach for its implementation with strong support for run-time (re-)configuration

14 September 27, 2004 R. Chytracek/CERN14 MySQL ODBC Access Domain MySQL ODBC Context 12345678 7 910 SEAL Components in POOL RelationalService & ODBC POOL Application POOLContext 12345 Relational Service RAL Context 12345 Component Loader XML Authetication Service Message Service MySQL ODBC Table Data Editor MySQL ODBC Schema Editor MySQL ODBC Driver Configurator MySQL ODBC Type Configurator ODBC Configurator ODBC Driver Selector mysql://dbserver/PoolSchema ODBC Session

15 September 27, 2004 R. Chytracek/CERN15 Conclusions  SEAL component model implementation is complete enough to be used in client frameworks  First larger adoption is happening in POOL project –POOL Relational Abstraction Layer set of components  Further integration is foreseen in LHCb and ATLAS experiments when these adopt SEAL component model in Gaudi framework  No new major developments are planned –Unless there is a demand for a new functionality from the LCG clients –Bug fixes and maintenance –Component configuration needs to be extended »More back-ends for Configuration Service options file formats

16 September 27, 2004 R. Chytracek/CERN16 Information pointers  SEAL web page: http://seal.cern.ch http://seal.cern.ch  SEAL development portal: http://savannah.cern.ch/projects/seal http://savannah.cern.ch/projects/seal  SEAL Workbook: http://seal.cern.ch/snapshot/workbook/index.html http://seal.cern.ch/snapshot/workbook/index.html


Download ppt "The SEAL Component Model Radovan Chytracek CERN IT/DB, LCG AA On behalf of LCG/SEAL team This work received support from Particle Physics and Astronomy."

Similar presentations


Ads by Google