Franco Gasperoni [email protected]...

95
1 http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License Franco Gasperoni Franco Gasperoni gasperon@act gasperon@act - - europe.fr europe.fr http:// http:// libre libre .act .act - - europe europe . . fr fr

Transcript of Franco Gasperoni [email protected]...

Page 1: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

1http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Franco GasperoniFranco Gasperonigasperon@[email protected]://http://librelibre.act.act--europeeurope..frfr

Page 2: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

2http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Copyright NoticeCopyright Notice

•• © ACT Europe under the GNU Free Documentation License© ACT Europe under the GNU Free Documentation License

•• Permission is granted to copy, distribute and/or modify this Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free License, Version 1.1 or any later version published by the Free Software Foundation; provided its original author is mentioned Software Foundation; provided its original author is mentioned and the link to http://and the link to http://librelibre.act.act--europeeurope..frfr/ is kept at the bottom of / is kept at the bottom of every nonevery non--title slide. A copy of the license is available at: title slide. A copy of the license is available at:

•• http://www.http://www.fsffsf.org/licenses/.org/licenses/fdlfdl.html.html

Page 3: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

3http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Page 4: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

4http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• IntroductionIntroduction•• Distributed Distributed ProgProg. Paradigms. Paradigms•• Distributed Object TechnologiesDistributed Object Technologies•• ConclusionConclusion

Page 5: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

5http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• NonNon--distributed applicationdistributed application = single process= single process–– running on a single computerrunning on a single computer

•• Distributed applicationDistributed application = several communicating = several communicating processesprocesses–– processes often run on different computers processes often run on different computers –– computers are connected through a networkcomputers are connected through a network

Page 6: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

6http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

processprocess

Single Process ApplicationSingle Process Application

body

spec

main

body

spec

body

spec

Page 7: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

7http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Distributed Application Distributed Application

body

spec

body

spec

body

spec

main

processprocessbody

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

ApplicationApplication

Page 8: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

8http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

All Processes Can Run on the All Processes Can Run on the Same Computer Same Computer

body

spec

body

spec

body

spec

main

processprocessbody

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

Page 9: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

9http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Or They can run on Different Or They can run on Different Computers Computers

body

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

Page 10: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

10http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

In All Cases This Requires In All Cases This Requires InterInter--Process CommunicationProcess Communication

body

spec

body

spec

body

spec

main

processprocessbody

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

Page 11: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

11http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

body

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

body

spec

body

spec

body

spec

main

processprocess

????

Page 12: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

12http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

The Main Topic of this LectureThe Main Topic of this Lecture

•• How distributed processes communicate at How distributed processes communicate at the the programmingprogramming levellevel

•• How the “How the “software chunkssoftware chunks” of a distributed ” of a distributed app can app can interactinteract..

•• This lecture will NOT teach you how they This lecture will NOT teach you how they communicate at thecommunicate at the–– physical levelphysical level–– or protocol levelor protocol level

Page 13: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

13http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Remember OSI Layers ?Remember OSI Layers ?

ApplicationApplication

PresentationPresentation

Transport

Network

Data Link

Physical

SessionSession

ApplicationApplication

PresentationPresentation

Transport

Network

Data Link

Physical

SessionSession } {This is whatThis is whatThis is whatThis is whatThis is whatThis is whatThis is whatThis is whatwe will look atwe will look atwe will look atwe will look atwe will look atwe will look atwe will look atwe will look at

Page 14: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

14http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ApplicationApplication

PresentationPresentation

Transport

Network

Data Link

Physical

SessionSession

Telnet, ftp, …Sending data in platform indep. mannerEstablish communication bw processesTCP, UDP, ...

IP, X.25, ...

Network drivers

The wire

Page 15: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

15http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Why Distributed Apps ?Why Distributed Apps ?

•• Multiuser Multiuser apps (e.g. eapps (e.g. e--mail, ftp)mail, ftp)•• Sharing data (e.g. www, airline reservation)Sharing data (e.g. www, airline reservation)•• Sharing resources (e.g. printers)Sharing resources (e.g. printers)•• Fault toleranceFault tolerance•• App may be inherently distributed (cell phones, App may be inherently distributed (cell phones,

ATM machines, …)ATM machines, …)

Page 16: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

16http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Distributed Distributed ProgProg. Is Hard. Is Hard

•• Multiple failure modesMultiple failure modes–– each individual process can fail (bugs, machine crash..)each individual process can fail (bugs, machine crash..)–– the network can go ashtraythe network can go ashtray

•• Security issuesSecurity issues–– is someone else listeningis someone else listening

•• Testing & debuggingTesting & debugging•• Distributed Distributed progprog. technologies not fully mature. technologies not fully mature

–– interoperability is still an issueinteroperability is still an issue

Page 17: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

17http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• IntroductionIntroduction•• Distributed Distributed ProgProg. Paradigms. Paradigms

–– Message Sending (Sockets)Message Sending (Sockets)–– Remote Procedure CallsRemote Procedure Calls–– Distributed ObjectsDistributed Objects

Page 18: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

18http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

bodybody

processprocess

specspec

processprocess

??

How to Formalize the Notion of an How to Formalize the Notion of an Interface in a Distributed Environment ?Interface in a Distributed Environment ?

Page 19: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

19http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

How to Formalize the Notion of an How to Formalize the Notion of an Interface in a Distributed Environment ?Interface in a Distributed Environment ?

•• Answer 1Answer 1: don’t formalize it, send a message: don’t formalize it, send a message–– e.g. socketse.g. sockets

•• Answer 2Answer 2: Remote Procedure Call (RPC): Remote Procedure Call (RPC)

•• Answer 3Answer 3: : RPCs RPCs + Distributed Objects+ Distributed Objects–– Language dependent: Ada 95, Java RMILanguage dependent: Ada 95, Java RMI–– Language independent: CORBA, COM/DCOMLanguage independent: CORBA, COM/DCOM

Page 20: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

20http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

A Simple ComparisonA Simple Comparison

ObjectObject--OrientedOrientedProgrammingProgramming

Programming withProgramming withGOTOsGOTOs

StructuredStructuredProgrammingProgramming

Distributed ObjectsDistributed Objects

MessageMessage SendingSending((socketssockets))

RPCsRPCs

Page 21: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

21http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Some TerminologySome Terminology

bodybodyspecspec

Client:Client:Client:Client:Client:Client:Client:Client: the code that madethe code that madethe request for servicethe request for service Server:Server:Server:Server:Server:Server:Server:Server: the code thatthe code that

answered the requestanswered the request

Page 22: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

22http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Answer 1: Don’t Formalize ItAnswer 1: Don’t Formalize ItSend a Message (e.g. Sockets)Send a Message (e.g. Sockets)

Send (…, Bytes);Send (…, Bytes); ReceiveReceive (…, & Bytes [ ]);(…, & Bytes [ ]);

Page 23: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

23http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Client ProcessClientClient ProcessProcess

time

Server ProcessServerServer ProcessProcess

time

Wait for connectionWait for connection

ComputeCompute

Send bytesSend bytes

Close socketClose socket

Open socketOpen socket

Get bytesGet bytes

Open socketOpen socket

ComputeCompute

Send bytesSend bytes

Wait for replyWait for reply

Close socketClose socket

Get bytesGet bytes

raw bytes

raw bytes

Page 24: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

24http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

What are the problemsWhat are the problems

with this approach ?with this approach ?

Page 25: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

25http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Problems with Problems with Sockets/Message SendingSockets/Message Sending

•• No interfaces No interfaces -- very lowvery low--level programminglevel programming–– does not scale updoes not scale up

•• Sockets exchange bytesSockets exchange bytes–– How do you exchange more complex data structures ?How do you exchange more complex data structures ?–– How do you handle heterogeneous systems ?How do you handle heterogeneous systems ?

Page 26: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

26http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ClientClientClient

time

ServerServerServer

time

Answer requestAnswer request

ComputeComputeWait for replyWait for reply

ComputeCompute

Get responseGet response

Send requestSend requestdata

Send responseSend responsedata

Doesn’t this look familiar ?Doesn’t this look familiar ?Wait for requestWait for request

Page 27: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

27http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Answer 2: Remote Procedure CallsAnswer 2: Remote Procedure Calls

R := R := Foo Foo (123);(123);

function function Foo Foo (X : Integer)(X : Integer)return Float; return Float;

Page 28: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

28http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ClientClientClient

time

ServerServerServer

time

function function Foo Foo (X: Integer)(X: Integer)return Float return Float

isis……beginbegin

……return …;return …;

end end FooFoo;;

Wait for replyWait for reply

ComputeCompute

Get resultGet result

R := R := Foo Foo (123);(123);send parameters

send result or modified parameters

RPCRPC

Page 29: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

29http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

RPCsRPCs

•• Remote procedureRemote procedure callcall completely handledcompletely handled byby thethesystemsystem

•• Parameters and results passed across theParameters and results passed across thenetworknetwork withoutwithout programmer interventionprogrammer intervention

•• Heterogeneity handled transparentlyHeterogeneity handled transparently

Page 30: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

30http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Where is the Magic ?Where is the Magic ?

R := R := Foo Foo (123);(123);

function function Foo Foo (X : Integer)(X : Integer)return Float; return Float;

Page 31: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

31http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Client Stub & Server SkeletonClient Stub & Server Skeleton•• From the server spec theFrom the server spec the systemsystem generatesgenerates a a

clientclient stubstub::–– MarshalsMarshals the parametersthe parameters–– Sends the request over theSends the request over the networknetwork–– WaitsWaits forfor the response and unmarshals the resultthe response and unmarshals the result

•• From the server specFrom the server spec ((and serverand server body)body) thethesystemsystem generatesgenerates aa server skeletonserver skeleton–– Receives theReceives the RPCRPC requestrequest–– unmarshals the parametersunmarshals the parameters–– SelectsSelects and calls the appropriate subprogramand calls the appropriate subprogram–– MarshalsMarshals the result and sends the responsethe result and sends the response

Page 32: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

32http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

SpecialSpecialCompilerCompiler SpecialSpecial

CompilerCompiler

Stubs & SkeletonsStubs & Skeletons

function function Foo Foo (X : Integer)(X : Integer)return Float; return Float;

Client Stub Client Stub Server Skeleton Server Skeleton

function function Foo Foo (X: Integer)(X: Integer)return Float return Float

isis……

end end FooFoo;;

Page 33: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

33http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

R := R := Foo Foo (123);(123);

function function Foo Foo (X : Integer)(X : Integer)return Float; return Float;

Client StubClient Stub Server Server Skeleton Skeleton

function function Foo Foo (X: Integer)(X: Integer)return Float return Float

isis……

end end FooFoo;;

Page 34: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

34http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

networknetwork

ClientClientClient ServerServerServer

function Foofunction Foo (X :(X : IntegerInteger) return) return Float isFloat is ......

ClientClientClient ServerServerServer

function Foofunction Foonetworknetwork

callcall

returnreturn

callcall

returnreturn

parameterparametermarshallingmarshalling

callcall

returnreturn

resultresultunmarshallingunmarshalling

resultresultmarshallingmarshalling

resultresultunmarshallingunmarshalling

ClientClient StubStub ServerServer SkeletonSkeleton

Page 35: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

35http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Enhancing Enhancing RPCsRPCs

•• ExceptionsExceptions–– exceptionsexceptions raisedraised inin the callee canbe transmittedthe callee canbe transmitted toto

thethe callercaller over theover the networknetwork

•• Asynchronous callsAsynchronous calls–– thethe callercaller doesdoes notnot needneed toto waitwait forfor the result from the the result from the

calleecallee (one(one way procedure callsway procedure calls))

•• Pointers onPointers on remote proceduresremote procedures–– RPCRPC throughthrough a pointer.a pointer. At theAt the point of callpoint of call the specthe spec ofof

the callee is knownthe callee is known but notbut not itsits location orlocation or identityidentity

Page 36: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

36http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Service Related to Service Related to RPCsRPCs::NamingNaming

•• RecordsRecords thethe location oflocation of the various processesthe various processes–– location of clientlocation of client stubs and server skeletonsstubs and server skeletons

•• This serviceThis service is calledis called via RPCvia RPC

•• ToTo solve the circularity problem the namingsolve the circularity problem the namingserviceservice is atis at aa knownknown machinemachine addressaddress

Page 37: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

37http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Answer 3: Distributed ObjectsAnswer 3: Distributed Objects

A: A: Alert’Class Alert’Class := Get_Alert;:= Get_Alert;……Handle (A);Handle (A);

type Alert is tagged record…;type Alert is tagged record…;procedure Handle (A : in out Alert);procedure Handle (A : in out Alert);

Dynamic Dynamic BindingBinding

type Medium_Alert is new Alert...;type Medium_Alert is new Alert...;procedure Handle (A : in out Medium_Alert);procedure Handle (A : in out Medium_Alert);

??

Page 38: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

38http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• IntroductionIntroduction•• Distributed Distributed ProgProg. Paradigms. Paradigms•• Distributed Object TechnologiesDistributed Object Technologies

–– Language Dependent: Ada 95Language Dependent: Ada 95–– Language Independent: CORBALanguage Independent: CORBA

Page 39: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

39http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

LanguageLanguage DependentDependentDistributed Objects ParadigmDistributed Objects Paradigm

bodybodybodybodybodybodybodybody

spec spec spec spec spec spec spec spec

The The samesame programming language is used to writeprogramming language is used to write•• the spec of the distributed servicesthe spec of the distributed services•• the implementation of the server codethe implementation of the server code•• the implementation of the client codethe implementation of the client code

Page 40: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

40http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

LanguageLanguage IndependentIndependentDistributed Objects ParadigmDistributed Objects Paradigm

ClientClientClientClientClientClientClientClientlanguage Alanguage A

ServerServerServerServerServerServerServerServerlanguage Blanguage B

specspeclanguage Blanguage B

Different languagesDifferent languages are used to write:are used to write:•• the spec of the distributed servicesthe spec of the distributed services•• the implementation of the server codethe implementation of the server code•• the implementation of the client codethe implementation of the client code

language language language language language language language language indepindepindepindepindepindepindepindep........spec spec spec spec spec spec spec spec

Page 41: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

41http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• IntroductionIntroduction•• Distributed Distributed ProgProg. Paradigms. Paradigms•• Distributed Object TechnologiesDistributed Object Technologies

–– Language Dependent: Ada 95Language Dependent: Ada 95–– Language Independent: CORBALanguage Independent: CORBA

Page 42: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

42

Ada 95Ada 95Distributed Systems AnnexDistributed Systems Annex

Page 43: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

43http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Ada 95 Distributed Ada 95 Distributed ProgrammingProgramming

Ada 95Ada 95

partitionpartition(process)(process)

multimulti--partitionspartitions

CoreCore Annex EAnnex E

A partition comprises one or more Ada packagesA partition comprises one or more Ada packages

Page 44: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

44http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Supported ParadigmsSupported Paradigms

•• Client/Server Paradigm (RPC)Client/Server Paradigm (RPC)

–– Synchronous / AsynchronousSynchronous / Asynchronous

–– Static / DynamicStatic / Dynamic

•• Distributed Objects Distributed Objects

•• Shared MemoryShared Memory

Page 45: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

45http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Ada Distributed ApplicationAda Distributed Application•• No need for a separate interfacing language as No need for a separate interfacing language as

in CORBA (IDL)in CORBA (IDL)–– Ada is the IDLAda is the IDL

•• Some packages categorized using Some packages categorized using pragmaspragmas–– Remote_Call_Interface (RCI)Remote_Call_Interface (RCI)–– Remote_TypesRemote_Types–– Shared_Passive (SP)Shared_Passive (SP)

•• All packages except All packages except RCIRCI & & SPSP duplicated on duplicated on partitions using thempartitions using them

Page 46: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

46http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Remote_Call_Interface (RCI)Remote_Call_Interface (RCI)

•• Allows subprograms to be called remotelyAllows subprograms to be called remotely

–– Statically bound Statically bound RPCsRPCs

–– Dynamically bound Dynamically bound RPCs RPCs (remote access to subprogram)(remote access to subprogram)

Page 47: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

47http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Remote_TypesRemote_Types

•• Allows the definition of a remote access typesAllows the definition of a remote access types

–– Remote access to subprogramRemote access to subprogram

–– Remote reference to objects Remote reference to objects (ability to do dynamically dispatching calls (ability to do dynamically dispatching calls

across the network)across the network)

Page 48: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

48http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Shared_PassiveShared_Passive

•• AA SharedShared_Passive package_Passive package containscontains variablesvariablesthat can be accessed fromthat can be accessed from distinct partitionsdistinct partitions

•• Allows support of shared distributed memoryAllows support of shared distributed memory

•• Allows persistence on some implementationsAllows persistence on some implementations

Page 49: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

49http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

1.1. Write app as if non distributed.Write app as if non distributed.

2.2. Identify remote procedures, shared variables, and Identify remote procedures, shared variables, and distributed objects &distributed objects & categorizecategorize packages.packages.

3.3. Build & test nonBuild & test non--distributed application.distributed application.

4.4. Write a configuration file forWrite a configuration file for partitionningpartitionning your app.your app.

5.5. Build partitions & test distributed app.Build partitions & test distributed app.package P is

.package P is

.package P is

.

package P is

.

package P is

.package P is

.

package P is

.package P is

.

package P is

.package P is

.

Building a Distributed App in Building a Distributed App in Ada 95Ada 95

Page 50: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

50http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Remote_Call_InterfaceRemote_Call_Interface

An ExampleAn Example

Page 51: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

51http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package TypesTypes isistype type DeviceDevice is (is (Furnace, BoilerFurnace, Boiler,…);,…);type type PressurePressure is …;is …;type type TemperatureTemperature is …;is …;

end end TypesTypes;;

with Types; use Types;package Sensors is

function Get_P (D: Device) return Pressure;function Get_T (D: Device) return Temperature;

end Sensors;

with with TypesTypes; use ; use TypesTypes;;package package SensorsSensors isis

function function Get_PGet_P ((D: DeviceD: Device) return ) return PressurePressure;;function function Get_TGet_T ((D: DeviceD: Device) return ) return TemperatureTemperature;;

end end SensorsSensors;;

with with TypesTypes; use ; use TypesTypes;;with with SensorsSensors;;procedure procedure Client_1Client_1 isis

P := Sensors.Get_P (Boiler);P := Sensors.Get_P (Boiler);

with with TypesTypes; use ; use TypesTypes;;with with SensorsSensors;;procedure procedure Client_2Client_2 isis

T := Sensors.Get_T (Furnace);T := Sensors.Get_T (Furnace);

Write AppWrite App

Page 52: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

52http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package TypesTypes isispragma pragma PurePure;;type type DeviceDevice is (is (Furnace, BoilerFurnace, Boiler,…);,…);type type PressurePressure is …;is …;type type TemperatureTemperature is …;is …;

end end TypesTypes;;

with Types; use Types;package Sensors is

pragma Remote_Call_Interface;function Get_P (D:Device) return Pressure;function Get_T (D:Device) return Temperature;

end Sensors;

with with TypesTypes; use ; use TypesTypes;;package package SensorsSensors isis

pragma pragma Remote_Call_InterfaceRemote_Call_Interface;;function function Get_P (D:Device)Get_P (D:Device) return return PressurePressure;;function function Get_T (D:Device)Get_T (D:Device) return return TemperatureTemperature;;

end end SensorsSensors;;

with with TypesTypes; use ; use TypesTypes;;with with SensorsSensors;;procedure procedure Client_1Client_1 isis

P := Sensors.Get_P (Boiler);P := Sensors.Get_P (Boiler);

with with TypesTypes; use ; use TypesTypes;;with with SensorsSensors;;procedure procedure Client_2Client_2 isis

T := Sensors.Get_T (Furnace);T := Sensors.Get_T (Furnace);

CategorizeCategorize

Page 53: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

53http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Build & TestBuild & Test

package package TypesTypes isispragma pragma PurePure;;type type DeviceDevice is (is (Furnace, BoilerFurnace, Boiler,…);,…);type type PressurePressure is …;is …;type type TemperatureTemperature is …;is …;

end end TypesTypes;;

with Types; use Types;package Sensors is

pragma Remote_Call_Interface;function Get_P (D:Device) return Pressure;function Get_T (D:Device) return Temperature;

end Sensors;

with with TypesTypes; use ; use TypesTypes;;package package SensorsSensors isis

pragma pragma Remote_Call_InterfaceRemote_Call_Interface;;function function Get_P (D:Device)Get_P (D:Device) return return PressurePressure;;function function Get_T (D:Device)Get_T (D:Device) return return TemperatureTemperature;;

end end SensorsSensors;;

with with TypesTypes; use ; use TypesTypes;;with with SensorsSensors;;procedure procedure Client_1Client_1 isis

P := Sensors.Get_P (Boiler);P := Sensors.Get_P (Boiler);

Page 54: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

54http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Build & TestBuild & Test

package package TypesTypes isispragma pragma PurePure;;type type DeviceDevice is (is (Furnace, BoilerFurnace, Boiler,…);,…);type type PressurePressure is …;is …;type type TemperatureTemperature is …;is …;

end end TypesTypes;;

with Types; use Types;package Sensors is

pragma Remote_Call_Interface;function Get_P (D:Device) return Pressure;function Get_T (D:Device) return Temperature;

end Sensors;

with with TypesTypes; use ; use TypesTypes;;package package SensorsSensors isis

pragma pragma Remote_Call_InterfaceRemote_Call_Interface;;function function Get_P (D:Device)Get_P (D:Device) return return PressurePressure;;function function Get_T (D:Device)Get_T (D:Device) return return TemperatureTemperature;;

end end SensorsSensors;;

with with TypesTypes; use ; use TypesTypes;;with with SensorsSensors;;procedure procedure Client_2Client_2 isis

T := Sensors.Get_T (Furnace);T := Sensors.Get_T (Furnace);

Page 55: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

55http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

configuration configuration ConfigConfig_1_1 isisNode_ANode_A : Partition := (: Partition := (SensorsSensors););Node_BNode_B : Partition := (: Partition := (Client_1Client_1););Node_CNode_C : Partition := (: Partition := (Client_2Client_2););

end end ConfigConfig_1_1;;

PartitionPartition

Page 56: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

56http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

PartitionPartition

Node_ANode_A

Node_BNode_B Node_CNode_C

Page 57: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

57http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package TypesTypes isispragma pragma PurePure;;type type DeviceDevice is …;is …;type type PressurePressure is …;is …;type type TemperatureTemperature is …;is …;

end end TypesTypes;;DUPLICATEDDUPLICATED Node_ANode_A

Node_BNode_B Node_CNode_C

Page 58: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

58http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with Types; use Types;package Sensors is

pragma Remote_Call_Interface;function Get_P(…) return Pressure;function Get_T(…) return Temperature;

end Sensors;

with with TypesTypes; use ; use TypesTypes;;package package SensorsSensors isis

pragma pragma Remote_Call_InterfaceRemote_Call_Interface;;function function Get_P(…)Get_P(…) return return PressurePressure;;function function Get_T(…)Get_T(…) return return TemperatureTemperature;;

end end SensorsSensors;;

STUBSSTUBSNode_ANode_A

Node_BNode_B Node_CNode_C

Page 59: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

59http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with Types; use Types;package Sensors is

pragma Remote_Call_Interface;function Get_P(…) return Pressure;function Get_T(…) return Temperature;

end Sensors;

with with TypesTypes; use ; use TypesTypes;;package package SensorsSensors isis

pragma pragma Remote_Call_InterfaceRemote_Call_Interface;;function function Get_P(…)Get_P(…) return return PressurePressure;;function function Get_T(…)Get_T(…) return return TemperatureTemperature;;

end end SensorsSensors;;

SKELETONSKELETON+ BODY+ BODY

Node_ANode_A

Node_BNode_B Node_CNode_C

Page 60: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

60http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

….:= Sensors.Get_P (Boiler);….:= Sensors.Get_P (Boiler);

Sensors.Get_P StubSensors.Get_PSensors.Get_P StubStub

Marshal ArgumentsMarshal ArgumentsMarshal Arguments

SendSend ReceiveReceive

Sensors.Get_PSensors.Get_P bodybody

Unmarshal ArgumentsUnmarshalUnmarshal ArgumentsArguments

SkeletonSkeletonSelect bodySelect bodySelect body

Node_BNode_B Node_ANode_A

Page 61: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

61http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with Types; use Types;package Sensors is

pragma Remote_Call_InterfaceRemote_Call_Interface;… procedure Log (D : Device; P : Pressure);pragma AsynchronousAsynchronous (Log);

end Bank;

Asynchronous CallsAsynchronous Calls

+ returns immediately+ exceptions are lost+ parameters must be in

Page 62: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

62http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Remote_TypesRemote_Types

An ExampleAn Example

Page 63: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

63http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package AlertsAlerts isistype type AlertAlert is abstract tagged private;is abstract tagged private;typetype AlertAlert__Ref Ref is accessis access allall Alert’ClassAlert’Class;;procedure procedure Handle (A : Handle (A : accessaccess Alert);Alert);procedure procedure Log (A : Log (A : accessaccess Alert) Alert) is abstractis abstract;;

privateprivate......

end end Alerts;Alerts;package package Alerts.Pool Alerts.Pool isis

procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium; with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

Write AppWrite App

Page 64: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

64http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package Alerts.LowAlerts.Low isistype type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

with with Alerts.Pool; Alerts.Pool; use use Alerts.Pool;Alerts.Pool;package body package body Alerts.Low Alerts.Low isis

......beginbegin

Register (Register (newnew Low_Alert);Low_Alert);end end AlertsAlerts..Low;Low;

Page 65: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

65http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package Alerts.Medium Alerts.Medium isistype type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

with with Alerts.Pool; Alerts.Pool; use use Alerts.Pool;Alerts.Pool;package body package body Alerts.Medium Alerts.Medium isis

......beginbegin

Register (Register (newnew Medium_Alert);Medium_Alert);end end AlertsAlerts..Medium;Medium;

Page 66: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

66http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package AlertsAlerts isispragmapragma Remote_TypesRemote_Types;type type AlertAlert is abstract tagged private;is abstract tagged private;typetype AlertAlert__Ref Ref is accessis access allall Alert’ClassAlert’Class;;procedure procedure Handle (A : Handle (A : accessaccess Alert);Alert);procedure procedure Log (A : Log (A : accessaccess Alert) Alert) is abstractis abstract;;

privateprivate......

end end Alerts;Alerts;package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium; with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

CategorizeCategorize

Page 67: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

67http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

package package Alerts.Medium Alerts.Medium isispragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Page 68: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

68http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

package package AlertsAlerts isispragmapragma Remote_TypesRemote_Types;type type AlertAlert is abstract tagged private;is abstract tagged private;typetype AlertAlert__Ref Ref is accessis access allall Alert’ClassAlert’Class;;procedure procedure Handle (A : Handle (A : accessaccess Alert);Alert);procedure procedure Log (A : Log (A : accessaccess Alert) Alert) is abstractis abstract;;

privateprivate......

end end Alerts;Alerts;

package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium;

with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

Build & Build & TestTest

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;package package Alerts.Medium Alerts.Medium isis

pragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Page 69: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

69http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

configuration configuration ConfigConfig_2_2 isisNode_ALNode_AL : Partition := (: Partition := (Alerts.LowAlerts.Low););Node_AMNode_AM : Partition := (: Partition := (Alerts.MediumAlerts.Medium););Node_BNode_B : Partition := (: Partition := (Alerts.PoolAlerts.Pool););Node_CNode_C : Partition := (: Partition := (Process_AlertsProcess_Alerts););

end end ConfigConfig_2_2;;

PartitionPartition

Page 70: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

70http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

What HappensWhat HappensWhen ExecutingWhen Executing

the Distributed Program ?the Distributed Program ?

Page 71: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

71http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium;

package package Alerts.Medium Alerts.Medium isispragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Node_ALNode_AL Node_AMNode_AM

Node_BNode_B Node_CNode_C

Step 1: A Low_Alert object in Node_AL registers itself with NodeStep 1: A Low_Alert object in Node_AL registers itself with Node_B_B

Page 72: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

72http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium;

package package Alerts.Medium Alerts.Medium isispragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Node_ALNode_AL Node_AMNode_AM

Node_BNode_B Node_CNode_C

Step 2: A Medium_Alert object in Node_AM registers itself with NStep 2: A Medium_Alert object in Node_AM registers itself with Node_Bode_B

Page 73: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

73http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium;

package package Alerts.Medium Alerts.Medium isispragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Node_ALNode_AL Node_AMNode_AM

Node_BNode_B Node_CNode_C

Step 3: Process_Alerts in Node_C does an RPC to Get_Alert in NodStep 3: Process_Alerts in Node_C does an RPC to Get_Alert in Node_Be_B

Page 74: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

74http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium;

package package Alerts.Medium Alerts.Medium isispragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Node_ALNode_AL Node_AMNode_AM

Node_BNode_B Node_CNode_C

Step 4: Get_Alert returns a pointer to an Alert object (Low_AlerStep 4: Get_Alert returns a pointer to an Alert object (Low_Alert or Medium_Alert)t or Medium_Alert)

Page 75: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

75http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

with with Alerts, Alerts.Pool;Alerts, Alerts.Pool; use use Alerts;Alerts;procedure procedure Process_Alerts Process_Alerts isisbeginbegin

looploopHandle (Pool.Get_Alert);Handle (Pool.Get_Alert);

end loop;end loop;end end Process_Alerts;Process_Alerts;

package package Alerts.LowAlerts.Low isispragmapragma Remote_TypesRemote_Types;type type Low_AlertLow_Alert is new is new Alert Alert with private;with private;procedure procedure Log (A : Log (A : accessaccess Low_Alert);Low_Alert);

privateprivate......

end end Alerts.Low;Alerts.Low;

package package Alerts.Pool Alerts.Pool isispragma pragma Remote_Call_InterfaceRemote_Call_Interface;;procedure procedure Register (A : Alert_Ref);Register (A : Alert_Ref);function function Get_Alert Get_Alert return return Alert_Ref;Alert_Ref;

end end Medium;Medium;

package package Alerts.Medium Alerts.Medium isispragmapragma Remote_TypesRemote_Types;type type Medium_AlertMedium_Alert is new is new Alert Alert with private;with private;procedure procedure Handle (A : Handle (A : accessaccess Medium_Alert);Medium_Alert);procedure procedure Log (A : Log (A : accessaccess Medium_Alert);Medium_Alert);

privateprivate......

end end AlertsAlerts..Medium;Medium;

Node_ALNode_AL Node_AMNode_AM

Node_BNode_B Node_CNode_C

Step 5: Node_C performs a dispatching RPC. It calls Handle in NoStep 5: Node_C performs a dispatching RPC. It calls Handle in Node_AL or Node_AMde_AL or Node_AM

????

Page 76: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

76http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

What Does GetWhat Does Get__AlertAlert Return ?Return ?

PointerPointerPointerPointerPointerPointerPointerPointer

MachineMachineAddressAddress ofofAlert objectAlert object

onon thetheMachineMachine

Get_AlertGet_Alert

Page 77: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

77http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Remote Access to Class Wide TypeRemote Access to Class Wide Type

•• At compile time:At compile time:

–– You do not know what operation you’ll You do not know what operation you’ll dispatch todispatch to

–– On what node that operations will be On what node that operations will be executed onexecuted on

Page 78: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

78http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• IntroductionIntroduction•• Distributed Distributed ProgProg. Paradigms. Paradigms•• Distributed Object TechnologiesDistributed Object Technologies

–– Language Dependent: Ada 95Language Dependent: Ada 95–– Language Independent: CORBALanguage Independent: CORBA

Page 79: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

79http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

LanguageLanguage IndependentIndependentDistributed Objects ParadigmDistributed Objects Paradigm

ClientClientClientClientClientClientClientClientlanguage Alanguage A

ServerServerServerServerServerServerServerServerlanguage Blanguage B

specspeclanguage Blanguage B

Different languagesDifferent languages are used to write:are used to write:•• the spec of the distributed servicesthe spec of the distributed services•• the implementation of the server codethe implementation of the server code•• the implementation of the client codethe implementation of the client code

language language language language language language language language indepindepindepindepindepindepindepindep........Spec (IDL) Spec (IDL) Spec (IDL) Spec (IDL) Spec (IDL) Spec (IDL) Spec (IDL) Spec (IDL)

Page 80: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

80http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

CORBA InterfacesCORBA Interfaces

•• InIn CorbaCorba interfaces areinterfaces are describeddescribed in IDL in IDL –– (Interface Description(Interface Description LanguageLanguage))

•• TheThe IDLIDL is independentis independent ofof programming languagesprogramming languages•• EachEach interfaceinterface is translatedis translated inin

–– LanguageLanguage AA usedused forfor thethe client (clientclient (client stubstub))–– LanguageLanguage BB usedused forfor the serverthe server ((server skeletonserver skeleton))

•• ToTo implement the server theimplement the server the programmerprogrammer completes completes the skeletonthe skeleton inin languagelanguage BB

•• ToTo implement theimplement the clientclient thethe programmer usesprogrammer uses thetheservicesservices providedprovided by thby th estubestub inin languagelanguage AA

Page 81: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

81http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

TheThe CORBA ArchitectureCORBA Architecture

•• RPC goRPC go through thethrough the ORB ORB –– ((Object RequestObject Request Broker)Broker)

•• TheThe ORBORB isis a software busa software bus

•• ORBs communicate withORBs communicate with a set ofa set of standardised standardised protocolsprotocols–– IIOP, GIOPIIOP, GIOP

Page 82: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

82http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

TheThe IDLIDL

•• Syntax similarSyntax similar to C++to C++ with somewith some Ada additionsAda additions

•• IDL mustIDL must bebe translatable intranslatable in various progvarious prog.. LanguagesLanguages–– Ada, C, C++, Java, …Ada, C, C++, Java, …

•• ThereThere are limitations inare limitations in what you can writewhat you can write inin thethe IDLIDL

•• Programmer mustProgrammer must understandunderstand howhow thethe IDLIDL is is translatedtranslated inin thethe hosthost languagelanguage–– toto complete the server skeletoncomplete the server skeleton

–– to useto use thethe clientclient stubstub

Page 83: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

83http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ExampleExample

package M package M isispragmapragma RemoteRemote_Types;_Types;type T type T is tagged is tagged …;…;procedure procedure P (O : inP (O : in accessaccess T);T);

endend M;M;

module M {module M {interface T {interface T {

void void P ();P ();};};

};};

Page 84: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

84http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ExempleExemplemodule Echo {

string echoStringechoString (in string mesg);

};

Module foo {

interface Buffer {

exception Empty;

void put (in string content);

string get() raises (Empty);

}

};

Page 85: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

85http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ExampleExample of IDL translation in Adaof IDL translation in Ada

with Corba.Object;package Echo is

type Ref is new Corba.Object.Ref with null record;function To_Echo (Self : in Corba.Object.Ref’Class)

return Ref’Class;function To_Ref (From : in Corba.Any) return Ref;function To_Any (From : in Ref) return Corba.Any;function echoStringechoString (Self : in Ref;

msg : in Corba.String)return Corba.String;

Null_Ref : constant Ref := (Corba.Object.Null_Refwith null record);

Echo_R_Id : constant Corba.RepositoryId :=Corba.To_Unbounded_String («IDL:Echo:1.0»);

end Echo;

Page 86: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

86http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

CORBA ServicesCORBA Services

•• TheThe CORBACORBA corecore services areservices are veryvery fewfew

•• LotLot ’s of’s of externalexternal servicesservices–– NamingNaming ((distributed and hierarchicaldistributed and hierarchical))–– PersistancePersistance–– TransactionTransaction–– SecuritySecurity–– ......

Page 87: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

87http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

ApplicationApplicationObjectsObjects

Object ServicesObject Services

CommonCommonFacilitiesFacilities

O R BO R B

Code you write

Code you Code you writewrite

Domain Independent

Domain Domain IndependentIndependent

DomainSpecificDomainDomainSpecificSpecific

Page 88: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

88http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

•• IntroductionIntroduction•• Distributed Distributed ProgProg. Paradigms. Paradigms•• Distributed Object TechnologiesDistributed Object Technologies•• ConclusionConclusion

Page 89: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

89http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Developing a Distributed AppDeveloping a Distributed App

•• Using network services directlyUsing network services directly–– SocketsSockets

•• Using middlewareUsing middleware–– CORBACORBA–– COM/DCOMCOM/DCOM

•• Using a distributed languageUsing a distributed language–– Ada 95 DSAAda 95 DSA–– Java RMIJava RMI

Similar issueswith

Tasking

Page 90: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

90http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Impact on Development PhasesImpact on Development Phases

GeneralGeneralDesignDesign

DistributedDistributedDesignDesign

CodingCoding

TestingTesting

Page 91: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

91http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

SocketsSockets

GeneralGeneralDesignDesign

DistributedDistributedDesignDesign

CodingCoding

TestingTesting

Ad HocAd Hoc

Very low levelVery low level

Distributed Distributed mode onlymode only

Page 92: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

92http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

CodingCoding

Very low levelVery low level

•• Everything must be done with socketsEverything must be done with sockets•• Data marshaling/Data marshaling/unmarshallingunmarshalling•• Handle heterogeneous systems directlyHandle heterogeneous systems directly

Page 93: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

93http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

CORBACORBA

GeneralGeneralDesignDesign

DistributedDistributedDesignDesign

CodingCoding

TestingTesting

IDLIDL

Must invoke highMust invoke high--level level services directlyservices directly

Distributed Distributed mode onlymode only

Page 94: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

94http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Ada 95 DSAAda 95 DSA

GeneralGeneralDesignDesign

DistributedDistributedDesignDesign

CodingCoding

TestingTesting

Ada 95Ada 95

distributeddistributed& non& non--distributeddistributed

Regular AdaRegular AdaCodingCoding

Page 95: Franco Gasperoni gasperon@act-europe.fr …deptinfo.cnam.fr/Enseignement/CycleSpecialisation/ACCOV/ACCOV51… · in CORBA (IDL) – Ada is the IDL • Some packages categorized using

95http://libre.act-europe.fr © ACT Europe under the GNU Free Documentation License

Ada 95 DSA & CORBA:Ada 95 DSA & CORBA:BenefitsBenefits

•• Save developer’s time, in socket programming:Save developer’s time, in socket programming:–– Defining a client/server protocolDefining a client/server protocol–– Defining a message formatDefining a message format–– Marshalling of dataMarshalling of data–– UnmarshallingUnmarshalling datadata

•• Raise the level of abstractionRaise the level of abstraction