Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOCK and JOLIE from the formal basis to a service oriented programming language Part II Claudio Guidi and Fabrizio Montesi.

Similar presentations


Presentation on theme: "SOCK and JOLIE from the formal basis to a service oriented programming language Part II Claudio Guidi and Fabrizio Montesi."— Presentation transcript:

1 SOCK and JOLIE from the formal basis to a service oriented programming language Part II Claudio Guidi and Fabrizio Montesi

2 What is Jolie? Jolie is the concrete implementation of SOCK –simple syntax which resembles those of C and Java –Communication primitives –Workflow composition operators –Correlation sets for managing service sessions –Dynamic fault handling management –XML data –Developed for supporting different communication protocols (http, https, SOAP, WSAddressing,…)

3 Structure of a program A Jolie program is structured in two main parts Declaration: –execution modality (sequential, concurrent) –correlation set variables –portTypes which contains operations OneWay, Notification, RequestResponse, SolicitResponse –ports for binding portTypes and protocols –service location declaration Code: –definition of procedures –main definition

4 Demo (1: stores) A store registry (SR) registers store locations Three stores register themselves into the service registry: electroincs store (ES), photo store (PS) and TV store (TS) PS ES TS SR

5 A bank database service (BDb) allows for the retrieving of bank service locations depending on the type (visa, master card) Two bank services, visa (VB) and master cart (MC), provide operations for adding and subtracting euros from/to accounts A payment service (PY) manages transactions among bank services. Each transaction between two banks corresponds to a session of the payment service PS Demo (2: bank) PY VB MC BDb

6 A client (C) open a session on the market service (MS) by sending its username and password checked by the market invoking an account service (AS) Correlation sets allows for the identification of the client session –a fresh id is generated by the market MS Demo (3: client sessions) MSAS C logging..

7 The client can retrieve the product list (getp command) –The market retrieves the store list by invoking the store registry –The market retrieves the product list from each store and then sends back it to the client with a 20% price rise Demo (4: getting product list) PS MS C SR PS ES TS getp

8 The shopping cart is stored within the session on the market side The client manages its shopping cart by means of two commands: –putp: put a product into the shopping cart –delp: delete a product from the shopping cart Demo (5: the shopping cart) MS C putpdelp

9 Client command for buy the shopping cart: buy. –The market returns the total amount to pay –The client sends its account data to the market The market starts a transaction session on the payment service between the market and the client The payment service checks the accounts invoking the bank services Demo (6a: buy) MS C PS PY The payment service waits for a confirmation from the client The payment performs the transaction by invoking the bank services The payment performs a transaction for each product in the shopping cart and then sends a confirmation to the market. The client checks the transaction result to the market VB MC

10 Before notifying the end of transaction to the client the market starts a transaction for each product into the shopping cart –it asks for the store data account –it starts the transaction Demo (6b: shopping cart transactions) MS PS PY VB MC

11 If a specific shopping cart order cannot be satisfied, all the payment transaction for that shopping cart must be aborted an rolled back If a fault is sent back from a store to the market, the compensation mechanism starts for cancelling the previous transactions with the stores and the transaction with the client Demo (7: aborting an order)

12 Conclusions Jolie is the concrete implementation of SOCK Jolie is an open source project At http://sourceforge.net/jolie it is possible to download an old version of the Jolie enginehttp://sourceforge.net/jolie Next month we start up a company, italianaSoftware, for commercializing Jolie Version 1.0 scheduled for the end of the summer


Download ppt "SOCK and JOLIE from the formal basis to a service oriented programming language Part II Claudio Guidi and Fabrizio Montesi."

Similar presentations


Ads by Google