01_Introduction.ppt

589 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
589
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

01_Introduction.ppt

  1. 1. Service Oriented Architecture Lecture 1: Introduction 95-843: Service Oriented Architecture Master of Information System 1 Management
  2. 2. Plan for the week • Course Introduction • Definitions • Some Theory • Technology Foundations • Homework 1 and Quiz 1 95-843: Service Oriented Architecture Master of Information System 2 Management
  3. 3. Course Web Site • http://www.andrew.cmu.edu/~mm6 95-843: Service Oriented Architecture Master of Information System 3 Management
  4. 4. Course Software • During the course the student may be asked to download and install software. • It will be assumed the the student is able to program in Java. • It will also be assumed that the student is able to use Netbeans. 95-843: Service Oriented Architecture Master of Information System 4 Management
  5. 5. Structure of the Course • Lectures/class participation • Homework (pencil and paper and programming) • Quizzes • Readings from IBM’s High level reference architecture will be assigned. • Reading from the required course text and the web will be assigned. • Presentations • Final examination 95-843: Service Oriented Architecture Master of Information System 5 Management
  6. 6. Readings • For this week, read the Introduction to Petri Nets and the paper “A Petri Net-based Model for Web Service Composition”. • Read the Introduction and Chapter One of Newcomer. • See preparation topic list for quiz 1. 95-843: Service Oriented Architecture Master of Information System 6 Management
  7. 7. Grading • Paper and Presentation based on IBM’s Reference Architecture 20% (Technical or business focus) • Homework and Quizzes 40% • Final (Closed book and comprehensive) 40% • Students may take the course as pass/fail but I do not permit audits. 95-843: Service Oriented Architecture Master of Information System 7 Management
  8. 8. Definitions (1) • “A Service-Oriented Architecture (SOA) is a way of organizing software so that companies can respond quickly to the changing requirements of the marketplace. The technology is based on services, which are customized units of software that run in a network.” From SOA for Business Developers by Margolis. 95-843: Service Oriented Architecture Master of Information System 8 Management
  9. 9. Definitions (2) • “SOA is the architectural style that supports loosely coupled services to enable business flexibility in an interoperable, technology agnostic manner. SOA consists of a composite set of business-aligned services that support a flexible and dynamically re- configurable end-to-end business process realization using interface- based service descriptions.” From a paper by Borges, Holley and Arsanjani. 95-843: Service Oriented Architecture Master of Information System 9 Management
  10. 10. Definitions (3) • Service-oriented architecture (SOA) is a methodology for achieving application interoperability and reuse of IT assets that features: - A strong architectural focus, including governance, processes, modeling, and tools. - An ideal level of abstraction for aligning business needs and technical capabilities, and creating reusable, course- grain business functionality. 95-843: Service Oriented Architecture Master of Information System 10 Management
  11. 11. Definitions (3) Continued - A deployment infrastructure on which new applications can quickly and easily be built. - A reusable library of services for common business and IT functions. From Newcomer and Lomow 95-843: Service Oriented Architecture Master of Information System 11 Management
  12. 12. Web Services Preferred(1) • Web Services are XML-based technologies for messaging, service descriptions, discovery, and external features providing: - Pervasive open standards for distributed computing interface descriptions and document exchange via messages From Newcomer 95-843: Service Oriented Architecture Master of Information System 12 Management
  13. 13. Web Services Preferred(2) - Independence from the underlying execution environment and application platforms. - Extensibility for enterprise qualities of service such as security, reliability, and transactions. - Support for composite applications such as business process flows, multi-channel access, and rapid 95-843: Service Oriented Architecture integration System Master of Information Management 13
  14. 14. XML Preferred (1) • The Extensible Markup Language is a common, independent data format across the enterprise and beyond that provides: - Standard data types and structures, independent of any programming language, development environment or software system. From Newcomer 95-843: Service Oriented Architecture Master of Information System 14 Management
  15. 15. XML Preferred (2) - Pervasive technology for defining business documents and exchanging business information, including standard vocabularies for many industries. - Ubiquitous software for handling operations on XML, including parsers, queries, and transformations. From Newcomer 95-843: Service Oriented Architecture Master of Information System 15 Management
  16. 16. Build an SOA in 8 Steps (1) Business needs come first (not services) What problem are we trying to solve? (2) What aspects can be implemented as services? Old services? New services? Legacy wrappers? (3) Track services with registries and repositories. Modified from a talk by Daryl 95-843: Service Oriented Architecture Master of Information System Plummer 16 Management of Gartner.
  17. 17. Build an SOA in 8 Steps (4) Govern the services. We need to encourage desired behavior at many levels, across enterprises, and at different stages. We need to monitor behavior, enforce policies & assess user satisfaction. 95-843: Service Oriented Architecture Master of Information System 17 Management
  18. 18. Build an SOA in 8 Steps (5) Secure the services. Using established standards, we need privacy, authentication, and authorization. This may need to be federated security (over more than one organization.) 95-843: Service Oriented Architecture Master of Information System 18 Management
  19. 19. Build an SOA in 8 Steps (6) Manage the services. Are messages arriving on time? Is everything operating properly? (7) Virtualization through mediation. Are we free to move and change the services? Do we need an ESB that acts as a central hub for message routing and transformations? (8) Design for interoperability through the adoption of standards. 95-843: Service Oriented Architecture Master of Information System 19 Management
  20. 20. Objectives of This Course • Focus on foundations of SOA • Foundations include: Mathematical models Petri nets and π-calculus Important standards and technologies Orchestration and Choreography The Enterprise Service Bus The SOA Reference Model Reference Architectures Enterprise Integration Patterns 95-843: Service Oriented Architecture Master of Information System 20 Management
  21. 21. A Mathematical Foundation • Petri Nets • Petri Nets as applied to Web Services • Why not flow charts? • Why not UML sequence diagrams? • We want to work at a higher level and exploit parallel execution. • Plus, Petri nets are cool! 95-843: Service Oriented Architecture Master of Information System 21 Management
  22. 22. Petri Nets Consider the following program: a = 1; b = 2; What is the normal process order? c = 3; Other orderings are possible. a = a + 1; c = b + c; b = a + c; 95-843: Service Oriented Architecture Master of Information System 22 Management
  23. 23. Petri Nets A Petri net is a directed graph G = (V,E), where V = P U T and P T = . Any edge e in E is incident on one member of P and one member of T. The set P is called the set of places (conditions) and the set T is the set of transitions (events). 95-843: Service Oriented Architecture Master of Information System 23 Management
  24. 24. Petri Nets Places are typically drawn as circles and transitions as bars. p1 t1 p2 t3 p3 t2 p4 95-843: Service Oriented Architecture Master of Information System 24 Management
  25. 25. Petri Net G = (V,E) P = {p1,p2,p3,p4} T = {t1,t2,t3} E = {(p1,t1),(t1,p2),(p2,t3),(p3,t1),(p3,t2),(t2,p4),(p4,t3)} p1 t1 p2 t3 p3 t2 p4 95-843: Service Oriented Architecture Master of Information System 25 Management
  26. 26. A Marked Petri Net A marking of a Petri net assigns each place a nonnegative integer n. We say each place p is marked with n tokens. Tokens are represented as black dots. ** p1 t1 p2 t3 * * t2 p3 p4 95-843: Service Oriented Architecture Master of Information System 26 Management
  27. 27. Firing Transitions In a Petri net, if an edge is directed from place p to transition t, we say p is an input place for transition t. An output place is defined similarly. If every input place for a transition t has at least one token, we say that t is enabled. A firing of an enabled transition removes one token from each input place and adds one token to each output place. A transition can fire only if it’s95-843: Service Oriented Architecture enabled. Master of Information System 27 Management
  28. 28. Fire Transition t1 (ready?) ** p1 t1 p2 t3 * * t2 p3 p4 95-843: Service Oriented Architecture Master of Information System 28 Management
  29. 29. Transition t1 Fired * * p1 t1 p2 t3 * t2 p3 p4 95-843: Service Oriented Architecture Master of Information System 29 Management
  30. 30. Fire Transition t3 (Ready?) * * p1 t1 p2 t3 * t2 p3 p4 95-843: Service Oriented Architecture Master of Information System 30 Management
  31. 31. Transition t3 Fired * p1 t1 p2 t3 t2 p3 p4 95-843: Service Oriented Architecture Master of Information System 31 Management
  32. 32. Petri Nets Consider again the following program: a = 1; b = 2; c = 3; a = a + 1; c = b + c; b = a + c; 95-843: Service Oriented Architecture Master of Information System 32 Management
  33. 33. Modeled as a Petri Net a=1 a=a+1 * p1 p4 b=2 b=a+c * p7 p5 c=b+c p9 p2 c=3 * p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 33 Management
  34. 34. Fire Transitions (ready?) a=1 a=a+1 * p1 p4 b=2 b=a+c * p7 p5 c=b+c p9 p2 c=3 * p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 34 Management
  35. 35. Transitions Fired a=1 a=a+1 * p1 p4 b=2 b=a+c * p7 p5 c=b+c p9 p2 c=3 * p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 35 Management
  36. 36. Fire Transitions (Ready) a=1 a=a+1 * p1 p4 b=2 b=a+c * p7 p5 c=b+c p9 p2 c=3 * p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 36 Management
  37. 37. Transitions Fired a=1 a=a+1 p1 p4 * b=2 b=a+c p7 p5 c=b+c p9 p2 c=3 * p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 37 Management
  38. 38. Fire Last Transition (Ready?) a=1 a=a+1 p1 p4 * b=2 b=a+c p7 p5 c=b+c p9 p2 c=3 * p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 38 Management
  39. 39. Last Transition Fired a=1 a=a+1 p1 p4 b=2 b=a+c p7 * p5 c=b+c p9 p2 c=3 p8 p3 p6 95-843: Service Oriented Architecture Master of Information System 39 Management
  40. 40. Quiz The Petri Net we drew begins with three markings. Redraw the Petri net so that it begins with a single marking. 95-843: Service Oriented Architecture Master of Information System 40 Management
  41. 41. Liveness A Petri net is deadlocked if no transition can fire. A marking M for a Petri net is live if, beginning from M, no matter what sequence of firings has occurred, it is possible to fire any given transition by processing through some additional firing sequence. If a marking M is live for a Petri net P, then no matter what sequence of transitions is fired, P will never deadlock. Indeed, we can fire any transition by proceeding through some additional firing sequence. 95-843: Service Oriented Architecture Master of Information System 41 Management
  42. 42. Deadlock Example Case: Person 1 requests disk drive D. D is ready. Person 1 requests printer P. P is ready. Person 1 uses and releases P and D. P and D are available. Case: Person 1 requests disk drive D. D is ready. Person 2 requests printer P. P is ready. Person 1 is waiting for person 2 to release P. Person 2 is waiting for person 1 to release D. No transitions can fire and we have deadlock. 95-843: Service Oriented Architecture Master of Information System 42 Management
  43. 43. D available * Request D Request D D ready D ready Finished with D and P Finished with D and P Process Release Process Release D and P D and P P ready P ready Request P Request P P available * Person 1 Person 2 95-843: Service Oriented Architecture Master of Information System 43 Management
  44. 44. Deadlock Four Requirements for deadlock: (1) Resources need mutual exclusion. They are not thread safe. (2) Resources may be reserved while a process is waiting for more. (3) Preemption is not allowed. You can't force a process to give up a resource. (4) Circular wait is possible. X wants what Y has and Y wants what Z has but Z wants what X has. Solutions (short course): Prevention (disallow one of the four) Avoidance (study what is required by all before beginning) Detection and recovery (reboot if nothing is getting done) 95-843: Service Oriented Architecture Master of Information System 44 Management
  45. 45. Definition: Service Net (ordinary Petri Net - no parallel arcs) SN = (P, T, w, i, o, l) P is a finite set of places or service states T is a finite set of transitions or service operations w (P X T) (T X P) is a set of directed arcs or flow relations i is the input place with •i = {x P T (x,i) w } = so no flow points to this place o is the output place with •o = {x P T (o,x) w}= so no flow departs from this place L: T --> A {t} is a labeling function where A is a set of operation names. We assume t A and denotes a silent operation. W may be viewed as a function w: (P X T) (T X P) --> {0,1} Silent operations are transition firings that cannot be observed. They are used to distinguish between internal and external behavior of the service. 95-843: Service Oriented Architecture Master of Information System 45 Management
  46. 46. Definition Web Service S = (NameS, Desc, Loc, URL, CS, SN) NameS Name of service used as a unique identifier Desc Summarizes what the service offers Loc Is the server the service is located in URL Is the location of the service CS Is a set of its component services. If CS = {NameS} then S is a basic service. Otherwise S is a composite service SN = (P, T, w, i, o, l) is the service net modeling the dynamic behavior of the service The execution of S starts when a token is in the place i and terminates when a token reaches the place o. S has a specific task to perform and may depend on other web services. 95-843: Service Oriented Architecture Master of Information System 46 Management
  47. 47. Create new web services out of existing ones as building blocks: S :: The service that does nothing X A basic service S1  S2 S1 followed by S2 Sequence operator S1 S2 S1 xor S2 S1 ◊ S2 arbitrary sequence µS iteration on S S1 c S2 parallel with communication (S1 S2) --> S3 As soon as S1 or S2 do S3 [S1(p1,q1):(SN(pn,qn)]| dynamically select one of many to execute Ref(S1,a,S2) Do S1 with any ‘a’ operations replaced by S2 Each operation returns a service that may or may not be involved with other operations. 95-843: Service Oriented Architecture Master of Information System 47 Management
  48. 48. The Empty Service P * 95-843: Service Oriented Architecture Master of Information System 48 Management
  49. 49. Service S1 S1 * i1 : : : : o1 95-843: Service Oriented Architecture Master of Information System 49 Management
  50. 50. Service S2 S2 * i2 : : : : o2 95-843: Service Oriented Architecture Master of Information System 50 Management
  51. 51. Service S3 S3 * i3 : : : : o3 95-843: Service Oriented Architecture Master of Information System 51 Management
  52. 52. Sequence S1  S2 * i = i1 S1 : : : : o1 S2 i2 : : o=o2 95-843: Service Oriented Architecture Master of Information System 52 Management
  53. 53. Alternative S1 S2  i S1 S2 i2 i1 … … … … o1 o2 o 95-843: Service Oriented Architecture Master of Information System 53 Management
  54. 54. Arbitrary Sequence S1 ◊ S2  p1 p2 S1 p3 S2 i1 i2 o1 o2 p4 p5 95-843: Service Oriented Architecture Master of Information System 54 Management
  55. 55. Services µS1 S1 … … i1 o  o1 … … .. 95-843: Service Oriented Architecture Master of Information System 55 Management
  56. 56. Services  ||c S2 S1 S2 S1 i1 i2 p1 p2 o1 o2 o 95-843: Service Oriented Architecture Master of Information System 56 Management
  57. 57. Services (S1|S2) ~>S3  S1 i1 S2 i2 o1 o2 p1 This operation is p2 a discriminator. S1 and S2 may be S3 i3 two services providing Will wait until S1 or the results of the S2 completes same complex query. We take the first o3 Will wait for the later to complete. one to complete 95-843: Service Oriented Architecture o Master of Information System 57 Management
  58. 58. Services [S1(p1,q1):Sn(pn,qn)] i send_req_serv S1 i1 Sn in p1 pn rec_req_1 rec_req_n send_resp_1 send_resp_n q1 qn … … o1 u on select_serv p … Assume middle branch q gains info on service qualities. The two services provide two entry 95-843: Service Oriented Architecture points. Master of Information System o 58 Management
  59. 59. An Example of Refinement  i1 S1 assess_claim indemnity_customer convoke_customer o1 95-843: Service Oriented Architecture Master of Information System 59 Management
  60. 60. An Example of Refinement S2 i   i2 assess_simple_claim assess_complex_claims assess_simple_claim assess_complex_claim indemnify_customer convoke_customer o2 o Ref(S1,assess_claim,S2) 95-843: Service Oriented Architecture Master of Information System 60 Management
  61. 61. Example Service (SM ||c1( OCS|| c2 IP)) OCS : Online Computing Store SM : Sony Monitors IP : Intel Processors The Online Computing Store needs Sony monitors and Intel processors. 95-843: Service Oriented Architecture Master of Information System 61 Management
  62. 62. Example Service SM ||c1( OCS|| c2 IP)  OCS || c2 IP OCS SM rec_ord_pc IP rec_ord_mon rec_ord_pr send_ord_pr send_ord_mon send_del_mon rec_del_pr send_del_pr rec_del_mon assemble_PC o 95-843: Service Oriented Architecture Master of Information System 62 Management
  63. 63. A Quiz Describe this web service in words. Ref(S1, assess_claim, [A1:An]) 95-843: Service Oriented Architecture Master of Information System 63 Management
  64. 64. Properties of The Service Algebra Each operation returns a web service. S1 (S2  S3) = (S1 S2)  S3 (1) S=S (2) S =S (3) S1 S2 = S 2 S1 (4) S1 (S2 S3) = (S1 S2 ) S3 (5) S S=S (6) (S1 S2)  S3 = (S1 S3) (S2 S3) (7) S1 S2 = (S1  S2) (S2  S1) (8) 95-843: Service Oriented Architecture Master of Information System 64 Management
  65. 65. Desired Properties of the Service Algebra = (9) S1 c S2 = S 2 c S1 (10) S1 (S2 S3) = (S1 S2 ) S3 (11) S =S (12) (S1 S2) ~>S3 = (S2 S1) ~> S3 (13) (S1 ) ~> S2 = S1 S2 (14) (S1 S2) ~> = S1 S2 (15) 95-843: Service Oriented Architecture Master of Information System 65 Management
  66. 66. Desired Properties of the Service Algebra n (16) {i1,…,in} ={1,…,n} Si= Si Select the best of n services i {i1,…,in} i=1 w/o concern for initial state names. (17) n n If Sj = then Si = Si Don’t select the empty service. i=1 i=1,i j If a is not an operation Ref(S1,a,S2) = S1 if a L1(T1) then no refinement. (18) S1 S2 = S2 S1 (from (8) and (4)) (19) S S = S  S (from (8) and (6)) (20) S = S (from (8), (2), (3), and (6)) (21) 95-843: Service Oriented Architecture Master of Information System 66 Management

×