SlideShare a Scribd company logo
Computational REST Meets Erlang

Alessandro Sivieri     Gianpaolo Cugola          Carlo Ghezzi

                        DeepSE Group
          Dipartimento di Elettronica e Informazione
                    Politecnico di Milano


          49th International Conference on
     Objects, Models, Components and Patterns
                   June 30, 2011
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions




1   Introduction


2   The CREST-Erlang architecture


3   A performance assessment


4   Conclusions




                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   2/21
Introduction
              The CREST-Erlang architecture
                   A performance assessment
                                 Conclusions


Outline



  1   Introduction


  2   The CREST-Erlang architecture


  3   A performance assessment


  4   Conclusions




                       Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   3/21
Introduction
             The CREST-Erlang architecture
                  A performance assessment
                                Conclusions


The scenario


  Today’s applications
       Large-scale and distributed on the Web
            Components running on different devices
            Services administered by different organizations
       Long time executions, without interruptions or failures

  We need frameworks able to
      Support scalability and reliability
       Guarantee isolation among components
       Offer mechanisms for dynamic update of functionalities



                      Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   4/21
Introduction
             The CREST-Erlang architecture
                  A performance assessment
                                Conclusions


REpresentational State Transfer

  The model
      Client-server separation for scalability and portability of the
      code
       Stateless communication for reliability
       Caching mechanisms for scalability

  The generic interface
       Independence of applications on specific services
       Application data must be encoded in a standard format
       A host may not be able to correctly interpret these data


                      Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   5/21
Introduction
             The CREST-Erlang architecture
                  A performance assessment
                                Conclusions


REpresentational State Transfer

  The model
      Client-server separation for scalability and portability of the
      code
       Stateless communication for reliability
       Caching mechanisms for scalability

  The generic interface
       Independence of applications on specific services
       Application data must be encoded in a standard format
       A host may not be able to correctly interpret these data


                      Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   5/21
Introduction
              The CREST-Erlang architecture
                   A performance assessment
                                 Conclusions


Computational REST




       Designed as a response to real world problems
       Adapts REST for an Internet of applications
       From a Web of data to a Web of computations
       Same REST principles, different key abstraction




       Erenkrantz, J.R., Computational REST: a new model for decentralized,
  Internet-scale applications, 2009
                       Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   6/21
Introduction
             The CREST-Erlang architecture
                  A performance assessment
                                Conclusions


Scheme


  Proposed as the lingua franca for the Web
      Functional language
      Native support for continuations
      History of uses for mobile code

  Drawbacks
      No native support for distributed applications
      The need to develop many CREST-related concepts (light
      processes, communication facilities . . . )



                      Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   7/21
Introduction
             The CREST-Erlang architecture
                  A performance assessment
                                Conclusions


Scheme


  Proposed as the lingua franca for the Web
      Functional language
      Native support for continuations
      History of uses for mobile code

  Drawbacks
      No native support for distributed applications
      The need to develop many CREST-related concepts (light
      processes, communication facilities . . . )



                      Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   7/21
Introduction
               The CREST-Erlang architecture
                    A performance assessment
                                  Conclusions


Erlang




  Erlang as the lingua franca for the Web
         Fault-tolerance and “hot” code update
         Distributed applications with an actor-like concurrency model
         Design patterns (generic server, supervisor . . . )




                        Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   8/21
Introduction
              The CREST-Erlang architecture
                   A performance assessment
                                 Conclusions


Outline



  1   Introduction


  2   The CREST-Erlang architecture


  3   A performance assessment


  4   Conclusions




                       Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   9/21
Introduction
           The CREST-Erlang architecture
                A performance assessment
                              Conclusions


Overview




                             The main architecture


                    Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   10/21
Introduction
                   The CREST-Erlang architecture
                        A performance assessment
                                      Conclusions


A service example

 1   m y _ s e r v i c e ( S t a t e ) −>
 2      receive
 3         { Pid , [ {" p a r 1 " , P1} , . . . {" parN " , PN} ] } −>
 4             % Do y o u r j o b a c c e s s i n g par1 , . . . parN
                 %
 5             % e v e n t u a l l y c r e a t e a new s t a t e
                 %
 6
 7             % I f n e c e s s a r y , spawn m y s e l f on a h o s t
                %
 8             invoke_spawn ( Hostname , ?MODULE,
 9                                 f u n ( ) −> m y _ s e r v i c e ( NewState )
                                         end ) ,
10
11             % F i n i s h with a t a i l r e c u r s i o n
                %
12             m y _ s e r v i c e ( NewState )
13     end .


                            Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   11/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


So far so good



      Full implementation of the Computational REST architectural
      style
      Erlang is the proposed language of choice for a Web of
      computations
      Minor development effort
      CREST-Erlang prototype outperforms the CREST-Scheme one




                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   12/21
Introduction
             The CREST-Erlang architecture
                  A performance assessment
                                Conclusions


Security concerns




  The problem
  Mobile code may cause two kinds of problems:
      Security of the host with respect to the code
      Security of the code with respect to the host
  Neither of these have found, as of today, a stable solution.




                      Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   13/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


CREST security proposals


  CREST-Scheme
     JVM sandbox (implemented)
      Bytecode inspection and self-certifying URLs (ideas)

  CREST-Erlang
  Trusted network: mutual authentication with SSL.




                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   14/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


CREST security proposals


  CREST-Scheme
     JVM sandbox (implemented)
      Bytecode inspection and self-certifying URLs (ideas)

  CREST-Erlang
  Trusted network: mutual authentication with SSL.

                   In both cases they are not enough.




                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   14/21
Introduction
              The CREST-Erlang architecture
                   A performance assessment
                                 Conclusions


Outline



  1   Introduction


  2   The CREST-Erlang architecture


  3   A performance assessment


  4   Conclusions




                       Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   15/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


Implementation effort


      Stateful and stateless services
      Service composition

      Framework           Framework source code               Demo source code
    CREST-Scheme                 5938                               817
    CREST-Erlang                 2957                               768
                         # of lines of code comparison




                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   16/21
Introduction
          The CREST-Erlang architecture
               A performance assessment
                             Conclusions


Performances

                  CREST-Scheme demo performances




         (a) Response time                             (b) Throughput


                   There is no caching mechanism.

                   Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   17/21
Introduction
          The CREST-Erlang architecture
               A performance assessment
                             Conclusions


Performances

                       Test application performances




         (a) Response time                             (b) Throughput


                   There is no caching mechanism.

                   Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   17/21
Introduction
              The CREST-Erlang architecture
                   A performance assessment
                                 Conclusions


Outline



  1   Introduction


  2   The CREST-Erlang architecture


  3   A performance assessment


  4   Conclusions




                       Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   18/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


CREST-Erlang

  Erlang
      Native support for
           distribution
           concurrency
           fault-tolerance
      The security problem

  Computational REST
      A possible evolution addressing the growing presence of
      applications interfacing through the Web
      Is HTTP the right protocol for transmitting computations?


                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   19/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


CREST-Erlang

  Erlang
      Native support for
           distribution
           concurrency
           fault-tolerance
      The security problem

  Computational REST
      A possible evolution addressing the growing presence of
      applications interfacing through the Web
      Is HTTP the right protocol for transmitting computations?


                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   19/21
Introduction
           The CREST-Erlang architecture
                A performance assessment
                              Conclusions


Future work



     Caching mechanism, for improving performances especially for
     static content
     Introduce the concept of subpeer, part of the latest CREST
     definition
     Add more security mechanisms, for example for avoiding
     possible attacks to a host




                    Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   20/21
Introduction
            The CREST-Erlang architecture
                 A performance assessment
                               Conclusions


Thank you




                                      Questions?

                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   21/21
Appendix



Related works

  Dynamic adaptation
      Publish-subscribe
      Map-reduce

  Web applications
     REST
      Service-Oriented Architecture

  Context-oriented languages
      ContextErlang
      Dynamic Aspect-Oriented Programming


                     Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   1/4
Appendix



Selected bibliography
     J.R. Erenkrantz.
     Computational REST: a new model for decentralized, Internet-scale
     applications.
     California State University at Long Beach, 2009.
     R.N. Taylor, P. Oreizy and N. Medvidovic.
     Runtime software adaptation: framework, approaches, and styles.
     ICSE Companion 2008, 899–910, 2008.
     J. Armstrong.
     Programming Erlang: Software for a Concurrent World.
     Pragmatic Bookshelf, 2007.
     J. Zachary.
     Protecting mobile code in the world.
     Internet Computing, IEEE, 7(2):78–82, 2003.


                   Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   2/4
Appendix



Code




         The CREST-Erlang code can be found at:
       https://github.com/sivieri/crest-erlang




             Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   3/4
Appendix



Licenses



                This presentation is licensed under:




             The image on slide 21 can be found at:
      www.flickr.com/photos/29890539@N07/4648496819/




               Sivieri, Cugola, Ghezzi   Computational REST Meets Erlang   4/4

More Related Content

Similar to Computational REST Meets Erlang

Functional Verification of Large-integers Circuits using a Cosimulation-base...
Functional Verification of Large-integers Circuits using a  Cosimulation-base...Functional Verification of Large-integers Circuits using a  Cosimulation-base...
Functional Verification of Large-integers Circuits using a Cosimulation-base...
IJECEIAES
 
Software Architecture: introduction to the abstraction
Software Architecture: introduction to the abstractionSoftware Architecture: introduction to the abstraction
Software Architecture: introduction to the abstraction
Henry Muccini
 
Presentation Summarizer: A Full-Fledged NLP Service
Presentation Summarizer: A Full-Fledged NLP ServicePresentation Summarizer: A Full-Fledged NLP Service
Presentation Summarizer: A Full-Fledged NLP Service
IRJET Journal
 
Transformer models for FER
Transformer models for FERTransformer models for FER
Transformer models for FER
IRJET Journal
 
IRJET- Extension to Visual Information Narrator using Neural Network
IRJET- Extension to Visual Information Narrator using Neural NetworkIRJET- Extension to Visual Information Narrator using Neural Network
IRJET- Extension to Visual Information Narrator using Neural Network
IRJET Journal
 
IRJET- Development of a Neural Network based Model for Construction Proje...
IRJET-  	  Development of a Neural Network based Model for Construction Proje...IRJET-  	  Development of a Neural Network based Model for Construction Proje...
IRJET- Development of a Neural Network based Model for Construction Proje...
IRJET Journal
 
2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...
2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...
2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...
SBGC
 
Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...
Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...
Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...
KTN
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Rafael Ferreira da Silva
 
Gayathri_Physical_Design_Intel
Gayathri_Physical_Design_IntelGayathri_Physical_Design_Intel
Gayathri_Physical_Design_Intelgaya3vijay
 
Software Architecture: Introduction to the abstraction (May 2014_Split)
Software Architecture: Introduction to the abstraction (May 2014_Split)Software Architecture: Introduction to the abstraction (May 2014_Split)
Software Architecture: Introduction to the abstraction (May 2014_Split)
Henry Muccini
 
Ieee projects 2012 for cse
Ieee projects 2012 for cseIeee projects 2012 for cse
Ieee projects 2012 for cse
SBGC
 
Ieee projects 2012 for cse
Ieee projects 2012 for cseIeee projects 2012 for cse
Ieee projects 2012 for cseSBGC
 
Algorithm Solved IEEE Projects 2012 2013 Java @ Seabirdssolutions
Algorithm Solved IEEE Projects 2012 2013 Java @ SeabirdssolutionsAlgorithm Solved IEEE Projects 2012 2013 Java @ Seabirdssolutions
Algorithm Solved IEEE Projects 2012 2013 Java @ Seabirdssolutions
SBGC
 
OpenACC Monthly Highlights Summer 2019
OpenACC Monthly Highlights Summer 2019OpenACC Monthly Highlights Summer 2019
OpenACC Monthly Highlights Summer 2019
OpenACC
 
Inception v4 vs Inception Resnet v2.pdf
Inception v4 vs Inception Resnet v2.pdfInception v4 vs Inception Resnet v2.pdf
Inception v4 vs Inception Resnet v2.pdf
ChauVVan
 
STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages
ijseajournal
 

Similar to Computational REST Meets Erlang (20)

Functional Verification of Large-integers Circuits using a Cosimulation-base...
Functional Verification of Large-integers Circuits using a  Cosimulation-base...Functional Verification of Large-integers Circuits using a  Cosimulation-base...
Functional Verification of Large-integers Circuits using a Cosimulation-base...
 
Software Architecture: introduction to the abstraction
Software Architecture: introduction to the abstractionSoftware Architecture: introduction to the abstraction
Software Architecture: introduction to the abstraction
 
CV_Swapnil_Deshmukh
CV_Swapnil_DeshmukhCV_Swapnil_Deshmukh
CV_Swapnil_Deshmukh
 
Presentation Summarizer: A Full-Fledged NLP Service
Presentation Summarizer: A Full-Fledged NLP ServicePresentation Summarizer: A Full-Fledged NLP Service
Presentation Summarizer: A Full-Fledged NLP Service
 
Transformer models for FER
Transformer models for FERTransformer models for FER
Transformer models for FER
 
IRJET- Extension to Visual Information Narrator using Neural Network
IRJET- Extension to Visual Information Narrator using Neural NetworkIRJET- Extension to Visual Information Narrator using Neural Network
IRJET- Extension to Visual Information Narrator using Neural Network
 
IRJET- Development of a Neural Network based Model for Construction Proje...
IRJET-  	  Development of a Neural Network based Model for Construction Proje...IRJET-  	  Development of a Neural Network based Model for Construction Proje...
IRJET- Development of a Neural Network based Model for Construction Proje...
 
2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...
2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...
2012 ieee projects software engineering @ Seabirds ( Trichy, Chennai, Pondich...
 
Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...
Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...
Digital Security by Design: Formal Verification with Broad-Spectrum ANSI-C Re...
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
 
Gayathri_Physical_Design_Intel
Gayathri_Physical_Design_IntelGayathri_Physical_Design_Intel
Gayathri_Physical_Design_Intel
 
Software Architecture: Introduction to the abstraction (May 2014_Split)
Software Architecture: Introduction to the abstraction (May 2014_Split)Software Architecture: Introduction to the abstraction (May 2014_Split)
Software Architecture: Introduction to the abstraction (May 2014_Split)
 
Geetika__Resume.
Geetika__Resume.Geetika__Resume.
Geetika__Resume.
 
Geetika__CV
Geetika__CVGeetika__CV
Geetika__CV
 
Ieee projects 2012 for cse
Ieee projects 2012 for cseIeee projects 2012 for cse
Ieee projects 2012 for cse
 
Ieee projects 2012 for cse
Ieee projects 2012 for cseIeee projects 2012 for cse
Ieee projects 2012 for cse
 
Algorithm Solved IEEE Projects 2012 2013 Java @ Seabirdssolutions
Algorithm Solved IEEE Projects 2012 2013 Java @ SeabirdssolutionsAlgorithm Solved IEEE Projects 2012 2013 Java @ Seabirdssolutions
Algorithm Solved IEEE Projects 2012 2013 Java @ Seabirdssolutions
 
OpenACC Monthly Highlights Summer 2019
OpenACC Monthly Highlights Summer 2019OpenACC Monthly Highlights Summer 2019
OpenACC Monthly Highlights Summer 2019
 
Inception v4 vs Inception Resnet v2.pdf
Inception v4 vs Inception Resnet v2.pdfInception v4 vs Inception Resnet v2.pdf
Inception v4 vs Inception Resnet v2.pdf
 
STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages
 

More from Alessandro Sivieri

Sesena 2012
Sesena 2012Sesena 2012
Sesena 2012
Alessandro Sivieri
 
LaTeX @ LinuxDay 2011
LaTeX @ LinuxDay 2011LaTeX @ LinuxDay 2011
LaTeX @ LinuxDay 2011
Alessandro Sivieri
 
KDE @ Corsi Linux 2011
KDE @ Corsi Linux 2011KDE @ Corsi Linux 2011
KDE @ Corsi Linux 2011
Alessandro Sivieri
 
LaTeX: gli editor
LaTeX: gli editorLaTeX: gli editor
LaTeX: gli editor
Alessandro Sivieri
 
Conferenza Embedded - Arduino
Conferenza Embedded - ArduinoConferenza Embedded - Arduino
Conferenza Embedded - Arduino
Alessandro Sivieri
 
Conferenza LyX - Introduzione a LaTeX
Conferenza LyX - Introduzione a LaTeXConferenza LyX - Introduzione a LaTeX
Conferenza LyX - Introduzione a LaTeX
Alessandro Sivieri
 
Tesi magistrale
Tesi magistraleTesi magistrale
Tesi magistrale
Alessandro Sivieri
 

More from Alessandro Sivieri (7)

Sesena 2012
Sesena 2012Sesena 2012
Sesena 2012
 
LaTeX @ LinuxDay 2011
LaTeX @ LinuxDay 2011LaTeX @ LinuxDay 2011
LaTeX @ LinuxDay 2011
 
KDE @ Corsi Linux 2011
KDE @ Corsi Linux 2011KDE @ Corsi Linux 2011
KDE @ Corsi Linux 2011
 
LaTeX: gli editor
LaTeX: gli editorLaTeX: gli editor
LaTeX: gli editor
 
Conferenza Embedded - Arduino
Conferenza Embedded - ArduinoConferenza Embedded - Arduino
Conferenza Embedded - Arduino
 
Conferenza LyX - Introduzione a LaTeX
Conferenza LyX - Introduzione a LaTeXConferenza LyX - Introduzione a LaTeX
Conferenza LyX - Introduzione a LaTeX
 
Tesi magistrale
Tesi magistraleTesi magistrale
Tesi magistrale
 

Recently uploaded

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 

Computational REST Meets Erlang

  • 1. Computational REST Meets Erlang Alessandro Sivieri Gianpaolo Cugola Carlo Ghezzi DeepSE Group Dipartimento di Elettronica e Informazione Politecnico di Milano 49th International Conference on Objects, Models, Components and Patterns June 30, 2011
  • 2. Introduction The CREST-Erlang architecture A performance assessment Conclusions 1 Introduction 2 The CREST-Erlang architecture 3 A performance assessment 4 Conclusions Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 2/21
  • 3. Introduction The CREST-Erlang architecture A performance assessment Conclusions Outline 1 Introduction 2 The CREST-Erlang architecture 3 A performance assessment 4 Conclusions Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 3/21
  • 4. Introduction The CREST-Erlang architecture A performance assessment Conclusions The scenario Today’s applications Large-scale and distributed on the Web Components running on different devices Services administered by different organizations Long time executions, without interruptions or failures We need frameworks able to Support scalability and reliability Guarantee isolation among components Offer mechanisms for dynamic update of functionalities Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 4/21
  • 5. Introduction The CREST-Erlang architecture A performance assessment Conclusions REpresentational State Transfer The model Client-server separation for scalability and portability of the code Stateless communication for reliability Caching mechanisms for scalability The generic interface Independence of applications on specific services Application data must be encoded in a standard format A host may not be able to correctly interpret these data Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 5/21
  • 6. Introduction The CREST-Erlang architecture A performance assessment Conclusions REpresentational State Transfer The model Client-server separation for scalability and portability of the code Stateless communication for reliability Caching mechanisms for scalability The generic interface Independence of applications on specific services Application data must be encoded in a standard format A host may not be able to correctly interpret these data Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 5/21
  • 7. Introduction The CREST-Erlang architecture A performance assessment Conclusions Computational REST Designed as a response to real world problems Adapts REST for an Internet of applications From a Web of data to a Web of computations Same REST principles, different key abstraction Erenkrantz, J.R., Computational REST: a new model for decentralized, Internet-scale applications, 2009 Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 6/21
  • 8. Introduction The CREST-Erlang architecture A performance assessment Conclusions Scheme Proposed as the lingua franca for the Web Functional language Native support for continuations History of uses for mobile code Drawbacks No native support for distributed applications The need to develop many CREST-related concepts (light processes, communication facilities . . . ) Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 7/21
  • 9. Introduction The CREST-Erlang architecture A performance assessment Conclusions Scheme Proposed as the lingua franca for the Web Functional language Native support for continuations History of uses for mobile code Drawbacks No native support for distributed applications The need to develop many CREST-related concepts (light processes, communication facilities . . . ) Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 7/21
  • 10. Introduction The CREST-Erlang architecture A performance assessment Conclusions Erlang Erlang as the lingua franca for the Web Fault-tolerance and “hot” code update Distributed applications with an actor-like concurrency model Design patterns (generic server, supervisor . . . ) Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 8/21
  • 11. Introduction The CREST-Erlang architecture A performance assessment Conclusions Outline 1 Introduction 2 The CREST-Erlang architecture 3 A performance assessment 4 Conclusions Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 9/21
  • 12. Introduction The CREST-Erlang architecture A performance assessment Conclusions Overview The main architecture Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 10/21
  • 13. Introduction The CREST-Erlang architecture A performance assessment Conclusions A service example 1 m y _ s e r v i c e ( S t a t e ) −> 2 receive 3 { Pid , [ {" p a r 1 " , P1} , . . . {" parN " , PN} ] } −> 4 % Do y o u r j o b a c c e s s i n g par1 , . . . parN % 5 % e v e n t u a l l y c r e a t e a new s t a t e % 6 7 % I f n e c e s s a r y , spawn m y s e l f on a h o s t % 8 invoke_spawn ( Hostname , ?MODULE, 9 f u n ( ) −> m y _ s e r v i c e ( NewState ) end ) , 10 11 % F i n i s h with a t a i l r e c u r s i o n % 12 m y _ s e r v i c e ( NewState ) 13 end . Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 11/21
  • 14. Introduction The CREST-Erlang architecture A performance assessment Conclusions So far so good Full implementation of the Computational REST architectural style Erlang is the proposed language of choice for a Web of computations Minor development effort CREST-Erlang prototype outperforms the CREST-Scheme one Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 12/21
  • 15. Introduction The CREST-Erlang architecture A performance assessment Conclusions Security concerns The problem Mobile code may cause two kinds of problems: Security of the host with respect to the code Security of the code with respect to the host Neither of these have found, as of today, a stable solution. Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 13/21
  • 16. Introduction The CREST-Erlang architecture A performance assessment Conclusions CREST security proposals CREST-Scheme JVM sandbox (implemented) Bytecode inspection and self-certifying URLs (ideas) CREST-Erlang Trusted network: mutual authentication with SSL. Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 14/21
  • 17. Introduction The CREST-Erlang architecture A performance assessment Conclusions CREST security proposals CREST-Scheme JVM sandbox (implemented) Bytecode inspection and self-certifying URLs (ideas) CREST-Erlang Trusted network: mutual authentication with SSL. In both cases they are not enough. Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 14/21
  • 18. Introduction The CREST-Erlang architecture A performance assessment Conclusions Outline 1 Introduction 2 The CREST-Erlang architecture 3 A performance assessment 4 Conclusions Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 15/21
  • 19. Introduction The CREST-Erlang architecture A performance assessment Conclusions Implementation effort Stateful and stateless services Service composition Framework Framework source code Demo source code CREST-Scheme 5938 817 CREST-Erlang 2957 768 # of lines of code comparison Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 16/21
  • 20. Introduction The CREST-Erlang architecture A performance assessment Conclusions Performances CREST-Scheme demo performances (a) Response time (b) Throughput There is no caching mechanism. Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 17/21
  • 21. Introduction The CREST-Erlang architecture A performance assessment Conclusions Performances Test application performances (a) Response time (b) Throughput There is no caching mechanism. Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 17/21
  • 22. Introduction The CREST-Erlang architecture A performance assessment Conclusions Outline 1 Introduction 2 The CREST-Erlang architecture 3 A performance assessment 4 Conclusions Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 18/21
  • 23. Introduction The CREST-Erlang architecture A performance assessment Conclusions CREST-Erlang Erlang Native support for distribution concurrency fault-tolerance The security problem Computational REST A possible evolution addressing the growing presence of applications interfacing through the Web Is HTTP the right protocol for transmitting computations? Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 19/21
  • 24. Introduction The CREST-Erlang architecture A performance assessment Conclusions CREST-Erlang Erlang Native support for distribution concurrency fault-tolerance The security problem Computational REST A possible evolution addressing the growing presence of applications interfacing through the Web Is HTTP the right protocol for transmitting computations? Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 19/21
  • 25. Introduction The CREST-Erlang architecture A performance assessment Conclusions Future work Caching mechanism, for improving performances especially for static content Introduce the concept of subpeer, part of the latest CREST definition Add more security mechanisms, for example for avoiding possible attacks to a host Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 20/21
  • 26. Introduction The CREST-Erlang architecture A performance assessment Conclusions Thank you Questions? Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 21/21
  • 27. Appendix Related works Dynamic adaptation Publish-subscribe Map-reduce Web applications REST Service-Oriented Architecture Context-oriented languages ContextErlang Dynamic Aspect-Oriented Programming Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 1/4
  • 28. Appendix Selected bibliography J.R. Erenkrantz. Computational REST: a new model for decentralized, Internet-scale applications. California State University at Long Beach, 2009. R.N. Taylor, P. Oreizy and N. Medvidovic. Runtime software adaptation: framework, approaches, and styles. ICSE Companion 2008, 899–910, 2008. J. Armstrong. Programming Erlang: Software for a Concurrent World. Pragmatic Bookshelf, 2007. J. Zachary. Protecting mobile code in the world. Internet Computing, IEEE, 7(2):78–82, 2003. Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 2/4
  • 29. Appendix Code The CREST-Erlang code can be found at: https://github.com/sivieri/crest-erlang Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 3/4
  • 30. Appendix Licenses This presentation is licensed under: The image on slide 21 can be found at: www.flickr.com/photos/29890539@N07/4648496819/ Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 4/4