Reusing cloud-based services with TOSCA A. Brogi, J. Soldani Computer Science Department University of Pisa CLOUDCYCLE14 Stuttgart, Germany September 22nd, 2014 Jacopo Soldani 1
Outline Introduction Background» TOSCA» Matching cloud services with TOSCA Reusing cloud-based services with TOSCA» Adaptation of plug-in matching services» Adaptation of NON plug-in matching services Conclusions and Outlook Jacopo Soldani 2
Introduction Reuse in the context of cloud SBAs Reusing the available SW stack would avoid us to design and develop it from scratch. Jacopo Soldani 3
Introduction Reuse in the context of cloud SBAs (2) What do we need to achieve the reuse of cloud SBAs?» A suitable representation of such kind of applications. TOSCA [1]» A way to understand which applications can be reused. Matching cloud services with TOSCA [2]» A methodology to easily and effectively reuse these applications. Our contribution! [1] OASIS. Topology and Orchestration Specification for Cloud Applications (TOSCA), Version 1.0. http://docs.oasis-open.org/tosca/tosca/v1.0/tosca-v1.0.pdf, 2013. [2] A. Brogi, and J. Soldani. Matching cloud services with TOSCA. Advances in Service-Oriented and Cloud Computing, CCIS, vol. 393. Springer, 2013. Jacopo Soldani 4
Outline Introduction Background» TOSCA» Matching cloud services with TOSCA Reusing cloud-based services with TOSCA» Adaptation of plug-in matching services» Adaptation of NON plug-in matching services Conclusions and Outlook Jacopo Soldani 5
TOSCA TOSCA [1] (Topology and Orchestration Specification for Cloud Applications) is an OASIS standard whose goals are» to enable the creation of portable cloud applications, and» the automation of their deployment/management. To do so, TOSCA provides a standardized metamodel for describing cloud services. [1] OASIS. Topology and Orchestration Specification for Cloud Applications (TOSCA), Version 1.0. http://docs.oasis-open.org/tosca/tosca/v1.0/tosca-v1.0.pdf, 2013. Jacopo Soldani 6
TOSCA Metamodel for describing cloud services Each cloud service is represented as a ServiceTemplate. Jacopo Soldani 7
TOSCA An example A very simple example of TOSCA ServiceTemplate is illustrated below. White-box viewpoint Black-box viewpoint Jacopo Soldani 8
Matching cloud services with TOSCA A NodeType can be made concrete by substituting it by a matching ServiceTemplate [3] nevertheless, no formal definition of «matching» is given. [3] OASIS. Topology and Orchestration Specification for Cloud Applications (TOSCA) Primer, Version 1.0. http://docs.oasis-open.org/tosca/tosca-primer/v1.0/tosca-primer-v1.0.pdf, 2013. Jacopo Soldani 9
Matching cloud services with TOSCA Exact matching Intuitively speaking: a ServiceTemplate S exactly matches [2] a NodeType N (S N) iff S and N expose the same features. [2] A. Brogi, and J. Soldani. Matching cloud services with TOSCA. Advances in Service-Oriented and Cloud Computing, CCIS, vol. 393. Springer, 2013. Jacopo Soldani 10
Matching cloud services with TOSCA Plug-in matching Intuitively speaking: a ServiceTemplate S plug-in matches [2] a NodeType N (S N) iff S «requires less» and «offers more» than N [2] A. Brogi, and J. Soldani. Matching cloud services with TOSCA. Advances in Service-Oriented and Cloud Computing, CCIS, vol. 393. Springer, 2013. Jacopo Soldani 11
Outline Introduction Background» TOSCA» Matching cloud services with TOSCA Reusing cloud-based services with TOSCA» Adapting plug-in matching services» Adapting of NON plug-in matching services Conclusions and Outlook Jacopo Soldani 12
Plug-in matching services Consider the NodeType N1 and the ServiceTemplate S such that S N1. How can we adapt S so as to exact match N1 (and thus reuse S in place of N1)? Jacopo Soldani 13
Plug-in matched services Step-wise adaptation methodology To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (1) Create a new ServiceTemplate news which initially contains the matched ServiceTemplate S as the only NodeTemplate in its topology. Jacopo Soldani 14
Plug-in matched services Step-wise adaptation methodology (2) To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (2) For each capability (property) of N, define a capability (property) with the same name and type on the boundaries of news, and map it onto the corresponding of S. (3) For each interface i of N, declare a new interface with the same name and operations on the boundaries of news, and map each operation onto the corresponding of S. Jacopo Soldani 15
Plug-in matched services Step-wise adaptation methodology (3) To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (4) Add a NodeTemplate NoBe (whose capabilities satisfy the requirements of S and whose requirements are the same of N) to the topology of news. (5) For each requirement of N, define a requirement with the same name and type on the boundaries of news, and map it onto the corresponding one of NoBe. Jacopo Soldani 16
Non plug-in matching services Consider now the NodeType N2 and the ServiceTemplate S such that S N2. Can we still adapt S so as to exact match N2 (and thus reuse S in place of N2)? Jacopo Soldani 17
Non plug-in matched services Step-wise adaptation methodology To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (1) Create a new ServiceTemplate news which initially contains the matched ServiceTemplate S as the only NodeTemplate in its topology. Jacopo Soldani 18
Non plug-in matched services Step-wise adaptation methodology (2) To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (2) For each capability c (property p) of N, define a capability (property) with the same name and type on the boundaries of news, and map it onto the equivalent one of S. Jacopo Soldani 19
Plug-in matched services Step-wise adaptation methodology (2) To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (3.1) For each interface of N, define an interface with the same name on the boundaries of news. (3.2) For each operation op exposed by N, define an operation with the same name and parameters in the corresponding interface of news, and map it to the equivalent operation/plan of S. Jacopo Soldani 20
Non plug-in matched services Step-wise adaptation methodology (3) To adapt a ServiceTemplate S s.t. S N and S N into a new ServiceTemplate news that exactly matches N (i.e., news N) (4) Add a NodeTemplate NoBe (whose capabilities satisfy the requirements of S and whose requirements are the same of N) to the topology of news. (5) For each requirement of N, define a requirement with the same name and type on the boundaries of news, and map it onto the equivalent one of NoBe. Jacopo Soldani 21
Non plug-in matching services Can unmatched services always be adapted? Consider the already introduced NodeType N2 and the ServiceTemplate S such that S N2.? S CANNOT be adapted so as to exact match N2 Jacopo Soldani 22
Non plug-in matching services Can unmatched services always be adapted? (2) The proposed adaptation methodology can be effectively employed when:» S exposes all the capabilities and properties of N, but in a syntactically different way, and/or» N declares all the requirements which are exposed by S, but in a syntactically different way, and/or» N features one or more interface operations which are not matched by any operation featured by S, while they can be matched by some compositions of S s operations. Otherwise, despite S may be adapted to match N, our methodology cannot detect it. Jacopo Soldani 23
Outline Introduction Background» TOSCA» Matching cloud services with TOSCA Reusing cloud-based services with TOSCA» Adaptation of plug-in matching services» Adaptation of NON plug-in matching services Conclusions and Future Work Jacopo Soldani 24
Conclusions We have discussed a step-wise methodology to non intrusively adapt a ServiceTemplate S into a new ServiceTemplate news s.t. news N.» If S N, S can always be adapted into news.» Otherwise, this is not ensured. Our methodology does not require to intervene in the source code of the reused applications.» Adapting the specification of S does suffice to reuse any actual service modeled by S to deploy applications that rely on N. Jacopo Soldani 25
Future work 1. Implementation of a tool implementing our matchmaking and adaptation procedures.» To be integrated into the open source OpenTOSCA [4] environment. 2. Application of more complex adaptation techniques, like those that input also an explicit specification of the desired application [5]. 3. Extend our matchmaking and adaptation procedures so as to reuse only part of the available ServiceTemplates (instead of the entire application). [4] T. Binz, U. Breitenbücher, F. Haupt, O. Kopp, and F. Leymann. OpenTOSCA A runtime for TOSCA-based cloud applications. In: Proceedings of ICSOC13. Springer, 2013. [5] A. Brogi, C. Canal, and E. Pimentel. On the semantics of software adaptation. Science of Computer Programming, vol. 61, issue 2, pages 136-151. 2006. Jacopo Soldani 26
Thank you! soldani@di.unipi.it Jacopo Soldani 27