260 likes | 508 Views
SOFA Charles University, Prague. SOFA Overview Petr Hnetynka, Frantisek Plasil Distributed System Research Group Charles University , Prague http://nenya.ms.mff.cuni.cz. SOFA overview. SOFA Sof tware A ppliances Component model DCUP D ynamic C omponent Up dating
E N D
SOFA Charles University, Prague SOFA Overview Petr Hnetynka, Frantisek Plasil Distributed System Research Group Charles University, Prague http://nenya.ms.mff.cuni.cz
SOFA overview • SOFA • Software Appliances • Component model • DCUP • Dynamic Component Updating • Component distribution/delivery • SOFA node(s) • Multiplatform • Prototype in Java • Experimental impl. in C++
TIRBrowser SOFA example TIRQuery TIRQuery Body Controller Cache TIR
Log Viewer Interface Database Interface Configuration File Parser (P) Central Unit Log Viewer Server Administrator Interface Configuration File Parser Interface Administrator Server Client Interface Central Player Services Interface Login Interface Stock Market Simulator SOFA example
Connectors Ex.:MediaPlayer Controller ReadingUnit Display CSProcCall EventPassing DataStream Speaker
Component Model SOFA • Hierarchical components • Provides/requires interfaces • Ties • Binding • Subsume • Delegation • Connectors • Predefined • ProcCall • EventPassing • DataStream • User defined • Protocols
CB Primitive component Implementation CM implementation objects
CB Composed component Implementation CM
Logical View Component Delivery • SOFAnode(s)
RUN TR Physical View Run part • Deployment Dock & Registry ~ container ~ naming
Prototype in Java • Component model • Hierarchical components • Provides/requires interfaces • Ties • Connectors • Protocols • SOFAnode (partially) • Run part • Made part • TIR • CDL Compiler • Code Generator • Protocol Verifier • TR (primitive)
Running a demo • CDL spec By hand • Compiling CDL • Check Protocol Compliance • Generating Code fragments • Types • Component builders • Assembly descriptors • Primitive components • Assembling • Filling out Assembly descr • Deploying application to Depl. Docks • Filling out Deployment map • Connector generation • Launching
interface TIRAccessInterface { void init(); string query(in string name); void finish(); protocol: init; (query)*; finish }; frame TIRQueryBody { provides: TIRQueryInterface query; requires: TIRAccessInterface tir; CacheInterface cache; protocol: !tir.init; ?query.query{ !cache.get; (!tir.query+NULL) }* ; !tir.finish }; frame TIRQuery { ... } architecture CUNI TIRQuery implements TIRQuery { inst TIRQueryBody body; inst TIR tir; bind body:tir to tir:access; delegate query to body:query; subsume body:cache to cache; } CDL spec Running a demo
Coding Running a demo public class TIRImpl implements TIRAccessInterface { Repository rep; public TIRImpl() {} public void init(){ rep = (Repository)Naming.lookup(...); System.out.println("TIR opened"); } public void finish() { rep=null; System.out.println("TIR closed"); } public String query(String name) { return TIRPrint.printKind( TIRAccess.lookupContained(rep, "cdl", name)); } }
<sofa_system name="TIRBrowserDemo"> <architecture_ref>...</architecture_ref> <frame_ref>...</frame_ref> <version>0.0.1</version> <sofa_component name="frontend"> <architecture_ref>...</architecture_ref> <frame_ref>...</frame_ref> <version>0.0.1</version> <connector name="query" ...> <transport type="LOCAL"/> </connector> </sofa_component> <unit><location>.....</location> <sofa_component name="backend"> <architecture_ref>....</architecture_ref> <frame_ref>...</frame_ref> <version>0.0.1</version> <connector name="query" ...> <transport type="LOCAL"/> </connector> <sofa_component name="body"> ........... <sofa_system> <architecture_ref> ::CUNI::SOFA::demos::tirbrowser::TIRBrowserDemo?nenya.ms.mff.cuni.cz!0 </architecture_ref> <frame_ref> ::SOFA::libs::Application?nenya.ms.mff.cuni.cz!0 </frame_ref> <version>0.0.1</version> ... <component_ref inst="frontend" arch="::CUNI::SOFA::demos::tirbrowser::TIRBrowser“ version="0.0.1"/> <component_ref inst="backend" arch="::CUNI::SOFA::demos::tirbrowser::TIRQuery" version="0.0.1"/> </sofa_system> Assembly dscr Deployment map
Connectors Design/Impl detailes • Generic • Primitive elements • Roles • Distribution units
Benefits Connectors • Middleware interoperability …. <connector name="query" ...> <transport type=“RMI-Jeremie"/> <transport type=“CORBA"/> </connector> …
Benefits Connectors • Distribution eliminated from component code • In connectors only • Achieved in steps: • Architecture CDL: • Connection type • ProcCall • EventPassing • DataStream • JavaSpaces (??? ) • Assembly descriptor • Deployment • Connector generation (based on depl. map) • Launch
Fractal in SOFA Interoperability • A Fractal component in a SOFA application • Seen as primitive • CB directly • instantiates a Fractal component • ties its interfaces • Calls forwarded via a (generated) adaptor • Granularity: for each interface • Issue • Mapping Java CDL • Solution: Types limited to those in CDL (~CORBA IDL)
CM CB Fractal in SOFA Interoperability Main FHello SClient LC/CC BC Fractal HelloWorld
SOFA in Fractal Interoperability • SOFA component in a Fractal application • Seen as primitive • Wrapper • a Fractal component • forwards calls to the SOFA component through connectors • SOFA component “exists“ in a Deployment Dock • local - the same address space as the Fractal application • remote - separate address space/even node • Specific way of connector generation
SOFA in Fractal Interoperability • logical view Fractal component = wrapper SOFA component Connector Connector
SOFA in Fractal Interoperability • Implementation view Dock
Monolog JOTM transactions logging SOFA integration • SOFA in ObjectWeb (future intentions & options) JORM ASM OSGi package manipulation Connector optimal. persistency SOFA Fractal interoperability
SOFA Benefits • SOFA potential contribution to ObjectWeb (mostly to Fractal through OSMOSE project) • Connectors • Transparent component distribution • Invisible in the code of a component • Contrary to partial visibility in ProActive • Protocols • Dynamic update • to be combined with JORM • SOFAnode
References general • SOFA User’s manual, http://nenya.ms.mff.cuni.cz • Plasil,F., Balek,D., Janecek,R.: SOFA/DCUP Architecture for Component Trading and Dynamic Updating. Proceedings of ICCDS'98, Annapolis, IEEE CS, 1998 protocols • Plasil,Visnovsky: Behavior protocols for Software Components, IEEE Transactions on SW Engineering, Nov. 2002 (Tools USA, 1999) connectors • Balek,D., Plasil,F.: Software Connectors and Their Role in Component Deployment. Proceedings of DAIS’01, Krakow 2001, Kluwer 2001 • Bures, Bulej: A connector Suitable fro Automatic Generation fo Connectors,CU TR 01/03 design • Plasil, Mencl:Use Cases: Assembling “Whole Picture Behavior”,TR 02/11UNH Durham, submitted