FraSCAti Adaptive and Reflective Middleware of Middleware

1,274
-1

Published on

Tutorial presented during ACM/IFIP/USENIX 12th International Middleware Conference, Lisbon, Portugal, 13th December 2011.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,274
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

FraSCAti Adaptive and Reflective Middleware of Middleware

  1. 1. FraSCAti Adaptive and Reflective Middleware of Middleware Philippe Merle (Inria), Romain Rouvoy (U. Lille), Lionel Seinturier (U. Lille) ACM/IFIP/USENIX 12th International Middleware Conference, Lisbon, Portugal, 13th December 2011
  2. 2. Outline <ul><li>Towards Middleware of Middleware </li></ul><ul><li>Service Component Architecture – SCA </li></ul><ul><li>OW2 FraSCAti </li></ul><ul><li>Live demo and exercices </li></ul>
  3. 3. Towards Middleware of Middleware
  4. 4. Middleware Application Operating System Application Operating System Network Middleware © 2003-2008, S. Krakowiak High level API Low level API
  5. 5. Middleware <ul><li>+ High level abstractions and API </li></ul><ul><li>+ Heterogeneity hidden </li></ul><ul><li>+ Transparent distribution </li></ul><ul><li>+ General purpose services </li></ul>Application Operating System Application Operating System Network Middleware © 2003-2008, S. Krakowiak High level API Low level API
  6. 6. But a phetora of middleware <ul><li>CORBA </li></ul><ul><li>Web Services </li></ul><ul><li>REST </li></ul><ul><li>… </li></ul>Application Operating System Application Operating System Network Middleware © 2003-2008, S. Krakowiak High level API Low level API
  7. 7. CORBA middleware Application Operating System Application Operating System Network Middleware OMG IDL Low level API © 2003-2008, S. Krakowiak IIOP Components Objects
  8. 8. Web Services middleware Application Operating System Application Operating System Network Middleware WSDL Low level API © 2003-2008, S. Krakowiak SOAP Services
  9. 9. REST-based middleware Application Operating System Application Operating System Network Middleware URI CRUD Verbs MIME Low level API © 2003-2008, S. Krakowiak Mainly HTTP Resources
  10. 10. New operating systems Application Operating System Application Operating System Network Middleware © 2003-2008, S. Krakowiak IaaS PaaS High level API Low level API
  11. 11. Middleware of Middleware <ul><li>There is no universal middleware </li></ul><ul><ul><li>All applications don ’ t use a unique middleware </li></ul></ul><ul><li>New middleware appears </li></ul><ul><ul><li>How to integrate them? </li></ul></ul><ul><li>Old middleware declines </li></ul><ul><ul><li>How to migrate to other? </li></ul></ul><ul><li>Applications require components, services, resources, etc. </li></ul><ul><ul><li>How to combine different paradigms? </li></ul></ul>
  12. 12. Four challenges <ul><li>Structuring reusable flexible architectures </li></ul><ul><ul><ul><ul><li>Combining different paradigms </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Reusing existing and future middleware </li></ul></ul></ul></ul><ul><li>Interoperability </li></ul><ul><ul><li>Orchestrate heterogeneous applications </li></ul></ul><ul><ul><ul><li>The weather of the city where a Twitter user lives? </li></ul></ul></ul><ul><ul><ul><ul><li>REST Twitter user account + SOAP weather service </li></ul></ul></ul></ul><ul><li>Integration </li></ul><ul><ul><li>Compose heterogeneous piece of software to build a new application </li></ul></ul><ul><ul><ul><li>e.g., compose a BPEL process, an OSGi bundle and a Xquery script </li></ul></ul></ul><ul><li>Dynamically reconfigurable runtime architectures </li></ul><ul><ul><li>research challenge #1 in Service foundations [Papazoglou 07] </li></ul></ul>You want SCA and FraSCAti!
  13. 13. Service Component Architecture
  14. 14. Service Component Architecture (SCA) <ul><li>Technology- agnotic OASIS standard component-based programming model for SOA </li></ul>Network Network Sec. Trans. log
  15. 15. Service Component Architecture (SCA) An OASIS’s standard programming model for SOA <ul><li>Technology-agnostic, adaptability, variability </li></ul><ul><ul><li>Interface languages (Java, WSDL, OMG IDL, etc.) </li></ul></ul><ul><ul><li>Implementation languages (Java, Spring, OSGi, BPEL, C/C++, etc.) </li></ul></ul><ul><ul><li>Binding protocols (WS, REST, JSON-RPC, Java RMI, CORBA, etc.) </li></ul></ul><ul><ul><li>Non functional aspects, aka SCA intents and policies </li></ul></ul><ul><ul><li>Packaging formats and deployment targets (JAR, JBI, WAR, OSGi, etc.) </li></ul></ul>Network Network Sec. Trans. log
  16. 16. SCA in a Nutshell (cont ’ d) <ul><li>Component implements the business logic </li></ul><ul><li>Concepts </li></ul><ul><ul><li>Service(s) </li></ul></ul><ul><ul><ul><li>Interface type: Java , WSDL </li></ul></ul></ul><ul><ul><li>Reference(s) </li></ul></ul><ul><ul><li>Property(s) </li></ul></ul><ul><ul><li>Implementation </li></ul></ul><ul><ul><li>Non functional property(s) </li></ul></ul><ul><ul><ul><li>Intent & policy </li></ul></ul></ul>intent
  17. 17. SCA in a Nutshell (cont ’ d) <ul><li>Assembly : ”Process of composing business applications by configuring and connecting components that provide service implementations” [SCA Whitepaper] </li></ul><ul><li>2 Levels : </li></ul><ul><li>Module assembly </li></ul><ul><ul><li>Closely coupled </li></ul></ul><ul><ul><li>See figure </li></ul></ul><ul><li>System assembly </li></ul><ul><ul><li>Loosely Coupled </li></ul></ul>
  18. 18. SCA in a Nutshell (cont ’ d) Warehouse Service WarehouseComposite Warehouse Broker Component Warehouse Component Order Processing Service OrderProcessing Component Shipping Reference External Warehouse Reference Payments Component Payment Service AccountsComposite External Banking Reference Accounts Ledger Component BPEL Java EE C++ SOAP/HTTP JMS RMI/IIOP Mixed: - technologies - app locations Multi-level composition Loosely coupled Loosely coupled Closely coupled Entry Points Entry Points External Service External Service External Services Binding Wire Wire
  19. 19. Modelling with Eclipse SCA Tools
  20. 20. SCA Hello World Example
  21. 21. SCA Hello World Example (cont’d)
  22. 22. SCA Hello World Example (cont’d)
  23. 23. SCA Hello World Example (cont’d)
  24. 24. SCA Hello World Example (cont’d)
  25. 25. SCA Hello World Example (cont’d)
  26. 26. SCA Hello World Example (cont’d)
  27. 27. SCA Hello World Example (cont’d)
  28. 28. SCA Hello World Example (cont’d)
  29. 29. Crisis Management Orchestration BPEL script Java OSGi
  30. 30. SCA Benefits <ul><li>A component model… </li></ul><ul><ul><li>Hierarchical compositions </li></ul></ul><ul><ul><li>Configurable properties </li></ul></ul><ul><ul><li>Provided/required ports </li></ul></ul><ul><ul><li>Communication bindings </li></ul></ul><ul><ul><li>Intent and policy supports </li></ul></ul><ul><ul><li>Synchronous/asynchronous invocations </li></ul></ul><ul><li>… for SOA </li></ul><ul><ul><li>OASIS standard </li></ul></ul><ul><ul><li>Industry acceptance: Apache Tuscany, IBM WebSphere, Eclipse, … </li></ul></ul><ul><li>5 degrees of flexibility / adaptability </li></ul><ul><ul><li>Implementation languages (Java, C++, BPEL, etc.) </li></ul></ul><ul><ul><li>Interface description languages (Java, WSDL, etc.) </li></ul></ul><ul><ul><li>Communication protocols (SOAP, IIOP, etc.) </li></ul></ul><ul><ul><li>Non-functional properties (security, transactions, etc.) </li></ul></ul><ul><ul><li>Packaging formats (ZIP, OSGi bundles, WAR, etc.) </li></ul></ul>
  31. 31. SCA Limitations <ul><li>Static configuration & deployment </li></ul><ul><ul><li>XML file for describing composite applications </li></ul></ul><ul><ul><li>Lack of deployment API </li></ul></ul><ul><li>No runtime adaptation & reconfiguration </li></ul><ul><ul><li>Lack of introspection API </li></ul></ul><ul><ul><li>Lack of reconfiguration API </li></ul></ul><ul><li>SCA is not a reflective component model </li></ul>You want FraSCAti!
  32. 32. FraSCAti
  33. 33. FraSCAti Overview <ul><li>A framework for interoperability and integration </li></ul><ul><ul><li>SCA + extensions </li></ul></ul><ul><li>A reflective SCA component model and framework </li></ul><ul><ul><li>Runtime adaptability </li></ul></ul><ul><li>A Software Product Line for SCA </li></ul><ul><ul><li>Highly “ à la carte ” , on-demand, modular, configurable, extensible </li></ul></ul><ul><li>Components everywhere </li></ul><ul><ul><li>At any software granularity </li></ul></ul><ul><li>An open source implementation </li></ul><ul><ul><li>LGPLv2 at http://frascati.ow2.org </li></ul></ul>
  34. 34. Interoperability and Integration
  35. 35. Interoperability with FraSCAti <ul><li>SCA compliance </li></ul><ul><ul><li>Web Service / SOAP / WSDL </li></ul></ul><ul><ul><ul><li>via Apache CXF </li></ul></ul></ul><ul><ul><li>JMS </li></ul></ul><ul><ul><ul><li>via OW2 JORAM </li></ul></ul></ul><ul><li>Beyond SCA </li></ul><ul><ul><li>REST / WADL </li></ul></ul><ul><ul><ul><li>Via Apache CXF </li></ul></ul></ul><ul><ul><li>JSON-RPC </li></ul></ul><ul><ul><li>UPnP </li></ul></ul><ul><ul><li>Java RMI </li></ul></ul><ul><ul><li>JGroups </li></ul></ul>
  36. 36. Integration with FraSCAti <ul><li>SCA compliance </li></ul><ul><ul><li>SCA composite </li></ul></ul><ul><ul><li>Java POJO and @SCA </li></ul></ul><ul><ul><li>BPEL </li></ul></ul><ul><ul><li>Spring </li></ul></ul><ul><li>Beyond SCA </li></ul><ul><ul><li>Fractal </li></ul></ul><ul><ul><li>OSGi </li></ul></ul><ul><ul><li>Script </li></ul></ul><ul><ul><ul><li>BeanShell, Fscript, Groovy, JavaScript, Jython, Jruby, Xquery </li></ul></ul></ul><ul><ul><li>Scala </li></ul></ul><ul><ul><li>Velocity templates </li></ul></ul><ul><ul><li>HTTP servlet binding </li></ul></ul><ul><ul><li>C interface/implementation/binding </li></ul></ul>
  37. 37. An open middleware of middleware framework Middleware for integrating middleware Apache CXF SOA stack (WS, REST) Spring Framework OSGi Apache Felix Equinox OW2 PEtALS JBI ESB Java RMI JSON RPC Java Script Engines Easy BPEL Engine . . . JMS JORAM Interoperability Integration
  38. 38. Reflective Component Model
  39. 39. An open reflective SCA platform Reflective SCA component model Middleware for integrating middleware Ad-hoc manual & anticipated scripted reconfiguration Apache CXF SOA stack (WS, REST) Spring Framework OSGi Apache Felix Equinox OW2 PEtALS JBI ESB Java RMI JSON RPC Java Script Engines Easy BPEL Engine . . . JMS JORAM API Interoperability Integration FraSCAti JMX FraSCAti REST API FraSCAti Explorer FraSCAti FScript
  40. 40. FraSCAti API & Runtime <ul><li>API = SCA API + 100% Fractal API + 3 new controllers </li></ul><ul><ul><li>SCA properties </li></ul></ul><ul><ul><li>SCA intents </li></ul></ul><ul><ul><li>SCA contents </li></ul></ul><ul><ul><li>See http://frascati.ow2.org/RECONF-API/ </li></ul></ul><ul><li>Tinfi = Julia - ASM + Juliac + new SCA membranes </li></ul><ul><ul><li>FraSCAti components also Fractal/Julia components </li></ul></ul><ul><ul><li>Java source generation for membranes </li></ul></ul>
  41. 41. FraSCAti Explorer - an SCA microscope
  42. 42. More than just an SCA microscope
  43. 43. FraSCAti JMX
  44. 44. FraSCAti REST EMF-based metamodel
  45. 45. REST-based introspection
  46. 46. Reconfiguring SCA applications with <ul><li>Interactively via FraSCAti Explorer or JMX or REST </li></ul><ul><li>Programmatically via FraSCAti API or FScript/FPath [P.C. David PhD 2005] </li></ul>
  47. 47. Fscript/Fpath for SCA <ul><li>composite = $domain/scachild::MyComposite; </li></ul><ul><li>account = $composite/scachild::AccountFacade; </li></ul><ul><li>accountRef = $account/scareference::AccountData; </li></ul><ul><li>stop ($account); // (1) </li></ul><ul><li>unwire ($accountRef); // (2) </li></ul><ul><li>newAccountData = sca-new («NewAccountDataServiceComponent»); // (3a) </li></ul><ul><li>add ($composite, $newAccountData); // (3b) </li></ul><ul><li>wire ($accountRef, $newAccountData/scaservice::Data); // (4) </li></ul><ul><li>start ($account); // (5) </li></ul>
  48. 48. Reflective SCA component model Middleware for integrating middleware Ad-hoc manual & anticipated scripted reconfiguration Apache CXF SOA stack (WS, REST) Spring Framework OSGi Apache Felix Equinox OW2 PEtALS JBI ESB Java RMI JSON RPC Java Script Engines Easy BPEL Engine . . . JMS JORAM API Interoperability Integration FraSCAti JMX FraSCAti REST API FraSCAti Explorer FraSCAti FScript
  49. 49. FraSCAti Aspect Components (FAC) <ul><li>Non functional concerns as shared & reflective FraSCAti composites </li></ul><ul><li>Dynamic AOP for crosscutting concerns </li></ul><ul><li>Reuse [N. Pessemier PhD 2007] </li></ul>
  50. 50. A FraSCAti Aspect Component
  51. 51. A FraSCAti Intent Implementation <ul><li>public class MyIntentHandler implements org.ow2.frascati.tinfi.api. IntentHandler { </li></ul><ul><li>public Object invoke (org.ow2.frascati.tinfi.api. IntentJoinPoint ijp) throws Throwable </li></ul><ul><li>{ </li></ul><ul><li>// Before the invocation. </li></ul><ul><li>Object ret = ijp.proceed (); </li></ul><ul><li>// After the invocation. </li></ul><ul><li>return ret; </li></ul><ul><li>} } </li></ul>
  52. 52. FraSCAti UML Diagram Sequence Aspect
  53. 53. FraSCAti UML Sequence Diagram Aspect Components
  54. 54. Software Product Line
  55. 55. OW2 FraSCAti « à la carte » <ul><li>Support the extensible nature of SCA </li></ul><ul><ul><li><sca:implementation> </li></ul></ul><ul><ul><li><sca:interface> </li></ul></ul><ul><ul><li><sca:binding> </li></ul></ul><ul><ul><li>SCA intents </li></ul></ul><ul><li>Select the right subset of FraSCAti features to meet application requirements and system constraints </li></ul><ul><li>Add new application-specific FraSCAti features </li></ul>
  56. 56. OW2 FraSCAti SPL <ul><li>Highly “ à la carte ” , on-demand, configurable, and extensible </li></ul><ul><ul><ul><li>Both application requirements and target system constraints </li></ul></ul></ul><ul><li>Design View </li></ul><ul><ul><li>63 features </li></ul></ul><ul><ul><ul><li>18 mandatory </li></ul></ul></ul><ul><ul><ul><li>45 optional </li></ul></ul></ul><ul><li>Implementation View </li></ul><ul><ul><li>46+ Maven modules </li></ul></ul><ul><ul><ul><li>Mandatory features grouped into few modules </li></ul></ul></ul><ul><ul><ul><li>One module by optional feature </li></ul></ul></ul><ul><li>Execution View </li></ul><ul><ul><li>13 composites and 91 components </li></ul></ul><ul><li>1 684 077 600 distinct configurations </li></ul><ul><li>Online at http://frascati.ow2.org/doc/1.4/ch12.htm </li></ul>
  57. 57. Various Features in OW2 FraSCAti <ul><li>33 for SCA developers </li></ul><ul><ul><li><implementation.bpel>, … </li></ul></ul><ul><ul><li><interface.wsdl>, … </li></ul></ul><ul><ul><li><binding.ws>, … </li></ul></ul><ul><ul><li>Property XML, … </li></ul></ul><ul><li>5 for FraSCAti users </li></ul><ul><ul><li>Compiler/launcher </li></ul></ul><ul><ul><li>Tools: Explorer, FScript, JMX, Remote Management </li></ul></ul><ul><li>25 internals to FraSCAti </li></ul><ul><ul><li>Supported metamodels </li></ul></ul><ul><ul><li>Membrane generators </li></ul></ul><ul><ul><li>Supported Java compilers </li></ul></ul><ul><ul><li>Membrane factories </li></ul></ul>
  58. 58. OW2 FraSCAti Feature Diagram
  59. 59. OW2 FraSCAti at S.P.L.O.T.
  60. 60. OW2 FraSCAti Main Modules sca-parser.jar component-factory.jar assembly-factory.jar
  61. 61. All OW2 FraSCAti Modules Remote Management Binding REST Binding JSON-RPC Implementation Resource Binding Factory Implementation Fractal Binding Java RMI MM FraSCAti Fscript Sca Parser … Implementation FScript Implementation JavaScript Implementation JRuby Implementation Jython Knopflerfish Equinox Apache Felix Implementation Script Implementation OSGi MG + MF Implementation Spring Implementation Xquery Implementation BeanShell Implementation Groovy Interface Native JMX MF Julia MM Native Property JAXB Binding JNA Implementation BPEL Membrane Generation MM UPnP Binding UPnP Explorer MM Tuscany Binding WS Binding JMS Interface WSDL JDT JDK6 Component Factory … Assembly Factory … MG Tinfi Binding HTTP MF Tinfi
  62. 62. Root OW2 FraSCAti SCA Composite Assembly Factory Sca Parser Component Factory Binding Factory Explorer Fscript JMX Remote Management
  63. 63. OW2 FraSCAti Assembly Factory Assembly Factory Implementations Composite Java Fractal Spring OSGi Resource Script BPEL Interfaces Java WSDL Native Bindings SCA WS UPnP REST JSON-RPC JMS HTTP Java RMI JNA Java XSD JAXB Properties
  64. 64. Self-introspecting with FraSCAti Explorer
  65. 65. Self-introspecting with FraSCAti JMX
  66. 66. FraSCAti « à la carte » disk footprint
  67. 67. Use Case
  68. 68. EasyESB <ul><li>http://research.petalslink.org/display/easyesb </li></ul>
  69. 69. EasyESB <ul><li>http://research.petalslink.org/display/easyesb </li></ul>
  70. 70. <ul><li>http://research.petalslink.org/display/easyesb </li></ul>EasyESB
  71. 71. EasyBPEL http://research.petalslink.org/display/easybpel
  72. 72. EasyViper http://research.petalslink.org/display/easyviper
  73. 73. Reflective EasyBPEL
  74. 74. In the Clouds
  75. 75. A phethora of heterogeneous clouds
  76. 76. OW2 FraSCAti in the Clouds <ul><li>IaaS supported </li></ul><ul><ul><li>Amazon EC2 </li></ul></ul><ul><li>PaaS supported </li></ul><ul><ul><li>Amazon Elastic Beanstalk </li></ul></ul>
  77. 77. IaaS PaaS SaaS Amazon Elastic Beanstalk Peer-to-peer monitoring application EC2
  78. 78. OW2 FraSCAti Online Demonstration <ul><li>Go to http://frascati.ow2.org </li></ul><ul><li>Click on « supported Cloud providers » </li></ul><ul><li>Click on « OW2 FraSCAti in … » </li></ul>
  79. 79. Conclusion
  80. 80. Component Reflection everywhere AOP SPL DSL for reconfiguration everywhere Fractal
  81. 81. What you should keep in mind about <ul><li>A middleware of middleware </li></ul><ul><ul><li>SOA interoperability and integration </li></ul></ul><ul><li>A reflective component model for SOA [SCC’09, SPE’11] </li></ul><ul><ul><li>FraSCAti = SCA + Fractal + FAC + CBM </li></ul></ul><ul><li>A software product line for SCA </li></ul><ul><ul><li>Highly “ à la carte ” , on-demand, modular, configurable and extensible </li></ul></ul><ul><li>At any software granularity </li></ul><ul><ul><li>SOA applications </li></ul></ul><ul><ul><li>Non functional crosscutting concerns, aka SCA intents </li></ul></ul><ul><ul><li>FraSCAti and its plugins </li></ul></ul><ul><ul><li>Component-based reflective membranes </li></ul></ul><ul><ul><li>New middleware, e.g., EasyESB/EasyBPEL/EasyViper </li></ul></ul>
  82. 82. FraSCAti, what else? <ul><li>Visit http://frascati.ow2.org </li></ul><ul><li>Contact </li></ul><ul><ul><li>Philippe Merle: [email_address] </li></ul></ul><ul><ul><li>Romain Rouvoy [email_address] </li></ul></ul><ul><ul><li>Lionel Seinturier: [email_address] </li></ul></ul>
  83. 83. SCA References <ul><li>SCA Specifications </li></ul><ul><ul><li>OpenSOA http://www.osoa.org </li></ul></ul><ul><ul><li>OASIS OpenSCA http://www.oasis-opencsa.org </li></ul></ul><ul><li>OSS Implementations </li></ul><ul><ul><li>Tuscany http://tuscany.apache.org </li></ul></ul><ul><ul><li>Newton http://newton.codecauldron.org/site/index.html </li></ul></ul><ul><ul><li>Fabric3 http://xircles.codehaus.org/projects/fabric3 </li></ul></ul><ul><ul><li>FraSCAti http://frascati.ow2.org </li></ul></ul><ul><li>SCA Resources </li></ul><ul><ul><li>http://www.osoa.org/display/Main/SCA+Resources </li></ul></ul><ul><ul><li>http://www-128.ibm.com/developerworks/library/specification/ws-sca </li></ul></ul><ul><ul><li>http://www.davidchappell.com/articles/Introducing_SCA.pdf </li></ul></ul><ul><ul><li>http://www-128.ibm.com/developerworks/websphere/techjournal/0510_brent/0509_brent.html </li></ul></ul><ul><ul><li>http://events.oasis-open.org/home/sites/events.oasis-open.org.home/files/Flexible_Agile_Composition_01.ppt [Mike Edwards] </li></ul></ul><ul><ul><li>http://www.osoa.org/download/attachments/250/Power_Combination_SCA_Spring_OSGi.pdf?version=3 </li></ul></ul>
  84. 84. Acknowledgements <ul><li>Slides from </li></ul><ul><ul><li>Philippe Merle - Inria </li></ul></ul><ul><ul><li>Lionel Seinturier – University of Lille </li></ul></ul><ul><ul><li>Romain Rouvoy – University of Lille </li></ul></ul><ul><ul><li>Rémi Melisson – Orange Labs </li></ul></ul><ul><ul><li>Rémi Druilhe – Orange Labs </li></ul></ul><ul><li>All FraSCAti team members </li></ul><ul><ul><li>Christophe Demarey (Inria), Michel Dirix (Inria), Nicolas Dolet (Inria), Damiel Fournier (Inria), Christophe Munilla (Inria), Nicolas Petitprez (Inria), Valerio Schiavoni (Inria), Guillaume Surrel (ScalAgent) </li></ul></ul><ul><ul><li>Mahmoud Ben Hassine ( Inria ), Pierre Carton (Inria), Jonathan Labejof (Thalès), Adel Noureddine ( Inria ), Russel Nzekwa ( Inria ), Nicolas Pessemier ( Inria ), Clément Quinton ( Inria ), Daniel Romero ( Inria ) </li></ul></ul><ul><ul><li>… </li></ul></ul>

×