Intro Experimental Prototype Herbert Sauro Michael Hucka Andrew
Intro Experimental Prototype Herbert Sauro, Michael Hucka, Andrew Finney, Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project California Institute of Technology Pasadena, California, USA http: //www. cds. caltech. edu/erato
This talk will illustrate a prototype version of SBW together with a variety of SBW compliant modules.
Prototype Features Omitted from Prototype Implementation: 1. No Auto-Startup of Modules 2. No Registry Facilities 3. No Cross-Internet Hooks
SBW Broker SBW Interface Main Application SBW Interface Overview Main Application SBW Interface Next Slide Listening Socket Dispatcher SBW Broker
SBW/Module Interface
Levels of Operation Raw Messaging Logic Low Level API Message Crackers Low Level API + High Level OOP API
Call/Send Messages 1. 2. 3. 4. 5. 6. 7. Destination Handle Message Type (Call, Send, etc) Source Handle Service Id Method Id UID – Unique identifier Payload UID is used to match a reply to the original sender
Description of the Prototype SBW Broker • Less than 1500 lines of Delphi source code • 450 K exe footprint, could be made much smaller • Thread use is optimized via a Thread pool • Runs in the background, accessible via the Windows Tool-tray • Uses no detectable CPU resources when Idle • Can be run under Win 32 or Linux OS
Module Bindings • • Less than 2000 lines of source code Implemented as a Delphi Component (cf. Java Bean) for ease of use. These bindings are compatible with C++ Builder as well as Delphi. Can be used to implement Modules for Windows or Linux
Delphi Prototype Code (Service Provider) Implementing a Simple Math Service Provider function TMath. Class. My. Sin (Data : PData. Stream) : TCom. Type; begin result : = Pack. Com. Type (sin (Extract. Double (Data))); end; TCom. Type is a variant record which can hold any of the allowable SBW data types PData. Stream is a pointer to a byte array containing the message payload Extract. Double is a helper routine to assist in extracting data items from the byte array Pack. Com. Type is a routine to pack a data type into the TCom. Type variant sbw. Register. Service ('trig'); sbw. Register. Method ('trig', 'sin', My. Sin, dt. Double, [dt. Double], 'Compute sin of radian angle');
Delphi Prototype Code (Service User) Implementing a Simple Math Service User My. Sin : = sbw. Get. Method. Obj ('Trig. Module', ‘trig’, 'sin'); Answer : = Un. Pack. Double (My. Sin. Call ([3. 1415]))); x. Call() returns data as a TCom. Type, therefore it is necessary to use Un. Pack. Double to unpack the double value. x. Call() takes a variable number of arguments of any allowable SBW data type, eg My. Meth. Call ([1. 2, True, ‘Hello’])
Prototype Test Modules Non-visual: • • Trig - Math Service provider NOM – Network Object Model (SBML Module) Visual: • • • Graph 2 D - Simple 2 D Display Inspector - Module inspector JDesigner - Visual designer Jarnac - Simulator Gillespsie – Simulator (Baltazar Aguda)
Script Based Modules Object Construction Scripting Modules can automatically wrap up a message interface into a scripting object. Request Interface Signature Interface signature Object Constructor User: >>Obj. doit Interface Object SBW Message Constructor
NOM (Network Object Model) Deconstructor Interface { Constructor Interface { Get. SBML NOM Load. SBML
Conclusion From our own experience with using SBW, the benefits of SBW in order of preference include: 1. Ease of programming 2. Language independence 3. Small, Network friendly, Extensible
Demonstrations (Private Slide) 1. Startup Broker, show popup menu 2. Basic Access to a simple service provider 3. Example illustrating exception handling (ln(-2)) 4. Demonstrate Inspector Tool 5. Demonstrate performance using Graph 2 D 6. Demonstrate JDesigner and Inspector tool 7. Demonstrate Jarnac proxy facility using JDesigner 8. Introduce NOM 9. Demonstrate JDesigner, Jarnac, NOM, Gillespise working together (Close J/JD before carrying out simulation)
- Slides: 16