1 / 28

بهينه سازي پرس جو هاي سرويس هاي وب

بهينه سازي پرس جو هاي سرويس هاي وب. علي رهبري. سرويس هاي وب. روشي استاندارد براي به اشتراک گذاري اطلاعات و قابليت ها. توصيف و پيدا کردن. ارتباطات. Data, کاربرد. WSDL,UDDI. سرويس وب. کاربران / کلاينت ها. SOAP. مثال سرويس وب. سمبول بورس. WS 1. اطلاعات شرکت. Reuters.

jean
Download Presentation

بهينه سازي پرس جو هاي سرويس هاي وب

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. بهينه سازي پرس جو هاي سرويس هاي وب علي رهبري

  2. سرويس هاي وب • روشي استاندارد براي به اشتراک گذاري اطلاعات وقابليت ها • توصيف و پيدا کردن • ارتباطات Data, کاربرد WSDL,UDDI سرويس وب کاربران/ کلاينت ها SOAP

  3. مثال سرويس وب سمبول بورس WS1 اطلاعات شرکت Reuters سمبول بورس WS2 فعاليت بورس NASDAQ

  4. پرس و جوهاي وب سرويس ها دريافت اطلاعت از همه شرکت هاي با تبادل با سمبول بورس WS1 اطلاعات شرکت پرس و جو کاربران/ کلاينت ها Reuters نتايج سمبول بورس WS2 فعاليت بورس • ساده • شفاف • کارا NASDAQ

  5. برخي از اهداف ابتدايي به عنوانDBSM هاي مرسوم واسط توصيفي پرس و جو کاربران/ کلاينت ها داده سيستم مديريت پايگاه داده نتايج • ساده • شفاف • کارا

  6. WS1 پرس و جو کاربران/ کلاينت ها روترها Reuters نتايج WS2 NASDAQ سيستم مديريت وب سرويسWSMS سيستم مديريت وب سرويس • ساده • شفاف • کارا

  7. معماري WSMS WSMS واسط توصيفي WS Invocations مولفه ابر داده نگاشت شما ثبت وب سرويس WS1 پرس و جو+ داده ورودي مولفه پردازش پرس و جو WS2 کلاينت انتخاب طرح اجراي طرح خروجي مولفه آماري WSn ترکر آماري پروفايلر زمان پاسخ

  8. مثال • يک شرکت کارت اعتباري مي خواهد پيشنهادي براي مشترياني با مشخصات زير ارسال کند: • credit rating > 600 • payment history = “good” • شرکت موارد زير را در اختيار دارد: L : List of potential recipients (identified by SSN) WS1 : SSN  credit rating WS2 : SSN  cc number(s) WS3 : cc number  payment history

  9. طرح 1 SSN WSMS WS1 SSN,cr SSNcr Filter on cr, keep SSN L(SSN) طرح پرس و جو WS2 کلاينت SSNccn SSN,ccn WS3 SSN,ccn,ph ccnph Filter on ph, keep SSN توجه: پردازش پايپلايني

  10. بيان ساده طرح 1 WS1 WS2 WS3 L نتايج ccnph SSNcr SSNccn

  11. طرح 2 WSMS WS1 SSN SSN,cr SSNcr Filter on cr, keep SSN SSN SSN L(SSN) WS2 کلاينت Join SSNccn SSN,ccn WS3 SSN SSN,ccn,ph ccnph Filter on ph, keep SSN

  12. بيان ساده طرح 2 SSNcr WS1 L نتايج WS2 WS3 SSNccn ccnph

  13. کدام طرح بهتر است؟ طرح 1 WS1 WS2 WS3 L نتايج WS1 طرح 2 L نتايج WS2 WS3 طرح 1 هيچگاه بدتر نيست!

  14. بهينه سازي پرس و جو • طرح هاي پرس و جوي ممکن: P1, …, Pn • آمار دسترسي به داده: S • معيار هزينه اجرا:cost(Pi, S) • هدف پيدا کردن طرحي با کمترين هزينه است.

  15. آمار • زمان پاسخ دهي سرويس هاي وب • انتخاب هاي وب سرويس ها

  16. آمار: زمان پاسخ • ri: براي زمان پاسخ هر تاپل از وب سرويس I ام SSN کلاينت WS1 SSNcr cr r1 • ri ≈1/throughput, can be reduced by batching, parallel calls batching (see paper) • فرض انتخاب مستقل در طرح هاي پرس و جو

  17. آمار: انتخاب ها • si: selectivity of WSi • Average # output tuples per input tuple toWSi • including post-filtering in query plan WS1: SSN cr, filter cr > 600 If 90% of SSNs have cr > 600 then s1 = 0.9 WS2: SSN ccn If on average each SSN has 2 credit cardsthen s2 = 2.0 • فرض انتخاب مستقل در طرح هاي پرس و جو

  18. معيار هزينه تنگنا Conference Lunch Buffet Dish 1 Dish 2 Dish 3 Dish 4 Average per-tuple processing time = response time of slowest (bottleneck) stage in pipeline Note: selectivities=1 in this example

  19. معادله هزينه براي طرح P • Ri(P): Predecessors of WSi in plan P Πj∈Ri(P) sj • Fraction of input tuples seen byWSi= (Πj∈Ri(P) sj)•ri • WSiresponse time per input tuple = • Bottleneck cost metric: cost(P) = max1≤i≤n( (Πj∈Ri(P) sj)•ri ) (assumes WSMS processing is not the bottleneck)

  20. مقايسه با معيار هزينه کل cost(P) =∑1≤i≤n( (Πj∈Ri(P) sj)•ri ) • Stream filter ordering • Expensive predicate placement “Polite” Lunch Buffet Dish 1 Dish 2 Dish 3 Dish 4

  21. بيان مسئله • ورودي: • Web services WS1, …, WSn • Response times r1, …, rn • Selectivitiess1, …, sn • Precedence constraints among web services • خروجي: • Web services arranged into a plan P • P respects all precedence constraints • cost(P) is minimized

  22. بدون قيد اولويت • All selectivities ≤ 1 • Theorem:Optimal to order linearly by ri • (selectivities irrelevant) • General case • (optimal): “proliferative” web services “selective” web services ordered by response-time … join at WSMS Results

  23. با قيود اولويت cost(P) = max1≤i≤n( (Πj∈Ri(P) sj)•ri )

  24. با قيود اولويت cost(P) =∑1≤i≤n( (Πj∈Ri(P) sj)•ri) • Sum cost metric • Hard to even obtain a factor O(n) of optimal

  25. با قيود اولويت cost(P) = max1≤i≤n( (Πj∈Ri(P) sj)•ri) • Bottleneck (max) cost metric • Surprisingly, optimal solution in polynomial time • O(n5) algorithm in paper • Add one WS at a time to the plan • WS chosen by solving a linear program

  26. بررسي دوباره مثال طرح 1 WS1 WS1 WS2 WS2 WS3 WS3 L Results SSNcr SSNccn ccnph SSNcr max1≤i≤n( (Πj∈Ri(P) sj)•ri ) WS1 WS1 طرح 2 L Results WS2 WS2 WS3 WS3 SSNccn ccnph Selective WS3 WS2 Precedence constraint Proliferative

  27. پياده سازي • Built prototype WSMS query processor • Optimizer and execution engine • Assumes schema issues resolved, statistics provided • Written in Java and uses Apache Axis (open-source SOAP implementation) • Experiments (see paper) validate analytical results

  28. مراجع [1] S. Abiteboul et al. Lazy query evaluation for active XML. In Proc. of the 2004 ACM SIGMOD Intl. Conf. on Management of Data, pages 227–238, 2004. [2] Apache Axis. http://ws.apache.org/axis/. [3] S. Babu et al. Adaptive ordering of pipelined stream filters. In Proc. of the 2004 ACM SIGMOD Intl. Conf. on Management of Data, pages 407–418, 2004. [4] Business Process Execution Language for Web Services. ftp://www6.software.ibm.com/software/developer/library/ws-bpel.pdf [5] N. Bruno, S. Chaudhuri, and L. Gravano. STHoles: A multidimensional workload-aware histogram. In Proc. of the2001 ACM SIGMOD Intl. Conf. on Management of Data, pages 211–222, 2001. [6] J. Burge, K. Munagala, and U. Srivastava. Ordering pipelined operators with precedence constraints. Available at http://dbpubs.stanford.edu/pub/2005-40.

More Related