Presentation is loading. Please wait.

Presentation is loading. Please wait.

March 1999 CHAIMS1 Now: Compiler Compiler: megaprogram in CHAIMS language client code in C, C++, Java, stub code executable client (CSRT) composer CHAIMS.

Similar presentations


Presentation on theme: "March 1999 CHAIMS1 Now: Compiler Compiler: megaprogram in CHAIMS language client code in C, C++, Java, stub code executable client (CSRT) composer CHAIMS."— Presentation transcript:

1

2 March 1999 CHAIMS1 Now: Compiler Compiler: megaprogram in CHAIMS language client code in C, C++, Java, stub code executable client (CSRT) composer CHAIMS compiler Idl-file generator and compiler C++, Java compiler and linker network

3 March 1999 CHAIMS2 Compiler: Drawbacks (1) Compiler creates CSRT that is no longer changeable during execution: all exceptions and special cases must be foreseen (current solution: no error handing at all, or just total abort) no dynamic user interaction in case of unforeseen errors or results, end-user/customer has to abort program execution, change megaprogram, recompile and restart it from scratch (problem in case of time-intensive services!!) no incremental programming: end-user/customer has to write whole megaprogram upfront, no step-by-step composition, user could nearly as well give megaprogram to technical expert who would write it directly in Java/CORBA (strength of web-browsing: I can decide on next step when I have results of previous step)

4 March 1999 CHAIMS3 Compiler: Drawbacks (2) Access to megamodules: Current compiler cannot access megamodules Access to megamodules over CORBA/BOA requires for each new megamodule and sequence of commands a cycle of IDL- generation, IDL-compilation, compilation of CHAIMS primitives into C++, compilation and linking of C++ code and stubs. Integration of direct access to megamodules (e.g. for executing CHAIMS estimate primitives) requires change of current compiler into a execution engine anyway.

5 March 1999 CHAIMS4 Reasons for having a Compiler Each remote object/megamodule/procedure has a different interface: »WRONG! »in CHAIMS we use higher level protocol/messages that are the same for each megamodule and communicate with dispatcher (in megamodule) that invokes the methods Speed: Starting up interpreter takes some time (as it takes time to start up Java interpreter), and preparing input takes same time (yet one of the basic assumptions of CHAIMS are that megaprograms are short) We assume that megaprograms are made by domain expert for one or two runs when and as needed, i.e. no real savings when separate compile step is needed (==> “run” in current CompWiz)

6 March 1999 CHAIMS5 Paradigm Shift Invoking Methods of Remote Object Code example in Java: RoomReservation rr = (RoomReservation) Naming.lookup (“//sole.stanford.edu/roomres”); rr.makeReservation(roomnr, nrpeople, date, starttime, endtime); // all parameters are Java integers or Java strings Requesting Invocations and other Information from Dispatcher/Megamodule Code example in Java (generated by CHAIMS compiler): CHAIMSCompliantObject rr = (CHAIMSCompliantObject) Naming.lookup (“//sole.stanford.edu/RRmegamodule”); rr.INVOKE(“makeReservation”, paramlist); // paramlist is a list of name-value pairs, containing the names and // values for roomnr, nrpeople, date, starttime, endtime

7 March 1999 CHAIMS6 Interpreter Interpreter: –core part is an execution engine (client engine as it makes up the client side run time) –Core Client Engine also has run-time scheduling and optimization –replaces CompWiz and CHAIMS Compiler Core Client Engine network Interpreter Input + Pre Processor composer/end-user whole megaprogram and maybe changes to a running megaprogram or some steps of a megaprogram at a time, continuing based on returned results

8 March 1999 CHAIMS7 Interpreter: Execution Graph Graph: - mirrors megaprogram (yet easier to work on a graph- representation than on a text file) - can be built up all at once or step by step Core Client Engine network Interpreter Input Processor Execution Graph add, change read, mark as done Log fileMegaprogram file GUI for interactive input and output or CLAM primitives Errors IO mega module Pre- processor optimize get estimates CLAM primitives

9 March 1999 CHAIMS8 Advantages of Interpreter CLAM is a simple scripting language and does not need compiler, it is easily interpretable (in contrast to C++, Java) Interpreter better matches paradigm of a fixed set of CHAIMS primitives with fixed set of parameters, sending and receiving messages Interactive composition becomes feasible Composer can react on non-foreseen errors, results and requirements, not just abort and restart (time!) We can really exploit the strengths of incremental extraction, progress monitoring and cost estimation by offering a real dynamic environment to the composer Optimal exploitation of parallelism becomes easy, trivial in case of non-conditional invocations, using the ESTIMATE primitive otherwise

10 March 1999 CHAIMS9 Preprocessing in Interpreter Now: CLAM-file ==> preprocessor ==> CLAM-file ==> CHAIMS-compiler ==> C++-file ==> C++-compiler ==> Executable > network (CPAM) In Interpreter: CLAM-file / graphical input / single commands from dialog boxes ==>> Input processor in interpreter > Internal (graph) representation ( > Preprocessor in interpreter > Internal (graph) representation ) > Core Client Engine > network (CPAM) red: files,==> : one-time (batch-like) one-way dataflow, black: processing > : repeated two-way dataflow

11 March 1999 CHAIMS10 IO Three different kind of input/output for end-user: interaction with Interpreter (compare with CompWiz now) »input: megaprogram, individual CLAM statements, or graphical »output: error messages like megamodule unavailable, (breakpoints in megaprogram that require user-intervention?), (prompting for next few CLAM statements?) interaction with IO-megamodules (general IO-megamodule or additional megamodule suite specific IO-megamodules) »output and input: parameters of the methods of the IO- megamodules as specified in the CHAIMS repository monitoring of CPAM communication (compare to ManualInternetServiceComposition) »output: CPAM request and response messages in XML or text-representation of CPAM procedure calls inclusive parameters

12 June 1998 CHAIMS11 Interpreter instead of Compiler CHAIMS execution machine (interpreter and scheduler) user Interpreter: network CHAIMS-protocol complete megaprogram in CHAIMS language some CHAIMS statements user serves as input to serve as input to Compiler: megaprogram in CHAIMS language client code in C, C++, Java, stub code executable client (CSRT) user CHAIMS compiler, simple scheduler Idl-file generator and compiler C++, Java compiler and linker network

13 June 1998 CHAIMS12 Reasons for Interpreter Dynamic scheduler: »Input is parsed and stored in a dependency graph. »Execution machine (interpreter / scheduler) works through the graph and makes appropriate calls: –estimate-calls are added in order to get necessary run-time information for scheduling (cost-function) –every invocation is issued as soon as possible (data-flow) and reasonable (according to cost-function) –all invocations for which the CSRT waits for results are polled regularly, and results extracted and new invocations issued as soon as possible CSRT would still be sequential! Overview results, flexible interactions: »composer can program statement by statement; immediate results can influence subsequent programming »like ftp, web

14 February 1999 CHAIMS13

15 February 1999 CHAIMS14


Download ppt "March 1999 CHAIMS1 Now: Compiler Compiler: megaprogram in CHAIMS language client code in C, C++, Java, stub code executable client (CSRT) composer CHAIMS."

Similar presentations


Ads by Google