A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111...

23
A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar 01710403111 Amit Kumar 00710403111 Balkaran Singh Sidhu 05810403111 Sudip Akura 00210403111

Transcript of A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111...

Page 1: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH

PROGRAM SLICING

Ravindra Kumar 01710403111Amit Kumar 00710403111Balkaran Singh Sidhu 05810403111Sudip Akura 00210403111

Page 2: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Presentation Preview

• Minor Project Work• Problems to rectify• Goals and Objective• Abstract• Theoretical Introduction• Technical Introduction• User Query Interface• Design and Architecture• Fallback Invocation Behavior• Pending Work• References

Page 3: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Minor Project Work

• Topic- “Generation of Web Services through Program Slicing”– This project includes the development of an efficient tool based on

Program Slicing technique in which a web service can be generated through choosing the slicing criteria based on methods. The main purpose is to generate Web Service with high optimization and performance factor

Page 4: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Problems to rectify

• Address the problem of users and developers having to understand the operations in web services.

• Reduce user interaction with web services• Map user queries to relevant operations in a domain specific

web service• Faster execution of the web services.

Page 5: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Goals and Objectives

• This project address the problem of users and developers having to understand the operations in web services and hide details of web service specification and implementation from users.

• For efficient data retrieval and updating, fast service distribution and fault tolerance.

Page 6: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Abstract

• This project abstract away the fundamental complexity of XML based Web services specifications and toolkits, and provide an elegant, intuitive, simple, and powerful query based invocation system to end users. We employ a set of algorithms and optimizations to match user queries with corresponding operations in Web services, invoke the operations with the correct set of parameters, and present the results to the end user. Our system uses the Semantic Web, Ontologies, Program Slicing and Caching in the process of automating Web services invocation and execution.

Page 7: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction – Why this ?

• Web services are rapidly emerging as a popular standard for sharing data and functionality among loosely-coupled, heterogeneous systems.

• Many enterprises are moving towards a Service Oriented Architecture by putting their databases behind web services, thereby providing a well-documented, interoperable method of interacting with their data.

• Furthermore, data not stored in traditional databases also is being made available via web services.

Page 8: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Web Services

• A web service is a network accessible interface for application functionality, built using standard Internet technologies.

• Clients of web services do not need to know how it is implemented.

ClientApplication

CodeNetwork Web

Service

Page 9: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Components of Web Services

• WSDL (Web Service Description Language)– Describes three fundamental properties• What a service does, How a service is accessed, Where a service is

located

• SOAP (Simple Object Access Protocol) – A simple markup language for describing messages between

applications

• UDDI (Universal Description, Discovery and Integration)– A directory for storing information about web services

Page 10: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Program Slicing

• Program slicing is a technique for automatically decomposing programs by analysing their data flow and control flow.

• In general a program slice consist of those statements that may directly or indirectly affect the variables computed at a given program point.– Depends on the program location– The criterion that defines the slicing problem is a pair C=(p,V) where p

denotes program location– The criterion is the slicing criterion

Page 11: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Program Slicing Example

Function f(N)

sum = 0; prod = 1; for(i = 0; i < N; ++i) {

sum = sum + i; prod = prod *i;

}

write(sum); write(prod);

Source Code

Function f(N)

sum = 0;

for(i = 0; i < N; ++i) {

sum = sum + i;

}

write(sum);

Sliced Code<8,sum>

prod = 1;

prod = prod *i;

write(prod);

Page 12: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Query Based System

• Process user’s query and automatically determine which web services is to be used and which operation is to be performed.– What is the temperature in New Delhi?

getCurrentWeather(3166)

• Invoke the chosen operation by passing the input parameters and display the results

• User does not have to fill detailed forms for each service

ID of City- NEW DELHI

Page 13: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Caching

• A Cache is a component that stores data so future requests for that data can be served faster.

• The data stored in a cache might be the results of an earlier computation, or the duplicates of data stored elsewhere.

• A cache hit occurs when the requested data can be found in a cache, while a cache miss occurs when it cannot.

Page 14: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Introduction- Caching

• ASP.NET provides three primary forms of caching:– Page level output caching

• Keeps a copy of the HTML that was sent in response to a request in memory

– User control level output caching (or fragment caching)• Cached particular fragments

– Cache API• Store any serializeable data object, and control how that cache entry

expires based on a combination of one or more dependencies• ExampleCache.Insert("key", myXMLFileData, new System.Web.Caching.CacheDependency(Server.MapPath("users.xml")));

Supports five attributes:Duration- Max 3600 secondsLocation- Client, Downstream, None, Server or ServerAndClientVaryByPram- none(no variation), “*”(all)VaryByHeader- based on variation in specific headerVaryByCustom- Custom variation e.g.. Browser

Page 15: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

User Query Interface

• Accepts user query in a free from text box.• Matches user’s query with web service descriptions.• Invokes the relevant web service• Displays results

Search

http://localhost/MyWebServices/Search.aspx

Output:Clear CloudMax:28 C Min: 20 C

Will there be rain tomorrow in New Delhi ?

Page 16: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Methods:getWeatherByLoc()

getWeatherByID(locID)

Design & Architecture

WeatherInfo.asmx

Will it be rain tomorrow at New Delhi?

getWeatherByID(12)

Output:Clear Cloud

Max: 28 C Min: 20 C

Page 17: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Design & Architecture – Query Based System

Page 18: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Design & Architecture – Program SlicingLogin()

Compose() Inbox() Sent_Mail()Login()

Compose()

Inbox()

Sent_Mail()

Page 19: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Design & Architecture – Invocation and Caching

<%@ WebService language ="C#" class = “ClassName" %>

http://localhost/MyWebServices/ClassName.asmx

request.GetResponse()

Empty SOAP Envelope:string _soapEnvelope = @"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body></soap:Body></soap:Envelope>";

SOAP Envelope after passing parameters:string _soapEnvelope =<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <loginMail xmlns="http://localhost/MyWebServices/"> <userID>[email protected]</userID> <Pwd>Password@123</Pwd> <portAddrs>993</portAddrs> <hostAddrs>imap.gmail.com</hostAddrs> </loginMail> </soap:Body></soap:Envelope>

Wait for 3 Sec(Time Window) Fetch all request, Send single request

Page 20: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Fallback Invocation Behavior

• If no operation can be identified after matching query with Web files

• User is presented with a form with links to various operations.• User can select the desired operation• Information pre-filled in the form based on user query• If nothing works user asked to refine query.

Page 21: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

Pending Work

• Saving and checking output in cache• Match Processor and WS Invoker in Query based system

WS Invoker(Query based

system)

Caching Module(Invocation &

Caching)

Includes- Cache check and storing

result

Includes- Invocation of WS when QBS

detect it

Page 22: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

References

[1] Chaitali Gupta, Rajdeep Bhowmik, Michael R. Head, Madhusudhan Govindaraju and Weiyi Meng , “A Query-based System for Automatic Invocation of Web Services”.

[2] Yingzhou Zhang , Wei Fu, Geng Yang, Lei Chen and Weifeng Zhang, “Web Service Generation Through Program Slicing” , Int. J. Communications, Network and System Sciences,2010, 3, 877-887.

[3] Julio Fernandez Vilas, Ana Fernandez Vilas and Jose Pazos Arias, “Optimizing Web Services Performance using Cache”, International Conference on Next Generation Web Services Practices, 2005

Page 23: A QUERY BASED SYSTEM FOR OPTIMIZING WEB SERVICES THROUGH PROGRAM SLICING Ravindra Kumar01710403111 Amit Kumar00710403111 Balkaran Singh Sidhu05810403111.

THANK YOU