SPS 2001 Review Architecture 25112003 Lionel Mestre SPS






























- Slides: 30
SPS 2001 Review Architecture 25/11/2003 Lionel Mestre
SPS 2001 Review - Architecture • Architecture principles • Model overview • Architecture overview • Future directions • Conclusion 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 2
SPS 2001 Review - Architecture • Architecture principles • Model overview • Architecture overview • Future directions • Conclusion 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 3
Architecture Principles • Modular n The project is split in modules with a clear definition and a clear API • Distributed n The distributed nature of the application is built into the design • Layered n 25/11/2003 There is a one way dependency from top (GUI) to bottom (Persistence – Equipment) SPS 2001 Review – Architecture - Lionel Mestre 4
Modular • A module n n Represents an independent unit Interacts with others with a well defined API Defines a unit of responsibility and reusability Can be developed, tested and released independently • Examples n n n 25/11/2003 macsy-setting, macsy-generation macsy-client macsy-view-trim, macsy-view-fixdisplay SPS 2001 Review – Architecture - Lionel Mestre 5
Distributed • We identify 3 logical tiers n n n client applications business logic equipment and datastore • Clients interact with business logic through an API designed to be remotely accessible • The business logic can be remote or local to the client (deployed as 3 -Tier or 2 -Tier) 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 6
Layered • Each layer uses services provided by the layer below View Layer macsy-view-trim macsy-view-spsselection macsy-view-fixdisplay Application Model Layer Domain Layer Resource Layer 25/11/2003 macsy-view-drivehardware macsy-client macsy-domain japc macsy-setting macsy-config macsy-view-cyclegeneration macsy-trim japc SPS 2001 Review – Architecture - Lionel Mestre 7
Use of J 2 EE / EJB • We are using J 2 EE technology n n n Remote access Transaction management Central deployment • J 2 EE is a deployment choice, NOT an architectural decision • Our architecture is completely independent of J 2 EE and can run with or without using EJB n n 25/11/2003 Persistence layer is not using EJB Declarative transaction is abstracted SPS 2001 Review – Architecture - Lionel Mestre 8
Why is that independence important ? • To properly perform unit-testing • To greatly simplify development process • To simplify integration testing • Not to be dependent on a given tool • To have a plan B 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 9
Development guidelines • Unit testing is part of the development process • Logging is used thoroughly in the code • Programming to interfaces rather than implementation • Using design patterns when useful • Using best practices whenever possible 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 10
SPS 2001 Review - Architecture • Architecture principles • Model overview • Architecture overview • Future directions • Conclusion 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 11
Model Overview • The model defines 3 main entities n n n Context Parameter Setting • The business logic manages those entities through the commands sent by the clients 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 12
Context • Sequence (Super. Cycle) n Series of cycles to produce beams for known clients • Cycle n Defines the lifespan of the beam (from injection to extraction) and beam out • Beam. Process n 25/11/2003 Defines a specific process (injection, extraction…) in the cycle for a given domain (Main Ring, Transfer Lines…) SPS 2001 Review – Architecture - Lionel Mestre 13
Context example Sequence Fixed target p+ cycle MD cycle Main Ring TT 10 Injection Kicker TT 40 Extraction Kicker 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 14
Parameter • A parameter n n Defines a settable or measurable entity on a device Has a type (Parameter. Type) Belongs to a device Exemple : SPS/beam. Momentum, SPS/beam. QH, MSE 4183/K, MSE 4183/I, MSE 4183 M/I • Parameters are organized in a graph of dependencies n n 25/11/2003 Source parameters Dependent parameters SPS 2001 Review – Architecture - Lionel Mestre 15
Parameter - Organization LSS 4_419_VTRIM/KNOB QF 2/g. QV QF 2/g. QH SPS/beam. QH QD/I QD/GEF 25/11/2003 QF 1/I QF 1/GEF MPLV. 41501/K MPLV. 42101/K MPLV. 41501/I MPLV. 42101/I MPLV 4150/I MPLV 4210/I QF 2/GEF SPS 2001 Review – Architecture - Lionel Mestre 16
Parameter – Incorporation Rule • The incorporation rule merges a change on a parameter value in the value itself • The rule depends on the Beam. Process affected by the change • Several rules can apply and an operator can choose the one to apply trim 25/11/2003 Incorporation rule SPS 2001 Review – Architecture - Lionel Mestre 17
Parameter - Make. Rule • A Make. Rule is associated to the Parameter. Type • The Make. Rule allows to compute the parameter value from the sources • A trim can be made on a high level parameter and be automatically propagated QF 2/g. QV QF 2/g. QH Make. Rule for type current (I) QF 2/I SPS/beam. QH 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 18
Setting • A setting is the value of a parameter for a given context • Parameters that are not context dependent have a unique setting • Settings of external parameters are the ones sent to equipment • Settings can be trimmed, archived, retrieved and sent to equipment 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 19
Setting (2) • Settings hold a target and a correction value target. Value Parameter Setting correction. Value Context target. Value Parameter Setting. Archive correction. Value Context 25/11/2003 Date SPS 2001 Review – Architecture - Lionel Mestre 20
In a glimpse • Architecture fundamentals n n n Modular Distributed Layered • Model fundamentals n n n 25/11/2003 Context Parameter Setting SPS 2001 Review – Architecture - Lionel Mestre 21
SPS 2001 Review - Architecture • Architecture principles • Model overview • Architecture overview • Future directions • Conclusion 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 22
Architecture - logical view Applications JAPC macsy-japc 2 -tiers (local) japc-cmwrda macsy-domain 3 -tiers (EJB) macsy-setting macsy-command macsy-explotation macsy-generation macsy-trim macsy-config JAPC Data Access Object (DAO) japc-cmwrda Top. Link / Hibernate Devices 25/11/2003 macsy-client Datastore SPS 2001 Review – Architecture - Lionel Mestre 23
Architecture – physical view Client Tier Business Tier macsy-setting 2 -tiers (local) macsy or client 3 -tiers (EJB) macsy-explotation macsy client impl Hibernate / DAO Top. Link Datastore macsy-trim macsy-domain Applications macsyjapc JAPC macsy-generation JAPC japccmwrda Devices macsy-config japccmwrda 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 24
SPS 2001 Review - Architecture • Architecture principles • Model overview • Architecture overview • Future directions • Conclusion 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 25
Future directions • We learned from the TT 40 test and we concentrate on the third iteration of the architecture n n n Increase the modularity Better and simpler code organization Use DAO pattern Abstract transactions Increase test coverage • Deploy our architecture in a J 2 EE container • Consider a simulation layer for testing 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 26
SPS 2001 Review - Architecture • Architecture principles • Model overview • Architecture overview • Future directions • Conclusion 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 27
Conclusion - 1 • Last Review (July 2002) n n n First code generation from the model No development process in place No clear software architecture • September 2003 n n n 25/11/2003 Strong development process in place Clear software architecture Second iteration of the architecture is used to control the TT 40 test SPS 2001 Review – Architecture - Lionel Mestre 28
Conclusion - 2 • We put in place a sound architecture • We have a very pragmatic approach regarding deployment 2 -tiers/3 -tiers • We can build on top of what we have • We look at synergy with other projects • We focus on getting the job done 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 29
Questions 25/11/2003 SPS 2001 Review – Architecture - Lionel Mestre 30