Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Web service Authentication Desktop apps Accounting.

Similar presentations


Presentation on theme: "Web Services Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Web service Authentication Desktop apps Accounting."— Presentation transcript:

1

2 Web Services Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Web service Authentication Desktop apps Accounting A service that : can describe itself Allow others to locate it can be readily invoked by others Mature technologies for : Machine-to-machine communications Service composition Well-known set of standards : SOAP/WS-*, REST, WS-BEPEL, WS-CDL Stocks Weather Databases

3 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Two worlds Corporate Email Domotics service disovery File sharing Streaming and VoIP Network supervision … … IMAP POP3 SMTP RTSP MGCP SIP SIMPLE TFTP NNTP FTP UPNP SLP Salutation SNMP SGMP CMIP NTP STUN … … Heterogeneous Application Layer Protocols (ALPs)

4 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Migration is a Challenge (1) 1 st Approach : Re-Write the Legacy service into WS Needlessly Invasive o Hard to recover the logic perfectly Expensive and time-consuming o Investments made in existing systems are lost Unreliable and restricted o New protocols require new clients WSEmailWIP/WSIP A few attempts : WSEmail, WIP/WSIP, etc.

5 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Migration is a Challenge (2) 2 nd Approach : Implement a WS Interface to legacy services Leverages best the value locked in legacy services It still works for me I can integrate this service now

6 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Migration is a Challenge (2) 2 nd Approach : Implement a WS Interface to legacy services Leverages best the value locked in legacy services Approaches differ in Approaches differ in : o Complexity Existing tools are not always appropriate Solutions are often partial (support of different types of legacy services) o The details in the extraction of service functionalities Black box approach (You may not get what you had before ) Grey box approach (Well try to break it down to what we can ) WS wrapper = WS interface to the functionalities of an ALP-based application

7 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Developing a wrapper (1) Implementation of a gateway between two worlds Need to master the technologies involved Expertise in WS paradigm + knowledge on ALPs How to reproduce the interaction models (sessions, multicast, multiplicity of ALPs, …) Efficiency and safety constraints Understanding of low-level network programming Knowledge on systems programming

8 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Developing a wrapper (2) WS has characteristics one must take into account SOAP+HTTP lead to complex and verbose messages Functionalities must be extracted accordingly Often unwise to mimic protocol behaviors Message transmission synchrony Messages return values

9 Our generative language-based approach (1) Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Janus Janus : Description of the operations that the wrapper must support Legacy ALPs specifications Descriptions of the legacy service functionalities High-level descriptions Janus z2z z2z z2z: Protocol specifications (Middleware09)

10 Our generative language-based approach (1) Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Two automated generation steps Generation of the remaining z2z specifications and WSDL Generation of the wrapper C code Legacy ALPs specifications Descriptions of the legacy service functionalities WS description WS protocols specifications+ WS-ALP translation specification WS message parsers Consistency checks + Generation Consistency checks + Generation Contract-first High-level descriptions Translation engine Generation of C code Janus z2z

11 Our generative language-based approach (1) Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA A dedicated runtime system Optimized processing of WS requests and ALP messages Legacy ALPs specifications Descriptions of the legacy service functionalities WS description WS protocols specifications+ WS-ALP translation specification WS message parsers Consistency checks + Generation Consistency checks + Generation Contract-first A deployable WS wrapper Translation engine Generation of C code Runtime system High-level descriptions Janus z2z

12 The Janus DSL Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Need to enforce good practices in WS development Need to enforce good practices in WS development Contract-first strategy Need for a better programming language Type safety Support for stateful WS Expressiveness and Extensibility Hide subtleties of WS paradigm and ALPs Need automation to support wrapper developers Account for the issues in system and network programming

13 Development Scenario Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA 1 2 3 4

14 Case study : WS - IMAP Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA How to describe a service with in Janus?

15 Janus by the example : Describing a WS Interface for an IMAP server Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA import protocol.imap.*; import utils.List; service ImapServer (String hostname, int port){ /* Janus datatypes */ class Mail { int id; String body; } /* Janus operations */ List pullMails(String hostname, String login,... ){...} serverResponse imapCreateFolder(..., String foldername,...) {...} } Contents of a WS message encapsulating a mail. The WS will be deployed here Which legacy service functionalities are extracted

16 Janus by the example : Describing a WS Interface for an IMAP server Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA /** Retrieve all unread mail from an IMAP Server*/ List pullMails(String hostname, String login,...) { request req; response resp; Mail m; List mails = new List ();... send req = new Login(login, passwd); resp = req.send(); if (resp.code == error ) throw throw new ServiceFault( [login], authentication failure ); req = new selectFolder(foldername); resp = req.send();... req = new listMessage(); resp = req.send();... ids = List.parse2int (resp.line, ); for (int id :ids) { req = new getMail(id);... m = new Mail(id, resp.line);... } req = new Logout();... return return mails; } The variables for assigning request data Creating the appropriate request according to the protocol description You dont have to manage how the messages are sent in the network If it fails, stop, and send a WS Fault message Get all the mail you can, and log out! Send back the operation results How should the WS wrapper handle a WS Invocation request on the « pullMails » operation?

17 Janus by the example : Adding features Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA import protocol.rtsp.*; service mediaPlayer(...) { String SESSION_ID;... Media PLAY(PlayRequest preq){... req = new Setup(...); resp=req.send(); SESSION_ID = resp.sessionId;... } Media STOP(StopRequest sreq) {... req = new Teardown(..., SESSION_ID);... }... } import protocol.ssdp.*; multicast service controlPoint(...) {... List SEARCH(SearchRequest sreq){... }... } Global variables are detected as session variables // Use of a WS standard to support session Switch from SOAP/HTTP to SOAP/UDP and rely on WS- Addressing

18 z2z specifications: Complex translation module code, WS protocol descriptions, WS message parsers z2z specifications: Complex translation module code, WS protocol descriptions, WS message parsers Low-level efficient C code Straightforward code How much code… Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Developer code Generated Code Legacy service + ALPs descriptions z2z specs, parsers, WSDL docs Wrapper source code (LoC) WS wrapper (size in KB) WrapperRuntime System Total IMAP Server wrapper IMAP 34568018614480124

19 How much code… Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Developer code Generated Code Legacy service + ALPs descriptions z2z specs, parsers, WSDL docs Wrapper source code (LoC) WS wrapper (size in KB) WrapperRuntime System Total IMAP Server wrapper IMAP 34568018614480124 SMTP Server wrapper SMTP 2045139182480104

20 How much code… Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Developer code Generated Code Legacy service + ALPs descriptions z2z specs, parsers, WSDL docs Wrapper source code (LoC) WS wrapper (size in KB) WrapperRuntime System Total IMAP Server wrapper IMAP 34568018614480124 SMTP Server wrapper SMTP 2045139182480104 Media Service wrapper RTSP + SDP 58264624884880128 UPnP service discovery UPnP 37554018773280112 Around 77% of the final code is provided by the compiler Code size < 130 KB

21 Do we perform well? Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Janus wrappers vs. hand-made wrappers Janus runtime Tomcat server + general purpose WS stack

22 Do we perform well? Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Janus wrappers benefits from a fine grained runtime system WS – SMTP WS – IMAP

23 Concluding remarks Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA How do we improve wrapper development? Accommodating WS developers Programmers are familiar with Java-like syntax Encapsulating subtle and error-prone code WS developer can focus on the service description Benefiting from the DSL approach Important features are provided within the language rather than in a library as in Java Code can be checked for various coherence properties Future work More instanciations Other applications domains & other middleware protocols (RMI, CORBA) Extending Janus runtime system REST support, more WS-* standards

24 Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Questions, comments?

25 Service-Oriented Architectures Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Web browser Webmails RSS feeds Desktop apps Databases Accounting Software Software As A Service … … WS interfaces to Query engines Web APIs A service that : can describe itself Allow others to locate it can be readily invoked by others Mature technologies for : Machine-to-machine communications Service composition Well-known set of standards : SOAP/WS-*, REST, WS-BEPEL, WS-CDL

26 Service-Oriented Architectures Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Web browser Webmails RSS feeds Desktop apps Databases Accounting Software Software As A Service … … WS interfaces to Query engines Web APIs A service that : can describe itself Allow others to locate it can be readily invoked by others Mature technologies for : Machine-to-machine communications Service composition Well-known set of standards : SOAP/WS-*, REST, WS-BEPEL, WS-CDL

27 z2z : ALP specifications Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA protocol imap{ int tag; attributes { transport = tcp alive / 143; mode = sync; } start { tag = 1; } sending request req { req.tag = tag; tag = tag +1; } … } protocol imap{ int tag; attributes { transport = tcp alive / 143; mode = sync; } start { tag = 1; } sending request req { req.tag = tag; tag = tag +1; } … } message imap{ read { mandatory public fragment code; mandatory public fragment line; } request template response createFolder{ magic = SEP newline = \r\n public fragment folder; private int tag; --SEP create --SEP } … } message imap{ read { mandatory public fragment code; mandatory public fragment line; } request template response createFolder{ magic = SEP newline = \r\n public fragment folder; private int tag; --SEP create --SEP } … } Characterisitcs of the interaction with the network This is what the IMAP parser extracts How to create an IMAP request

28 Migration is a challenge -Integration with newer systems may also be difficult because new software may use completely different technologies -leveraging the value locked in legacy systems -Too important to scrap -Too expensive to modify -The ability to reuse existing codes/applications in combination with other Web/Internet technologies -Add years to the productive use and protect the investment made in the systems

29 Our generative language-base approach (2) Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA 1 2 3 4

30 Related Work Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Migration by re-engineering [Lux et al., ICWS05] WSEmail [Chou et al., ICWS06] WIP/WSIP Continuity in business processes New protocols require new clients Use of existing infrastructures Investments made in systems are lost On the invasive aspect of the approaches Hard to recover the logic perfectly

31 Related Work Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Migration by wrapping [Zhang and Yang, ASPEC04] [Canfora et al., CSMR06 and JSS 2008] [Almonaies et al., SOAME10] Finite state automaton to model interaction behaviors Developer may need to adjust to requirements of the new platform Cannot generalize to all systems Selection of the functionalities Need for more design flexibility


Download ppt "Web Services Bridging the Gap between Legacy Services and Web ServicesMiddleware 2010, Bangalore, INDIA Web service Authentication Desktop apps Accounting."

Similar presentations


Ads by Google