Distributed Computing with Ada and CORBA using PolyORB Fr ed eric - - PowerPoint PPT Presentation

distributed computing with ada and corba using polyorb
SMART_READER_LITE
LIVE PREVIEW

Distributed Computing with Ada and CORBA using PolyORB Fr ed eric - - PowerPoint PPT Presentation

What is distribution? CORBA and Ada Conclusion Distributed Computing with Ada and CORBA using PolyORB Fr ed eric Praca Ada-France FOSDEM19, 2 nd of February 2019, Brussels Distributed Computing with Ada and CORBA using PolyORB Fr


slide-1
SLIDE 1

What is distribution? CORBA and Ada Conclusion

Distributed Computing with Ada and CORBA using PolyORB

Fr´ ed´ eric Praca

Ada-France

FOSDEM’19, 2nd of February 2019, Brussels

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-2
SLIDE 2

What is distribution? CORBA and Ada Conclusion

About the author

Fr´ ed´ eric Praca holds a MSc in computer science. After working in the defence industry in a European aeronautics company, he now works for the energy industry developing information systems. Usually coding in Java/Python at work, he started coding in Ada in 2003 in his spare time. Now, he tries to advocate people to use Ada.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-3
SLIDE 3

What is distribution? CORBA and Ada Conclusion

Goal of the presentation

The goal of this presentation is to show you a way to distribute computing thanks to Ada.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-4
SLIDE 4

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Table of Contents

1

What is distribution? Definition Technologies First conclusion

2

CORBA and Ada

3

Conclusion

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-5
SLIDE 5

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

According to Wikipedia A distributed system is a system whose components are located on different networked computers, which then communicate and coordinate their actions by passing messages to each other

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-6
SLIDE 6

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

According to Wikipedia A distributed system is a system whose components are located on different networked computers, which then communicate and coordinate their actions by passing messages to each other Message passing is not defined and several technologies exist for this task.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-7
SLIDE 7

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years:

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-8
SLIDE 8

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-9
SLIDE 9

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP REST

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-10
SLIDE 10

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP REST CORBA

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-11
SLIDE 11

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP REST CORBA DSA

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-12
SLIDE 12

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP REST CORBA DSA RMI

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-13
SLIDE 13

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP REST CORBA DSA RMI DCOM

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-14
SLIDE 14

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Different technologies appeared in the last 40 years: SOAP REST CORBA DSA RMI DCOM Among others. . .

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-15
SLIDE 15

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Several candidates are possible with Ada

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-16
SLIDE 16

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Several candidates are possible with Ada REST

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-17
SLIDE 17

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Several candidates are possible with Ada REST SOAP

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-18
SLIDE 18

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Several candidates are possible with Ada REST SOAP DSA

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-19
SLIDE 19

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

Several candidates are possible with Ada REST SOAP DSA CORBA

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-20
SLIDE 20

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

CORBA : Common Object Request Broker Architecture

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-21
SLIDE 21

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

CORBA : Common Object Request Broker Architecture Standard from the OMG (Object Management Group)

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-22
SLIDE 22

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

CORBA : Common Object Request Broker Architecture Standard from the OMG (Object Management Group) Released first time in 1991

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-23
SLIDE 23

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

CORBA : Common Object Request Broker Architecture Standard from the OMG (Object Management Group) Released first time in 1991 Object oriented

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-24
SLIDE 24

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

CORBA : Common Object Request Broker Architecture Standard from the OMG (Object Management Group) Released first time in 1991 Object oriented Using a definition language (IDL)

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-25
SLIDE 25

What is distribution? CORBA and Ada Conclusion Definition Technologies First conclusion

CORBA : Common Object Request Broker Architecture Standard from the OMG (Object Management Group) Released first time in 1991 Object oriented Using a definition language (IDL) Language agnostic but standard mappings were defined

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-26
SLIDE 26

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Table of Contents

1

What is distribution?

2

CORBA and Ada Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

3

Conclusion

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-27
SLIDE 27

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

“ CORBA and Ada are not very trendy but together, they do a great job ”

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-28
SLIDE 28

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

“ CORBA and Ada are not very trendy but together, they do a great job ”

  • F. Praca

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-29
SLIDE 29

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

“ CORBA and Ada are not very trendy but together, they do a great job ”

  • F. Praca 2nd of February at FOSDEM 2019, Brussels

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-30
SLIDE 30

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

“ CORBA and Ada are not very trendy but together, they do a great job ”

  • F. Praca 2nd of February at FOSDEM 2019, Brussels

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-31
SLIDE 31

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Code is available on GitHub https://github.com/FredPraca/distributed cbsg

Go Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-32
SLIDE 32

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Suppose we have a program which is :

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-33
SLIDE 33

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Suppose we have a program which is : very useful

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-34
SLIDE 34

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Suppose we have a program which is : very useful easy to use and integrate

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-35
SLIDE 35

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Suppose we have a program which is : very useful easy to use and integrate but not designed for remote access

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-36
SLIDE 36

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Suppose we have a program which is : very useful easy to use and integrate but not designed for remote access neither for scalability

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-37
SLIDE 37

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Suppose we have a program which is : very useful easy to use and integrate but not designed for remote access neither for scalability Distribution is the solution to our problem

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-38
SLIDE 38

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

CBSG stands for Corporate Bullshit Generator Aim of the project Providing the user sentences built against a vast vocabulary and sentence constructions harvested during long boring meetings. Thanks to Gauthier de Montmollin for this essential piece of software 100% written in Ada

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-39
SLIDE 39

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

CBSG through CGI

GO! Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-40
SLIDE 40

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

First step : Define a simple IDL for CBSG

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-41
SLIDE 41

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

First step : Define a simple IDL for CBSG Let’s see the Ada spec first

generic Paragraph Mark : S t r i n g ; Paragraph End Mark : S t r i n g ; Dialog Mark : S t r i n g ; package C o r p o r a t e B u l l s h i t i s function Sentence return S t r i n g ; function Workshop return S t r i n g ; function Short Workshop return S t r i n g ; function F i n a n c i a l R e p o r t return S t r i n g ; end C o r p o r a t e B u l l s h i t ;

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-42
SLIDE 42

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Now our IDL will look like

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-43
SLIDE 43

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Now our IDL will look like

module CorbaCBSG { s t r u c t timestamped Sentence { long timestamp ; s t r i n g sentence ; } ; i n t e r f a c e CBSG { timestamped Sentence createTimestampedSentence () ; s t r i n g createSentence () ; s t r i n g createWorkshop () ; s t r i n g createShortWorkshop () ; s t r i n g c r e a t e F i n a n c i a l R e p o r t () ; } ; } ;

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-44
SLIDE 44

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

PolyORB PolyORB is a polymorphic, reusable infrastructure for building

  • bject-oriented distributed systems.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-45
SLIDE 45

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

PolyORB PolyORB is a polymorphic, reusable infrastructure for building

  • bject-oriented distributed systems.

It provides several middlewares through application personalities

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-46
SLIDE 46

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

PolyORB PolyORB is a polymorphic, reusable infrastructure for building

  • bject-oriented distributed systems.

It provides several middlewares through application personalities DSA CORBA MOMA

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-47
SLIDE 47

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

PolyORB PolyORB is a polymorphic, reusable infrastructure for building

  • bject-oriented distributed systems.

It provides several middlewares through application personalities DSA CORBA MOMA and protocol personalities GIOP SOAP SRP

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-48
SLIDE 48

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

PolyORB PolyORB is a polymorphic, reusable infrastructure for building

  • bject-oriented distributed systems.

It provides several middlewares through application personalities DSA CORBA MOMA and protocol personalities GIOP SOAP SRP PolyORB is maintained by AdaCore and available on Github.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-49
SLIDE 49

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Building PolyORB for CORBA

fred@Tatooine :˜/ Dev/Ada/PolyORB$ support / r e c o n f i g [ s n i p ] fred@Tatooine :˜/ Dev/Ada/PolyORB$ ./ c o n f i g u r e \ −−p r e f i x =/opt / gnat / −−with−proto−perso=” giop ” \ −−with−appli −perso=” corba ” \ −−with−corba−s e r v i c e s=”naming event i r n o t i f i c a t i o n time ” −−with−g p r b u i l d=g p r b u i l d [ s n i p ] fred@Tatooine :˜/ Dev/Ada/PolyORB$ make && make i n s t a l l

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-50
SLIDE 50

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Now that we have PolyORB, prepare the development by generating Ada server code from IDL

fred@Tatooine :˜/ Dev/Ada/ dcbsg$ i a c −o Ada/ s e r v e r \ −ada −i cbsg . i d l

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-51
SLIDE 51

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

So what do we get ? corbacbsg cbsg hash.ad[sb]: Utilities used by PolyORB internally

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-52
SLIDE 52

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

So what do we get ? corbacbsg cbsg hash.ad[sb]: Utilities used by PolyORB internally corbacbsg-cbsg-skel.ad[sb]: Skeleton which is the glue between ORB and implementation

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-53
SLIDE 53

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

So what do we get ? corbacbsg cbsg hash.ad[sb]: Utilities used by PolyORB internally corbacbsg-cbsg-skel.ad[sb]: Skeleton which is the glue between ORB and implementation corbacbsg-cbsg-impl.ad[sb]: The implementation

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-54
SLIDE 54

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-55
SLIDE 55

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Figure courtesy of Douglas C. Schmidt, Vanderbilt University

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-56
SLIDE 56

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The only part to change is the implementation.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-57
SLIDE 57

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The only part to change is the implementation.

package Simple Generator i s new C o r p o r a t e B u l l s h i t ( Paragraph Mark = > ”” , Paragraph End Mark = > ”” , Dialog Mark = > ”” ) ; −− − − − − − − − − − − − − − − − − − − −− createSentence −− −− − − − − − − − − − − − − − − − − − − function createSentence ( S e l f : not n u l l access Object ) return CORBA. S t r i n g i s Generated Sentence : S t r i n g := Simple Generator . Sentence ; begin return CORBA. To CORBA String ( Generated Sentence ) ; end createSentence ;

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-58
SLIDE 58

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

We have the implementation code called servant but not the program using it. So we need to implement a server program. Here are the steps: Initialization of the ORB Retrieval of the Root POA Activation of the Root POA Creation of the servant reference ORB main loop start

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-59
SLIDE 59

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

CORBA.ORB. I n i t (CORBA.ORB. To CORBA String ( ”ORB” ) , Argv ) ; declare Root POA : P o r t a b l e S e r v e r .POA. Local Ref ; Ref : CORBA. Object . Ref ; Obj : constant CORBA. Impl . Object Ptr := new CorbaCBSG .CBSG. Impl . Object ; begin Root POA := P o r t a b l e S e r v e r .POA. Helper . To Local Ref (CORBA.ORB. R e s o l v e I n i t i a l R e f e r e n c e s (CORBA.ORB. To CORBA String ( ”RootPOA” ) ) ) ; P o r t a b l e S e r v e r . POAManager . A c t i v a t e ( P o r t a b l e S e r v e r .POA. Get The POAManager ( Root POA ) ) ;

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-60
SLIDE 60

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Ref := P o r t a b l e S e r v e r .POA. Servant To Reference (Root POA , P o r t a b l e S e r v e r . Servant ( Obj ) ) ; Put Line ( ” ’ ” & CORBA. To Standard String (CORBA. Object . Object To String ( Ref ) ) & ” ’ ” ) ; CORBA.ORB. Run ;

The last line will output the corbaloc string which is an unique identifier for the object and can be used to reference the onject from another computer.

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-61
SLIDE 61

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Let’s start with an Ada client... For the moment :)

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-62
SLIDE 62

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Let’s start with an Ada client... For the moment :) First as a reminder

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-63
SLIDE 63

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Let’s start with an Ada client... For the moment :) First as a reminder

Figure courtesy of Douglas C. Schmidt, Vanderbilt University

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-64
SLIDE 64

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple:

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-65
SLIDE 65

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple: Generate the stub

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-66
SLIDE 66

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple: Generate the stub Init the ORB

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-67
SLIDE 67

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple: Generate the stub Init the ORB Get the object from the corbaloc

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-68
SLIDE 68

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple: Generate the stub Init the ORB Get the object from the corbaloc Test that the returned object is ok

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-69
SLIDE 69

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple: Generate the stub Init the ORB Get the object from the corbaloc Test that the returned object is ok Call the method

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-70
SLIDE 70

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

The steps are quite simple: Generate the stub Init the ORB Get the object from the corbaloc Test that the returned object is ok Call the method And that’s all :)

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-71
SLIDE 71

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

fred@Tatooine :˜/ Dev/Ada/ dcbsg$ i a c −o Ada/ c l i e n t \ −c −ada −i cbsg . i d l

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-72
SLIDE 72

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

R c v d B u l l s h i t s : CORBA. S t r i n g ; B u l l s h i t G e n e r a t o r : CorbaCBSG .CBSG. Ref ; begin CORBA.ORB. I n i t i a l i z e ( ”ORB” ) ; CORBA.ORB. String To Object (CORBA. To CORBA String (Ada . Command Line . Argument (1) ) , B u l l s h i t G e n e r a t o r ) ; i f CorbaCBSG .CBSG. I s N i l ( B u l l s h i t G e n e r a t o r ) then Put Line ( ”main : cannot invoke

  • n a

n i l r e f e r e n c e ” ) ; return ; end i f ; R c v d B u l l s h i t s := CorbaCBSG .CBSG. createSentence ( B u l l s h i t G e n e r a t o r ) ;

then use CORBA.To Standard String to translate to Ada String

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-73
SLIDE 73

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-74
SLIDE 74

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple:

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-75
SLIDE 75

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple: Generate the stub

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-76
SLIDE 76

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple: Generate the stub Init the ORB

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-77
SLIDE 77

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple: Generate the stub Init the ORB Get the object from the IOR

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-78
SLIDE 78

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple: Generate the stub Init the ORB Get the object from the IOR Test that the returned object is ok

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-79
SLIDE 79

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple: Generate the stub Init the ORB Get the object from the IOR Test that the returned object is ok Call the method

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-80
SLIDE 80

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Our C++ client is using OmniORB4 The steps are also simple: Generate the stub Init the ORB Get the object from the IOR Test that the returned object is ok Call the method And that’s all :)

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-81
SLIDE 81

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

CORBA : : ORB var orb = CORBA : : ORB init ( argc , argv ) ; i f ( argc != 2 ) { c e r r << ” usage : c l i e n t <o b j e c t r e f e r e n c e >” << endl ; return 1; } // We c r e a t e a CORBA o b j e c t from the provided s t r i n g CORBA : : Object var

  • bj =
  • rb−

>s t r i n g t o o b j e c t ( argv [ 1 ] ) ; //Then c a s t i t to CBSG r e f e r e n c e CorbaCBSG : : CBSG var cbsgRef = CorbaCBSG : : CBSG : : narrow ( obj ) ;

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-82
SLIDE 82

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

// We then check the

  • b j e c t

i s c o r r e c t i f ( CORBA : : i s n i l ( cbsgRef ) ) { c e r r << ”Can ’ t narrow r e f e r e n c e to type CBSG ( or i t was n i l ) . ” << endl ; return 1; } // And go , c a l l the method cout << ”The g e n e r a t o r s a i d : ” << cbsgRef− >createSentence () << endl ; // Then we stop the ORB

  • rb−

>d e s t r o y () ;

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-83
SLIDE 83

What is distribution? CORBA and Ada Conclusion Where is the code? CBSG, a short presentation Starting distributing bullshits : PolyORB Building our CORBA server Now the client

Finally, the demo !!

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-84
SLIDE 84

What is distribution? CORBA and Ada Conclusion

Table of Contents

1

What is distribution?

2

CORBA and Ada

3

Conclusion

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-85
SLIDE 85

What is distribution? CORBA and Ada Conclusion

Why using Ada with CORBA ? Using our favorite language

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-86
SLIDE 86

What is distribution? CORBA and Ada Conclusion

Why using Ada with CORBA ? Using our favorite language Put the safety and readiness of Ada in heterogen environment

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-87
SLIDE 87

What is distribution? CORBA and Ada Conclusion

Why using Ada with CORBA ? Using our favorite language Put the safety and readiness of Ada in heterogen environment Using PolyORB

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB

slide-88
SLIDE 88

What is distribution? CORBA and Ada Conclusion

Further reading: Several useful links on CORBA OMG, CORBA Standard Douglas C. Schmidt, Distributed Object Computing with CORBA Middleware Ciaran McHale, CORBA explained simply And PolyORB Adacore, PolyORB GitHub repository Adacore, PolyORB User’s Guide

Fr´ ed´ eric Praca Distributed Computing with Ada and CORBA using PolyORB