Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building SOA City Atomic SOA Patterns

Similar presentations


Presentation on theme: "Building SOA City Atomic SOA Patterns"— Presentation transcript:

1 Building SOA City Atomic SOA Patterns
Elementary Middleware Communication Patterns for a Succesful SOA Implementation SOA India Certication Course – Part 1 By Axel Angeli – SOA Evangelist - Logosworld.com

2 Atomic Communication Patterns Enhance Middleware Development Quality
Saturday, 17 November 2018 Atomic Communication Patterns Enhance Middleware Development Quality Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Any complex communication through middleware can be efficiently built from a small number of atomic patterns

3 Communications is a three step process
Receive Process Send Receive Process Send

4 Von Neumann Computers do The Same
János von Neumann zu Margitta Father of modern computer architecture Input Process Output Input Process Output János von Neumann zu Margitta Father of modern computer architecture

5 Canonical Data Transport
Saturday, 17 November 2018 Canonical Data Transport As a pre-requisite make sure that data exchange within a layer happens always using a Canonical Format Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Exchanging content from one port to another allows for infinite variations. Think of sending over a simple text message like „The quick brown fox“. You may decide exchanging just the plain format or you pack the message in an envelope, allowing you to add additional context information like the legacy, the encoding and the desired receiver. As an example you may wrap this now in an XML package: <message> <head></head> <body>The quick brown fox</body> </message> Sending raw messages is certainly not a good idea, since it simply does not allow immediate sending additional information along with the message.

6 Saturday, 17 November 2018 How can a project leader enforce component use and segregation of duties? Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Use separate technologies for Input/Output (=Adapters) Process Logic Split development across layers One developer for I/O One developer for Process Logic

7 SOA Application Layer Model (non-OSI)
Saturday, 17 November 2018 Canonical Content representation Content HTML, XML, JSON, ASCII Envelope HTTP, FTP, WebDAV, Steganographie Transport TCP, UDP, IPX Delivery IP Data Linkage Ethernet, Token-Ring Network WLAN, Cable, Sound, File-System Physical Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

8 Example: How we copy a file
Saturday, 17 November 2018 The quick & dirty approach Procedure CopyFile Read the input file Convert encoding Save the file The atomic approach Procedure readFile Read the input file Procedure convertEncoding Convert encoding Procedure saveFile Save the file Procedure CopyFile Call inputFile Call convertEncoding Call saveFile Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

9 Data Transport in Envelopes
Saturday, 17 November 2018 Canonical Format Internal container Transport Envelope Protocol specific HTML, JSON, Text Physical Format Transport protocol HTTP, FTP, FileSys Physical Format Transport protocol HTTP, FTP, FileSys Transport Envelope Protocol specific HTML, JSON, Text Canonical Format Internal container format Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

10 Conversion in Adapters
Saturday, 17 November 2018 Physical Format Adapter Transport envelope Canonical Format Data ready for program In Physical Format Adapter Transport Envelope Canonical Format Program Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

11 Communication Categories
Saturday, 17 November 2018 Communication Categories Request & Response Fire & Forget Broadcast Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

12 Communication Categories
Saturday, 17 November 2018 Request and Response HTTP, FTP Fire and Forget Maildrop,Triggers SMTP Broadcast MQ, Database, website Response Request Fire & Forget Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Broad-cast Receiver

13 Request Response Request and Response HTTP, FTP Server Client
Saturday, 17 November 2018 HTTP, FTP Client Server Request Response Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

14 Fire & Forget Fire and Forget Sender does not accept a response
Saturday, 17 November 2018 Sender does not accept a response Mail drop; Message Queue SMTP Infrastructure can supervise the delivery Axel Angeli - (c) 2008 logosworld.com - Building the SOA City The fire and forget category combines all patterns where the sender delegates the message delivery to the next communication layer. Those patterns will not listen to a response, not will the active communication process check whether the message arrives at the designated receiver. The monitoring and supervision of the message delivery is the duty of the middleware infrastructure. This is best compared with a postal mail service; you drop a letter in the mail drop and rely on the postman and the authorities behind that the letter is correctly delivered. On the contrary the postal authorities will also supervise that no illicit content – think of poisoned letters or package bombs – are doing harm to anybody. Fire & Forget Sender Server

15 Publish Listeners Broadcast One sender, unknown number of receivers
Saturday, 17 November 2018 One sender, unknown number of receivers Website Message Queue, Database Event Triggers Sender Does not know, who is listening Publish Sender Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Broadcasting means publishing information to masses. The characteristic of any broadcasting pattern is the fact that the sender cannot make any assumption who will listen to the message. Middleware will supervise the broadcast and allow configuring the scenarios according specific needs. For example a message may have a life-time, so the broadcast should be visible for a certain period and then automatically removed. Another possibility would be that we allow a pre-defined or calculated number of receivers to read the message; in the simplest case it means that means that the sender is looking for one agent to process the message but there are several candidates to choose from, e.g. finding the next free telefone line. Once the message has been accepted by one potential receiver, the message shall expire. This ist the classical message queueing scenario. Listeners

16 Communication Patterns
Saturday, 17 November 2018 Communication Patterns Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

17 Filter Pattern Receive Transform Send Receive Transform Send Filter
Adapter Adapter Sender Filter Receiver

18 Basic Communication Pattern
All follow the same communication flow Sender Format Conversion Internal Format Format conversion Receiver Sender Adapter Internal Format Receiver Speech Sound EAR Brain Electric MOUTH

19 Patterns reduce complexity
Saturday, 17 November 2018 Patterns reduce complexity Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Because we always revert to some pre-thought algorithm

20 Saturday, 17 November 2018 Patterns allow reuse Axel Angeli - (c) 2008 logosworld.com - Building the SOA City Especially the reuse of tools and monitoring components

21 Patterns Ancestry Queue-in/out Queue and Forward Campaign
Pass Filter (A-1-B) Null Filter (A-0-B) Proxy (A-1-B) Request/Reply (A-1-A) Throttling (A-time-B) Fan Out (1:n) Fan out (1:n) Fan out & collect (1:n:1) Load balance (1-1/n) Message queue Queue-in/out Queue and Forward Campaign Queue and reply

22 Layers

23 Data Layer versus Transport layer
Saturday, 17 November 2018 In Process Out Data layer Axel Angeli - (c) 2008 logosworld.com - Building the SOA City HTTP XML SOAP Transport Layer

24 Content strictly separate from Envelope
EDIFACT IDOC Envelope SOAP XML HTML JSON

25

26 Interaction Transport/Data-Layer
Saturday, 17 November 2018 Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

27 Saturday, 17 November 2018 Atomic Patterns Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

28 Atom: Pass Filter Receive Transform Send
Message is handled and filtered by an algorithm during pass through Receive Transform Send Adapter Adapter Sender Filter Receiver

29 Pass Filter Variation: Transformation
Message payload is changed by the filter Adapter Adapter Sender Process Receiver

30 Pass Filter Variation: Mapping
Message payload is changed by the filter Fox Wolf Dogs Hound Hyane Cats Tiger Adapter Adapter Sender Process Receiver

31 Pass Filter: Content based routing
Receiver depends on message content Patient File 35yr old lady Pregnant Gynecologist Age=45 12yr old girl Female Pediatric Age=12 A man Male Psychatrist Adapter Process Adapter Sender Receiver

32 Null Filter A special case of a pass filter that would not change the message‘s payload Usages: Protocol converter Bridge between media Decouple sender and receiver to avoid impact Adapter Adapter Null- Filter

33 Atom: Proxy - Asynchronous Capsule
Services are activated asynchronously only Proxy provides emulation of synchronous processing Adapter Adapter Collector Requester Service

34 Atom: Request Reply Pattern
Request-reply patterns are filter where sender and receiver are the same entity Adapter Service

35 Atom: Fanout A fan-out distributes a message to list of registered subscribers Sender Process Determine Subscriber Fan-Out Receivers Receiver Subscription Handler Adapter Process Adapter Adapter Adapter

36 Atom: Fanout and Collect
This pattern fans out the messages and then waits for all tasks to terminate Sender Distri-bute Fan-Out Re-Sync Receiver Distributor Synchronizer Adapter Adapter Adapter Adapter Adapter Adapter

37 Atom: Load Balancing Receive a message and assign to the next available ressource to process from Sender MQ-Inbox Process Receiver Adapter Adapter Process Dispatcher Adapter Adapter Process Adapter Process

38 Atom: Load Throttling Messages are stored in an MQ and then dispatched to processes that signal availability Sender MQ-Inbox Process Receiver Adapter Adapter Process Queue Janitor Adapter Process Adapter MQ Process

39 Active and Passive Throttling
Messages are normally fetched by a free handler If processor is unable to poll, MQ may forward messages Passive Dispatching Receiver peeks messages Active Dispatching Messages are forwarded Process Process Queue Janitor Queue Janitor Process Process MQ Process MQ Process

40 Atom: Galvanic Decoupling (Q&Forward)
The process will deploy the response into a message queue for next process to pick up Sender MQ-Inbox Process MQ-Outbox Next Process MQ Process MQ Process

41 Atom: Campaigning Message will be made public in a queue
A watchdog will remove the queue after expiration Sender MQ-Inbox Published Withdraw MQ Watch Dog Queue Janitor Process Process Process

42 Atom: Sorting & Merging Queues
Messages need to be sorted Queues need to be merged I to one queue Sender MQ-Inboxes Merger Process Receiver MQ Queue Merger Adapter Process MQ MQ

43 Merged Queues Saturday, 17 November 2018 Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

44 Merge Difficulties Allow hysteresis of merge keys
Saturday, 17 November 2018 Allow hysteresis of merge keys E.g. time stamps differ by up to 1 second Wait before starting merge Some queue may take longer to fill up E.g. snapshots taken every x seconds only Calculate Default drop out values E.g. RFID tag is not read Axel Angeli - (c) 2008 logosworld.com - Building the SOA City

45 Atom: Bucketing Process is halted until a number of messages arrive
Lock prevention needs to be configurable E.g Timeout, trigger message („joker“) Sender MQ-Inboxes Wait for fill Process Receiver Process


Download ppt "Building SOA City Atomic SOA Patterns"

Similar presentations


Ads by Google