CERN Meeting 23/09/03 L.A.P.P OPERA T. Le Flour 1 B M M B M M B B rick rick M M anipulation anipulation M M anager anager Functionalities Functionalities And And Architecture Architecture D. Duchesneau D. Duchesneau T. Le Flour T. Le Flour S. Lieunard S. Lieunard
B M M B rick M anipulation M anager. Functionalities And Architecture D. Duchesneau T. Le Flour S. Lieunard. Main functionalities. Super Module initial filling Detector filling status Managing the filling process Brick and CS position , … During OPERA data acquisition - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
11
B M MB M MBBrick rick MManipulation anipulation MManageranager
B M MB M MBBrick rick MManipulation anipulation MManageranager
• Only the BMM component has an access Only the BMM component has an access to its own databaseto its own database
No direct access to the DB from the client side
• The other sub-systems(BMM Clients) will The other sub-systems(BMM Clients) will invoke only BMM servicesinvoke only BMM services
• Based on Based on CORBA CORBA standardstandard
• 3 tiers decomposition3 tiers decompositionSoftware and Hardware decomposition
• Only the BMM component has an access Only the BMM component has an access to its own databaseto its own database
No direct access to the DB from the client side
• The other sub-systems(BMM Clients) will The other sub-systems(BMM Clients) will invoke only BMM servicesinvoke only BMM services
• Based on Based on CORBA CORBA standardstandard
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
1414
CommunicationCommunication
• Why CORBA ?Why CORBA ?Definition of the services
• Description (IDL) of the interfaceDescription (IDL) of the interface
Automatic code generation for the client and server side
Avoid to concentrate effort on the low level of the communication
Inter-operable• System independentSystem independent• Language independentLanguage independent
• Why CORBA ?Why CORBA ?Definition of the services
• Description (IDL) of the interfaceDescription (IDL) of the interface
Automatic code generation for the client and server side
Avoid to concentrate effort on the low level of the communication
Inter-operable• System independentSystem independent• Language independentLanguage independent
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
1515
Example of CORBA usageExample of CORBA usage• IDL Description : IDL Description : OPERA_PROTOTYPEOPERA_PROTOTYPE.idl.idlstruct BrickPosition struct BrickPosition {{ long long brickId;brickId; long long wallNumber;wallNumber; long long xpos;xpos; long long ypos;ypos;};};typedef sequence<BrickPosition> Positions;typedef sequence<BrickPosition> Positions;interface OPERA_PROTOTYPEinterface OPERA_PROTOTYPE{{
voidvoid loadBricks();loadBricks();longlong basketLevelValue();basketLevelValue();voidvoid brickAndCSId(brickAndCSId( outout long brickId,long brickId,
outout long csId);long csId);voidvoid insertBricks(insertBricks( in in long superModuleNumber,long superModuleNumber,
in in long wallNumber,long wallNumber,in in long row);long row);
• IDL Description : IDL Description : OPERA_PROTOTYPEOPERA_PROTOTYPE.idl.idlstruct BrickPosition struct BrickPosition {{ long long brickId;brickId; long long wallNumber;wallNumber; long long xpos;xpos; long long ypos;ypos;};};typedef sequence<BrickPosition> Positions;typedef sequence<BrickPosition> Positions;interface OPERA_PROTOTYPEinterface OPERA_PROTOTYPE{{
voidvoid loadBricks();loadBricks();longlong basketLevelValue();basketLevelValue();voidvoid brickAndCSId(brickAndCSId( outout long brickId,long brickId,
outout long csId);long csId);voidvoid insertBricks(insertBricks( in in long superModuleNumber,long superModuleNumber,
in in long wallNumber,long wallNumber,in in long row);long row);
• Code GenerationCode GenerationServer SideServer Side : :
• OPERA_PROTOTYPEOPERA_PROTOTYPE_I.cpp : Skeleton of the described services :_I.cpp : Skeleton of the described services :void OPERA_PROTOTYPE_i::loadBricks()void OPERA_PROTOTYPE_i::loadBricks(){{
Code has to be inserted to realize the service;Code has to be inserted to realize the service;}}
Client Side :Client Side :• 1. Getting the IOR(Stringified CORBA Server 1. Getting the IOR(Stringified CORBA Server
Reference)Reference)• 2. Server Connection:2. Server Connection:
• 3. Service call : (Synchronized)3. Service call : (Synchronized)– BMS_Ref-> BMS_Ref-> loadBricks();loadBricks();
• Code GenerationCode GenerationServer SideServer Side : :
• OPERA_PROTOTYPEOPERA_PROTOTYPE_I.cpp : Skeleton of the described services :_I.cpp : Skeleton of the described services :void OPERA_PROTOTYPE_i::loadBricks()void OPERA_PROTOTYPE_i::loadBricks(){{
Code has to be inserted to realize the service;Code has to be inserted to realize the service;}}
Client Side :Client Side :• 1. Getting the IOR(Stringified CORBA Server 1. Getting the IOR(Stringified CORBA Server
Reference)Reference)• 2. Server Connection:2. Server Connection:
• 3. Service call : (Synchronized)3. Service call : (Synchronized)– BMS_Ref-> BMS_Ref-> loadBricks();loadBricks();
Example of CORBA usageExample of CORBA usage
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
1717
CommunicationCommunication• ProvProvideide for the other sub-systems for the other sub-systems
an an API/Libraries API/Libraries dedicated to the dedicated to the BMMBMM connection connection
Hide the CORBACORBA usage
Make the server connection completely transparent.
• ProvProvideide for the other sub-systems for the other sub-systems an an API/Libraries API/Libraries dedicated to the dedicated to the BMMBMM connection connection
Hide the CORBACORBA usage
Make the server connection completely transparent.
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
1818
CommunicationCommunication• From the BMM to an other sub-systemFrom the BMM to an other sub-system
Based on a CORBA implementation
Based on a basic Client/Server implementation
• An An API & LibraryAPI & Library should be provided should be provided by developers of sub-systems to by developers of sub-systems to facilitate communicationsfacilitate communications
• From the BMM to an other sub-systemFrom the BMM to an other sub-system
Based on a CORBA implementation
Based on a basic Client/Server implementation
• An An API & LibraryAPI & Library should be provided should be provided by developers of sub-systems to by developers of sub-systems to facilitate communicationsfacilitate communications
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
1919
The BMM The BMM Services & ActionsServices & Actions
• Load on carousel 26 bricks on the left side of the SM1Load on carousel 26 bricks on the left side of the SM1
Basket_LBasket_Levelevel_value_value (1 value) (1 value)• BMS returns the rows used in the filling basketBMS returns the rows used in the filling basket
Brick_IdBrick_Id and and CS_Id CS_Id (2 values)(2 values)• Each time(26) the Each time(26) the BMS BMS loads a brick and CS on carousel , it sends loads a brick and CS on carousel , it sends
the two ids to BMM.the two ids to BMM.
Insert_Insert_Bricks(SM1, Wall, Row)Bricks(SM1, Wall, Row)• InsertInsert the the 26 bri26 brickcks s in the free rowin the free row ‘‘RowRow’’ of wallof wall ‘‘WallWall’’ ofof SM1 SM1
Insert_Result( Brick Id, position)Insert_Result( Brick Id, position) (26 x 3 values) (26 x 3 values)• Bricks positions to be saved in the DBBricks positions to be saved in the DB..
• Load on carousel 26 bricks on the left side of the SM1Load on carousel 26 bricks on the left side of the SM1
Basket_LBasket_Levelevel_value_value (1 value) (1 value)• BMS returns the rows used in the filling basketBMS returns the rows used in the filling basket
Brick_IdBrick_Id and and CS_Id CS_Id (2 values)(2 values)• Each time(26) the Each time(26) the BMS BMS loads a brick and CS on carousel , it sends loads a brick and CS on carousel , it sends
the two ids to BMM.the two ids to BMM.
Insert_Insert_Bricks(SM1, Wall, Row)Bricks(SM1, Wall, Row)• InsertInsert the the 26 bri26 brickcks s in the free rowin the free row ‘‘RowRow’’ of wallof wall ‘‘WallWall’’ ofof SM1 SM1
Insert_Result( Brick Id, position)Insert_Result( Brick Id, position) (26 x 3 values) (26 x 3 values)• Bricks positions to be saved in the DBBricks positions to be saved in the DB..
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
2020
Data savingData saving• The BMM saves and provides the The BMM saves and provides the
data through service call.data through service call.
• If BMM is not available :If BMM is not available : crashes, network problems, computer problems , …
• Data has to be directly saved into Data has to be directly saved into ORACLE ORACLE
– Encapsulate the BMM service calls in a Encapsulate the BMM service calls in a dedicated library to detect this kind of dedicated library to detect this kind of problemsproblems
• The BMM saves and provides the The BMM saves and provides the data through service call.data through service call.
• If BMM is not available :If BMM is not available : crashes, network problems, computer problems , …
• Data has to be directly saved into Data has to be directly saved into ORACLE ORACLE
– Encapsulate the BMM service calls in a Encapsulate the BMM service calls in a dedicated library to detect this kind of dedicated library to detect this kind of problemsproblems
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
2121
DATA SAVINGDATA SAVING
Data SavingData Saving
Data Saving ORACLEORACLEBMMBMMCorba Corba ServerServer
DataSaving
Interface
ClientClientCodeCode
BMM Service BMM Service access through access through the interfacethe interface
INTERFACE FUNCTIONSINTERFACE FUNCTIONS1. Check the availability of the BMM2. If BMM is broken Data are saved with method call only3. If BMM available Data are saved with a BMM service call and method
call
AA
AA
AAAA
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
2222
Implementation choicesImplementation choices
• The CORBA implementation The CORBA implementation OMNIORB 4.XOMNIORB 4.X
Check the CORBA interoperability:• LINUX<->W2000LINUX<->W2000• Client C++<-> Server C++Client C++<-> Server C++• Java Client <-> Server C++Java Client <-> Server C++
Database access:• OnlineOnline : Only from the BMM side
– C++C++– ORACLE access from C++ORACLE access from C++ : OCCI(Oracle9i)OCCI(Oracle9i)
• Data MonitoringData Monitoring toolstools : :– C++/OCCI or Java/JDBCC++/OCCI or Java/JDBC
• Tests to be done soon : Tests to be done soon : Prototyping a full sequence (Client<->BMM<->BMSClient<->BMM<->BMS)
for checking communication between BMM and BMS
• Tests already done:Tests already done: Check the CORBA interoperability:
• LINUX<->W2000LINUX<->W2000• Client C++<-> Server C++Client C++<-> Server C++• Java Client <-> Server C++Java Client <-> Server C++
Database access:• OnlineOnline : Only from the BMM side
– C++C++– ORACLE access from C++ORACLE access from C++ : OCCI(Oracle9i)OCCI(Oracle9i)
• Data MonitoringData Monitoring toolstools : :– C++/OCCI or Java/JDBCC++/OCCI or Java/JDBC
• Tests to be done soon : Tests to be done soon : Prototyping a full sequence (Client<->BMM<->BMSClient<->BMM<->BMS)
for checking communication between BMM and BMS
CERN Meeting 23/09/03
L.A.P.P OPERAT. Le Flour
2424
About ORACLEAbout ORACLE
• Availability of ORACLE from CERNAvailability of ORACLE from CERNFor Labs :
• Which version ? 9i • When and how to get the LINUX version
• Db installation and organization in Db installation and organization in OPERA?OPERA?