Connecting Plasma to Service-oriented programming with JOLIE - - PowerPoint PPT Presentation

connecting plasma to service oriented programming with
SMART_READER_LITE
LIVE PREVIEW

Connecting Plasma to Service-oriented programming with JOLIE - - PowerPoint PPT Presentation

Connecting Plasma to Service-oriented programming with JOLIE Fabrizio Montesi <fmontesi@italianasoftware.com> italianaSoftware s.r.l., Italy Joint work with Kvin Ottens <ervin@kde.org> Aaron Seigo <aseigo@kde.org> KDE team


slide-1
SLIDE 1

Connecting Plasma to Service-oriented programming with JOLIE

Fabrizio Montesi <fmontesi@italianasoftware.com> italianaSoftware s.r.l., Italy Joint work with Kévin Ottens <ervin@kde.org> Aaron Seigo <aseigo@kde.org> KDE team

Thanks to: Alessandro Diaferia, Sean Wilson [KDE Team] Claudio Guidi [italianaSoftware s.r.l.] Marco Montesi [EOS srl] the Oxygen team [www.oxygen-icons.org]

slide-2
SLIDE 2

Summary

  • What is Service-Oriented Computing (SOC)?
  • The benefits that SOC can bring to the desktop.
  • What we can do with the current technologies.
  • JOLIE and Plasma for a transparent service-oriented

desktop.

slide-3
SLIDE 3

Service-oriented Computing (SOC)

  • An emerging paradigm for

dealing with distributed applications.

  • A new kind of architecture:

Service-oriented Architecture (SOA).

  • The base component is a service, a software

application offering its functionalities by means of an interface.

  • Web Services and D-Bus are service-oriented

technologies.

slide-4
SLIDE 4

Service composition and orchestration

  • Service composition allows a programmer to obtain a

new service by exploiting existing ones.

  • It can be obtained by means of orchestration: an

application (the orchestrator) achieves new functionalities by invoking other services.

Visa service Client Music store Mastercard service Computer store E-Commerce

  • rchestrator
slide-5
SLIDE 5

SOC and the desktop: current state

  • Local desktop SOC technologies: D-Bus, DCOP, etc.
  • Desktop applications implement ad-hoc mechanisms

for interacting with external SOAs.

  • Different SOA technologies can not talk to each
  • ther:

different data protocols: SOAP, D-Bus, DCOP, ...;

different transport mechanisms: unix sockets, TCP/IP, ....

slide-6
SLIDE 6

Our objective: a service-oriented desktop

  • The desktop should be able to:
  • ffer its functionalities to other SOAs;

exploit the functionalities of other SOAs.

  • We want to be able to reuse as many existing

services as possible, regardless of their implementing technology.

  • Flexible experience: users should be able to

compose their desktop with service interfaces as they like/need.

slide-7
SLIDE 7

Concept examples: John goes to Akademy

The organizer John inserts “Mechelen” in a user interface and pushes a button. A service orchestrator composes bank, travel and hotel services to prepare his travel. The tourist John takes his internet tablet. A service orchestrator finds out that he's in “Mechelen” and downloads the “Mechelen activity”, a desktop populated with widgets connected to services available in

  • Mechelen. John asks for “beer” and a map pointing to the nearest

pub appears. The presenter John makes his presentation. Attendees can connect to John's presentation and follow it in their computers.

slide-8
SLIDE 8

The challenges

provide an easy programming environment to create powerful orchestrators;

data protocol and transport mechanism independency.

  • For the desktop UI framework:

separate data from presentation;

flexibility: the UI components should be

  • rganized by the user.
  • For the SOA inter-connection technology:
slide-9
SLIDE 9

The right technologies are already here

SOC solution Desktop solution

? ?

slide-10
SLIDE 10

JOLIE: Java Orchestration Language Interpreter Engine

  • Service-oriented programming language.
  • Open-source.
  • Lightweight and cross-platform.
  • Based on a formal calculus for service-oriented

computing: SOCK.

  • Started as a thesis work at the University of Bologna

in the scope of European project SENSORIA.

  • Website: http://jolie.sourceforge.net/
slide-11
SLIDE 11

A formal theoretical background: SOCK

  • A formal calculus for Service-oriented Computing.
  • Started as a PhD thesis work at the University of

Bologna in the scope of European project SENSORIA.

  • JOLIE follows the semantics of SOCK, allowing for

formal reasoning on JOLIE programs.

  • Every mathematical property proven in SOCK is

valid also in JOLIE.

  • Example of useful ongoing research: pre-execution

deadlock checker for distributed applications.

slide-12
SLIDE 12

The challenges

provide an easy programming environment to create powerful orchestrators;

data protocol and transport mechanism independency.

  • For the desktop UI framework:

separate data from presentation;

flexibility: UI components should be organized by the user.

  • For the SOA inter-connection technology:
slide-13
SLIDE 13

A full-fledged service-oriented language

  • We need to address five issues:

communications;

data handling;

workflow composition;

multi-party session handling;

fault and compensation handling.

  • JOLIE supports all of them.
  • We look at a summary of the first three.
slide-14
SLIDE 14

Communications

  • Communications are native statements, based on
  • peration names.
  • Four operation types:
  • ne-way: receives a message;

request-response: receives a message, executes something and then sends a response back;

notification: sends a message;

solicit-response: sends a message, then waits for a response.

slide-15
SLIDE 15

Communications (2)

main { // One-Way setName( name ); // Request-Response sum( request )( total ) { total = request.operand[0] + request.operand[1] }; // Solicit-Response getTime@Clock( “UTC+1” )( time ); //Notification log@Logger( name + “ calculated “ + total + “ at “ + time ) }

slide-16
SLIDE 16

Data handling

  • Easy access and manipulation of structured data.

person[0].gender = “Male”; person[0].name = “John”; person[1].gender = “Female”; person[1].name = “Ann” <person> <gender>Male</gender> <name>John</name> </person> <person> <gender>Female</gender> <name>Ann</name> </person>

JOLIE code Converted message Example: SOAP conversion

SOAP protocol

  • Protocols ensure that the structures are translated to

the appropriate representation when communicating.

slide-17
SLIDE 17

Workflow composition

print@Console( “Hello, “ ) ; print@Console( “ world!” )

Sequence

sendMessage@A( mesg1 ) | sendMessage@B( mesg2 )

Parallelism

[ race( name ) ] { println@Console( name + “ arrived first!” ) } [ timeout() ] { println@Console( “Nobody arrived in time...” ) }

Non-deterministic choice

slide-18
SLIDE 18

The challenges

provide an easy programming environment to create powerful orchestrators;

data protocol and transport mechanism independency.

  • For the desktop UI framework:

separate data from presentation;

flexibility: UI components should be organized by the user.

  • For the SOA inter-connection technology:
slide-19
SLIDE 19

Communication abstraction

  • utputPort Logger {

Location: “socket://www.logger.com:80/” Protocol: soap Notification: log } main { log@Logger( “Log message” ) } sodep “socket://www.newlogger.com:810/”

  • JOLIE separates the program logic from the

underlying communication details.

Operations offered by Logger

slide-20
SLIDE 20

Dynamic communication configuration

  • Service communication configurations can be

changed dynamically at runtime.

  • utputPort Logger {

SolicitResponse: log }

  • utputPort Registry {

Location: “socket://www.serviceregistry.com” Protocol: sodep SolicitResponse: getProtocolForService, getLocationForService } main { getLocationForService@Registry(“Logger”)( Logger.location ); getProtocolForService@Registry(“Logger”)( Logger.protocol ); log@Logger( “Log message” ) }

  • >

<-

  • >

<-

slide-21
SLIDE 21

Plasma: the next generation desktop UI

  • A flexible User Interface for your desktop.
  • Open-source.
  • Cross-platform.
  • Part of the KDE project.
  • Allows users to customize their desktops in new and

efficient ways.

slide-22
SLIDE 22

The challenges

provide an easy programming environment to create powerful orchestrators;

data protocol and transport mechanism independency.

  • For the desktop UI framework:

separate data from presentation;

flexibility: UI components should be organized by the user.

  • For the SOA inter-connection technology:
slide-23
SLIDE 23

Separating data from presentation

  • Plasma provides separated components for data

(DataEngine) and presentation (Applet).

  • A DataEngine provides Applet access to the data.
  • An Applet provides the user a UI to interact with the data.

Applet

Time data

Time DataEngine

slide-24
SLIDE 24

DataEngine sharing

  • DataEngines can be used by multiple applets.
  • Minimizes resource consumption.

Time DataEngine

slide-25
SLIDE 25

Using multiple DataEngines

  • An applet can use multiple DataEngines.

Device plugging notifier DataEngine Device information DataEngine New device notifier

slide-26
SLIDE 26

The challenges

provide an easy programming environment to create powerful orchestrators;

data protocol and transport mechanism independency.

  • For the desktop UI framework:

separate data from presentation;

flexibility: UI components should be organized by the user.

  • For the SOA inter-connection technology:
slide-27
SLIDE 27

Presentation flexibility

  • Plasma allows the user to:

place any number of applets wherever he wants;

scale applets;

rotate applets;

group applets in different “activities”;

zoom semantically over his desktop, making easy to orientate even in a lot of UI components and component groups.

slide-28
SLIDE 28

Placing, scaling and rotating

slide-29
SLIDE 29

Activities and semantic zooming

slide-30
SLIDE 30

The current state

  • Two examples of what we can do today.
  • We orchestrate D-Bus and DCOP SOAs with JOLIE,

forming larger SOAs.

slide-31
SLIDE 31

Echoes: managing remote media players

  • Echoes offers a web interface for controlling a media

player (in this example, we use Amarok).

  • The web interface is synchronized with the current

state of the media player.

  • The state is shared among the clients.

JOLIE web server technology testing in collaboration with:

slide-32
SLIDE 32

Echoes

DEMO

slide-33
SLIDE 33

Vision: a SOA for distributed presentations

  • A presenter (P), gives a presentation.
  • Some clients (C1,C2,C3,...) want to follow that

presentation in their local viewer.

P

C1 C2 C3

  • The resulting network is a P2P one.

C4 C5

slide-34
SLIDE 34

Vision

DEMO

slide-35
SLIDE 35

Vision: the architecture

Presenter service Viewer service System Viewer frontend

Shared Memory D-Bus

Presenter service

SODEP

  • ver

TCP/IP

  • r

Bluetooth

Other system

. . .

slide-36
SLIDE 36

Connecting the two solutions

  • JOLIE solves the SOC related problems.
  • Plasma solves the UI related problems.
  • Let's make them talk to each other!
slide-37
SLIDE 37

Plasma::Service

  • Abstraction layer that allows Plasma applets to

access and manipulate service data.

Plasma::Service Applet

. . .

Local system

slide-38
SLIDE 38

MetaService

  • A single JOLIE service giving access to entire SOAs.
  • Embeds other services and/or redirects requests to
  • ther existing ones.

P::S

MetaService

Local system

Service Cloud

P::S P::S

SODEP

slide-39
SLIDE 39

MetaService (2)

  • MetaService features:

communicate seamlessly with existing services, local or remote;

deploy JOLIE services (by embedding), making them accessible by others;

unique communication endpoint (TCP/IP) for all

  • f your services;

deploy Plasma data handlers as services (WIP).

  • Plasma::Service allows plasmoids to make use of all
  • f these features.
slide-40
SLIDE 40

Example: Vision revisited

Presenter (A) Client (B) MetaService MetaService

Viewer Plasma::Service

Applet Applet

Viewer Plasma::Service

Presenter service Presenter service

slide-41
SLIDE 41

Conclusions

  • The new architecture enables the seamless

integration of UI components (applets) with services.

  • Easy service access with the Plasma::Service API.
  • Easy service writing with the JOLIE language and

MetaService-based deployment.

  • New possibilities for making applications that exploit

service-oriented desktops.

  • Service-oriented Computing brought to every

desktop user and programmer.

slide-42
SLIDE 42

Coming soon...

KDE 4.2

2009

slide-43
SLIDE 43

Q&A

Do I actually have time left?

slide-44
SLIDE 44

Thank you!