Sie sind auf Seite 1von 25

A QUERY BASED SYSTEM FOR

OPTIMIZING WEB SERVICES THROUGH


PROGRAM SLICING
Project Guide :-
Mr Jitender Tanwar
Asst. Professor, Dept. of CSE & IT, ASET
Ravindra Kumar 01710403111
Sudip Akura 00210403111
Amit Kumar 00710403111
Balkaran Singh Sidhu 05810403111
Presentation Preview
• Goals and Objective
• Theoretical Introduction
• Technical Introduction
• User Interface
• Design and Architecture
• Fallback Invocation Behavior
• Future Work
• References
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.
• 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.
Introduction

• 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.
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.

Web
Network
Service
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
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
Example
Function f(N) Function f(N)

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

Source Code Sliced Code<8,sum>


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)
ID of City- NEW
DELHI
• Invoke the chosen operation by passing the input parameters
and display the results
• User does not have to fill detailed forms for each service
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.
Forms of 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
– Supports five attributes:
User control level output caching (or fragment caching)
Duration-
• CachedMax 3600 seconds
particular fragments
Location- Client, Downstream, None, Server or ServerAndClient
– VaryByPram-
Cache API none(no variation), “*”(all)
• Store any serializeable
VaryByHeader- data object,
based on variation and control
in specific headerhow that cache entry
expires based
VaryByCustom- on a combination
Custom variation e.g..ofBrowser
one or more dependencies
• Example
Cache.Insert("key", myXMLFileData, new
System.Web.Caching.CacheDependency(Server.MapPath("users.xml")));
User Interface (UI)

• Accepts user query in a free from text box.


• Matches user’s query with web service descriptions.
• Invokes the relevant web service
• Displays results

Output:
http://localhost/MyWebServices/Search.aspx Clear Cloud
Max:28 C Min: 20 C

Will there be rain tomorrow in New Delhi ? Search


Design & Architecture

WeatherInfo.asmx
-localWeather(location,date)
What is the temperature @ New Delhi ?
Passed Slicing Criteria
Output:
localWeather(location,date)
Clear Cloud
Max: 28 C Min: 20 C
Design & Architecture – Query Based System

What is the temperature @ New Delhi ?


WeatherInfo.asmx
localWeather(location,date)
temperature @ New
Delhi

temperature at New
Delhi

temperature at New
Delhi
Design & Architecture – Program Slicing

Methods:
localWeather(location,date)
marineWeather(locatin,date)

Slicing Criteria:
localWeather(location,date)
Design & Architecture – Invocation and Caching

SOAP Envelope after passing parameters:


string _soapEnvelope =
<soap:Envelope
Empty SOAP Envelope: http://localhost/MyWebServices/ClassName.asmx
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
string _soapEnvelope =
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
@"<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
<soap:Body>
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
<local_weather xmlns="http://localhost/MyWebServices/">
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<location>New Delhi</location>
<soap:Body></soap:Body></soap:Envelope>";
<date>today</date>
</local_weather>
</soap:Body> request.GetResponse()
</soap:Envelope>
Fallback Invocation Behavior

• Occurs when no operation can be identified after matching


query with WS
• User is presented with a pre-filled form based on user query
• User then fill the form to get the desired result.
• If nothing works user asked to refine query.
Future Scope

• N-gram algorithm can be implemented to predict next letter


in user query interface.
• Ontology can be incorporated.
• Self-learning mechanism that utilizes the knowledge of
previously made queries and enhances the efficiency of the
system by a range of 20% - 82%.
• Compression techniques can be incorporated in SOAP
messages.
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

Das könnte Ihnen auch gefallen