Computational REST Meets Erlang
Upcoming SlideShare
Loading in...5
×
 

Computational REST Meets Erlang

on

  • 2,578 views

Presentation given at TOOLS Europe 2011 in Zurich, on June 30, 2011. This work has been developed during my M.Sc. thesis in Politecnico di Milano.

Presentation given at TOOLS Europe 2011 in Zurich, on June 30, 2011. This work has been developed during my M.Sc. thesis in Politecnico di Milano.

Statistics

Views

Total Views
2,578
Views on SlideShare
2,377
Embed Views
201

Actions

Likes
1
Downloads
31
Comments
0

6 Embeds 201

http://sivieri.wordpress.com 194
http://www.slideshare.net 2
url_unknown 2
http://translate.googleusercontent.com 1
http://duckduckgo.com 1
https://sivieri.wordpress.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NoDerivs LicenseCC Attribution-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Computational REST Meets Erlang Computational REST Meets Erlang Presentation Transcript

  • Computational REST Meets ErlangAlessandro 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 Conclusions1 Introduction2 The CREST-Erlang architecture3 A performance assessment4 Conclusions Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 2/21
  • Introduction The CREST-Erlang architecture A performance assessment ConclusionsOutline 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 ConclusionsThe 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 ConclusionsREpresentational 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 ConclusionsREpresentational 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 ConclusionsComputational 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 ConclusionsScheme 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 ConclusionsScheme 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 ConclusionsErlang 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 ConclusionsOutline 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 ConclusionsOverview The main architecture Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 10/21
  • Introduction The CREST-Erlang architecture A performance assessment ConclusionsA 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 ) ,1011 % 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 ConclusionsSo 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 ConclusionsSecurity 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 ConclusionsCREST 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 ConclusionsCREST 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 ConclusionsOutline 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 ConclusionsImplementation 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 ConclusionsPerformances 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 ConclusionsPerformances 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 ConclusionsOutline 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 ConclusionsCREST-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 ConclusionsCREST-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 ConclusionsFuture 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 ConclusionsThank you Questions? Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 21/21
  • AppendixRelated 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
  • AppendixSelected 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
  • AppendixCode The CREST-Erlang code can be found at: https://github.com/sivieri/crest-erlang Sivieri, Cugola, Ghezzi Computational REST Meets Erlang 3/4
  • AppendixLicenses 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