Adaptive Parallelization of Queries over Dependent Web Service Calls
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Adaptive Parallelization of Queries over Dependent Web Service Calls

on

  • 411 views

Presentation at 1st IEEE Workshop on Information & Software as Services(WISS 2009)Shanghai, China, March 29, 2009

Presentation at 1st IEEE Workshop on Information & Software as Services(WISS 2009)Shanghai, China, March 29, 2009

Statistics

Views

Total Views
411
Views on SlideShare
403
Embed Views
8

Actions

Likes
1
Downloads
1
Comments
0

2 Embeds 8

http://www.linkedin.com 7
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • We have developed a system , WSMED, provides general query capabilities over data accessible through web services by reading WSDL meta-data descriptions. WSDL uri is given to import meta data to its local store. While importing the meta data it automatically creates OWF as declarative function and looks like regular table. OWF makes web service operation query able. Users then view these OWF using a GUI and it illustrates the signatures of OWFs. Now users can make SQL queries , considering these OWF as regular relations, calling any web service without any programming.
  • A common need to search information through data providing web services , with out any side effects, returning set of objects for a given set of parameters.
  • By starting separate query processes each calling a plan function for different parameter tuples
  • The views can be queried with SQL
  • Central plan – heuristic cost model- web service signature- assuming web service call is expensive Sequential execution is slow.
  • Multilevel execution plans generated with several layers of parallelism – process tree fanout central query plan to parallel query plan coordinator initiates communication between child processes and ships plan functions. Then it stream of different parameter tuples results delivered as streams from child processes
  • End of call message
  • In these case of queries it is close to a homogenousfanout tree. Properties of web services are unknown

Adaptive Parallelization of Queries over Dependent Web Service Calls Presentation Transcript

  • 1. Adaptive Parallelization of Queries over Dependent Web Service Calls Manivasakan Sabesan and Tore Risch Uppsala Database Laboratory Dept. of Information Technology Uppsala University Sweden
  • 2. Outline
    • Research Area
    • Queries
    • Query Parallelization & FF_APPLYP
    • Experimental setup
    • AFF _APPLYP
    • Conclusion & Future work
  • 3. WSMED System (Web Service MEDiator) WSMED OWF 1 WSDL metadata 1 WS Operation 1 WS Operation n WS Operation 1 WS Operation m WS 1 WS n WSDL metadata n SOAP call Import metadata SQL Query OWF n Automatically generated O peration W rapper F unction(OWF) makes web services queryable. Meta store 1 3 3 1 2
  • 4.
    • Queries calling data providing web services have a similar pattern :- dependent calls .
    • Web service calls incur high-latency and high message setup cost
    • A naïve implementation of an application making these calls sequentially is time consuming
    • A challenge here is to develop methods to speed up such queries with dependent web service calls
    Research Problems WS 1 WS 2 WS 3 WS n
  • 5. Dependent join f( x- , y+ ) Λ g( y- , z+ )
    • Predicate f binds y for some input value x and passes each y to the predicate g that returns the bindings of z as result.
    • Predicates f and g represent calls to parameterized sub queries ( plan functions ) - execution plans calling data providing web service operations .
    • Input parameters are annotated with ‘ - ‘ and outputs with ‘ + ’.
    • Our solution for the research problem is to parallelize dependent join in an efficient way.
  • 6.
    • Research Area
    • Queries
    • Query Parallelization & FF_APPLYP
    • Experimental setup
    • AFF _APPLYP
    • Conclusion & Future work
  • 7. Query1 select gl.City , gl.TypeId from GetAllStates gs, GetPlacesWithin gp, GetPlaceList gl where gs.state=gp.state and gp.distance=15.0 and gp.placeTypeToFind='City' and gp.place='Atlanta' and gl.placeName=gp.ToPlace+' ,'+gp.ToState and gl.MaxItems=100 and gl.imagePresence='true' Finds information about places located within 15 km from each city whose name starts with ’Atlanta‘ in all US states.
    • Invokes 300 web service calls
    • Returns a stream of 360 tuples
  • 8. Query 2
    • Find the zip code and state of the place ‘USAF Academy’.
    • select gp.ToState, gp.zip
    • from GetAllStates gs, GetInfoByState gi, getzipcode gc, GetPlacesInside gp
    • where gs.State=gi.USState and gi.GetInfoByStateResult=gc.zipstr and gc.zipcode=gp.zip and gp.ToPlace=´USAF Academy´
    • Invokes more than 5000 web service calls
  • 9.
    • Research Area
    • Queries
    • Query Parallelization & FF_APPLYP
    • Experimental setup
    • AFF _APPLYP
    • Conclussion & Future work
  • 10. Query Processing in WSMED Parallel query plan SQL query Calculus Generator Parallel pipeliner Plan function generator Central plan creator Plan splitter Phase 1 Phase 2
  • 11. Central plan - Phase1 Query1(pl,st) :- GetAllStates() and GetPlacesWithin(‘Atlanta’,_,15.0,’City’) and GetPlaceList(_, 100,’true’) Calculus expression γ GetPlacesWithin(‘Atlanta’, st1, 15.0, ‘City’) <pl, st> γ GetPlaceList (str, 100, ‘true’) γ GetAllStates() < st1 > <city , st2 > γ concat(city,’, ‘, st2) <str > Algebra expression
  • 12. Plan Splitting and Plan Function Generation - Phase2 <city, state2> γ GetPlacesWithin(Atlanta’, st1, 15.0, ‘City’) γ concat(city,’, ‘, state2) <str > PF1 PF1(Charstring st1) -> Stream of Charstring str γ GetPlaceList(str,100,’true’) <pl, st> PF2 PF2(Charstring str) -> Stream of <Charstring pl, Charstring st>
  • 13. WSMED Process Tree q i - query process (i=0,1,......n) Level 2 q0 q1 q3 q4 q2 PF1 GetAllStates PF2 q5 q8 q7 q6 Coordinator Level 1 Query1
  • 14. Make Parallel Pipeline < str > < st1 > FF_APPLYLP( PF2, 3,str ) <pl, st> γ GetAllStates() FF_ APPLYP( PF1, 2, st1 ) Manually set fanouts on both levels
  • 15. FF_APPLYP(Function PF , Integer fo , Stream pstream ) -> Stream result
    • fo – fanout , values are manually set
    • PF – plan function
    • pstream – stream of parameter values p i
    • result – stream of results r i
    q3 q4 q5 PF PF PF p 1 p 2 p 3 First Finished Apply in Parallel ( FF_APPLYP ) FF_APPLYP r 1 r 2 r 3 p 4 p 5 p 6
  • 16.
    • Research Area
    • Queries
    • Query Parallelization & FF_APPLYP
    • Experimental setup
    • AFF _APPLYP
    • Conclusion & Future work
  • 17. Experimental Setup
    • Flat tree :- The fanout vector has f 2 =0 ({ f 1 ,0 } ) in which case both OWFs are combined into the same plan function executed at the same level.
    • Heterogeneous fanout :- fanout vector {f 1 ,f 2 }, f 1 ≠ f 2
    • Homogeneous fanout :- fanouts are equal, i.e. f 1 = f 2
    • Queries were run on a computer with a 3 GHz single processor Intel Pentium 4 with 2.5GB RAM
    • Total number of query processes N needed to execute the parallel queries will be N = f 1 + f 1 * f 2 .
    • Experiments investigate the optimum tree topology for up to 60 query processes
    f 1 =2 f 2 =4 f 1 =2 f 2 =2 f 1 =5
  • 18. Observation –Query1
    • Lowest execution time region is achieved within the range 50 - 60 sec with the fanout vector {5,4} .
    • Fastest execution time 56.4 sec outperformed with the speed-up of 4.3 the central plan ( 244.8 sec ).
  • 19. Observation- Query2
    • Best execution time for Query2 is achieved within the range of 1200- 1400 sec with the fanout vector {4,3}
    • Fastest execution time, 1203 sec surpassed with the speed-up of 2 compared with the naïve case ( 2412.9 sec )
  • 20. Observations of Preliminary Experiments
    • Best execution time for both queries is achieved close to, but not exactly for, homogenous balanced trees.
      • Query1 : f 1 =5, f 2 =4
      • Query2 : f 1 =4, f 2 =3
    • Need an adaptive query process arrangement at runtime
  • 21.
    • Research Area
    • Queries
    • Query Parallelization & FF_APPLYP
    • Experimental setup
    • AFF _APPLYP
    • Conclusion & Future work
  • 22. Adaptive First Finished Apply in Parallel (A FF_APPLYP) The AFF_APPLYP operator adapts the process plan at run time and starts with a binary tree.
    • AFF_APPLYP (Function PF , Stream pstream ) -> Stream result
    • PF – plan function
    • pstream - stream of parameter values p i
    • result - stream of results r i
    • It replaces FF_APPLYP by eliminating the manual fanout parameter
  • 23. Functionalities of AFF_APPLYP
    • 1. AFF_APPLYP initially forms a binary process tree by always setting fanout to 2 - init stage .
    q0 q1 q3 q4 q2 q6 q5 Coordinator Level 1 Level 2
  • 24. .......... 2. A monitoring cycle for a non-leaf query process is defined when number of received end-of-call messages equal to number of children. 2.1 After the first monitoring cycle A FF_APPLYP adds p new child processes - an add stage . 3. When an added node has several levels of children, the init stages of A FF_APPLYP s in the children will produce a binary sub–tree . q0 q1 q3 q4 q2 q5 Coordinator Level 1 q7 q9 q8 q10 Level 2 q6 q11
  • 25. ...... 4. A FF_APPLYP records per monitoring cycle i the average time t i to produce an incoming tuple from the children. 4.1 If t i decreases more than a threshold ( 25% ) the add stage is rerun. 4.2 If t i increases we either stop or run a drop stage that drops one child and its children. q0 q1 q3 q4 q2 q5 Coordinator Level 1 q12 q10 Level 2 q6 q11
  • 26. Adaptive Results- Query1
  • 27. Adaptive Results –Query2
  • 28. Observations with AFF_APPLYP
    • For Query1 the execution time with p =4 and no drop stage comes close to the execution time of the best manually specified process tree
    • For Query2 the execution with p =2 and no drop stage is the closest one.
    • In both cases that execution time with p=2 and no drop stage is reasonably close to the execution time of the best manually specified process tree ( Query1 80% , Query2 96 % )
    • Dropping stages make insignificant changes in the execution time.
  • 29.
    • Research Area
    • WSMED System
    • Query Parallelization & FF_APPLYP
    • Experimental setup
    • AFF _APPLYP
    • Conclusion & Future work
  • 30. Related work
    • Similar to WSMS ( U.Srivastava, J.Widom, K.Munagala, and R.Motwani, Query Optimization over Web Services, VLDB 2 006 ) WSMED also invoke parallel web service calls. In contrast, WSMED supports automated adaptive parallelization.
    • In contrast to WSQ/DSQ ( R.Goldman, and J.Widom, WSQ/DSQ: a practical approach for combined querying of databases and the Web, SIGMOD 2000 ) , WSMED produces non-materialized adaptive parallel plans based on parameter streams.
    • Runtime optimization techniques ( A. Gounaris, et al., Robust runtime optimization of data transfer in queries over Web Services, ICDE 2008 ) investigate adaptation of buffer sizes in web service calls, not dealing with adaptive parallelism on web service calls.
  • 31. Conclusion
    • An algorithm implemented to transform central plan into parallel plan by introducing FF_APPLYP.
    • FF_APPLYP, with manually set fanouts, is defined to parallelize calls to plan functions, encapsulates web service operations, partitioned for different parameter values.
    • AFF_APPLYP starts with a binary tree and then each non-leaf process locally adapts the process sub-trees by adding and removing children , based on the flow of result stream without any static cost model .
    • The AFF_APPLYP obtained performance close to the best manually specified process tree with FF_APPLYP by automatically adapting the process tree.
  • 32. Future .....
    • Generalize the strategy for queries mixed with dependent and independent web service calls, as well bushy trees.
    • Investigate different process arrangement strategies with the algebra operators.
    • Setup a benchmark to simulate the parallel invocation of web services.
    • Find a model for dynamically changing the fanout vector during the runtime .
  • 33. Thank you for your attention
    • ?