Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle,...
-
Upload
emerald-pitts -
Category
Documents
-
view
212 -
download
0
Transcript of Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle,...
![Page 1: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/1.jpg)
Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri
Principal Investigators: John Doyle, Hiroaki Kitano
JST/ERATO Kitano Systems Biology ProjectCalifornia Institute of Technology
Pasadena, California, USA
http://www.cds.caltech.edu/erato
Intro
Experimental Prototype
![Page 2: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/2.jpg)
This talk will illustrate a prototype version of SBW together with a variety of SBW
compliant modules.
![Page 3: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/3.jpg)
Prototype
Features Omitted from Prototype Implementation:
1. No Auto-Startup of Modules
2. No Registry Facilities
3. No Cross-Internet Hooks
![Page 4: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/4.jpg)
Overview
SBW Broker
SB
W Interface
Main Application
SB
W In
terf
ace
Main Application
SB
W In
terf
ace
SBW Broker
Listening Socket
Dispatcher
Next Slide
![Page 5: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/5.jpg)
SBW/Module Interface
![Page 6: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/6.jpg)
Levels of Operation
Raw Messaging Logic
Low Level API
Low Level API +
High Level OOP API
Message Crackers
![Page 7: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/7.jpg)
Call/Send Messages
1. Destination Handle
2. Message Type (Call, Send, etc)
3. Source Handle
4. Service Id
5. Method Id
6. UID – Unique identifier
7. Payload
UID is used to match a reply to the original sender
![Page 8: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/8.jpg)
Description of the Prototype
SBW Broker
• Less than 1500 lines of Delphi source code• 450K 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 Win32 or Linux OS
![Page 9: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/9.jpg)
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
![Page 10: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/10.jpg)
Delphi Prototype Code (Service Provider)
Implementing a Simple Math Service Provider
function TMathClass.MySin (Data : PDataStream) : TComType;begin result := PackComType (sin (ExtractDouble (Data)));end;
TComType is a variant record which can hold any of the allowable SBW data types
PDataStream is a pointer to a byte array containing the message payload
ExtractDouble is a helper routine to assist in extracting data items from the byte array
PackComType is a routine to pack a data type into the TComType variant
sbw.RegisterService ('trig');
sbw.RegisterMethod ('trig', 'sin', MySin, dtDouble, [dtDouble], 'Compute sin of radian angle');
![Page 11: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/11.jpg)
Delphi Prototype Code (Service User)
Implementing a Simple Math Service User
MySin := sbw.GetMethodObj ('TrigModule', ‘trig’, 'sin');
Answer := UnPackDouble (MySin.Call ([3.1415])));
x.Call() returns data as a TComType, therefore it is necessary to use UnPackDouble to unpack the double value.
x.Call() takes a variable number of arguments of any allowable SBW data type, eg MyMeth.Call ([1.2, True, ‘Hello’])
![Page 12: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/12.jpg)
Prototype Test Modules
Non-visual:
• Trig - Math Service provider• NOM – Network Object Model (SBML Module)
Visual:
• Graph2D - Simple 2D Display• Inspector - Module inspector• JDesigner - Visual designer• Jarnac - Simulator• Gillespsie – Simulator (Baltazar Aguda)
![Page 13: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/13.jpg)
Scripting Modules can automatically wrap up a message interface into a scripting object.
SBW
Request Interface Signature
Object Constructor
Interface Object
User:
>>Obj.doitMessage
Constructor
Interface signature
Object Construction
Script Based Modules
![Page 14: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/14.jpg)
NOM(Network Object Model)
GetSBML
LoadSBMLNOM
{Constructor Interface
Deconstructor Interface{
![Page 15: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/15.jpg)
Conclusion
1. Ease of programming
2. Language independence
3. Small, Network friendly, Extensible
From our own experience with using SBW, the benefits of SBW in order of preference include:
![Page 16: Herbert Sauro, Michael Hucka, Andrew Finney,Hamid Bolouri Principal Investigators: John Doyle, Hiroaki Kitano JST/ERATO Kitano Systems Biology Project.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f445503460f94c64ecd/html5/thumbnails/16.jpg)
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 Graph2D
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)