SIF 3 Events SIF 3 Events Live Demo

  • Slides: 11
Download presentation
SIF 3: Events SIF 3 Events & Live Demo Presented by: Joerg Huber

SIF 3: Events SIF 3 Events & Live Demo Presented by: Joerg Huber

2 Overview ¡ ¡ ¡ ¡ What is an Event Types When do I

2 Overview ¡ ¡ ¡ ¡ What is an Event Types When do I need Events Event Payload Infrastructure required for events SIF 3 Framework & Events Live Demo (SIF 3 Framework – Java, Amazon Cloud and SIF 3 Broker) Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

3 What is an Event ¡ ¡ ¡ An asynchronous way to publish changes

3 What is an Event ¡ ¡ ¡ An asynchronous way to publish changes in the provider’s data store to all interested parties. Issued/Published by Object Provider Consumed/Subscribed by Object Consumer A mechanism to keep Consumers up-to-date with “Source of Truth”. Event must be delivered: l l In-Order Guaranteed – Event Queues don’t drop events Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

4 Event Types There are 3 Event Types ¡ Create: Create a new Object

4 Event Types There are 3 Event Types ¡ Create: Create a new Object such as a Student. Personal. l ¡ Update: Update an existing Object l l ¡ Provide full data set in payload FULL: Data provided is full set (i. e. full Student. Personal) PARTIAL: Only data that has changed is provided (i. e. partial Student. Personal). Delete: Remove an existing Object Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

5 When do I need Events ¡ ¡ Consumers and Providers must be kept

5 When do I need Events ¡ ¡ Consumers and Providers must be kept in sync at all times. Where large data sets need to be kept in sync and regular full sync with request/response is not an option. Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

6 Event Payload Each Event can hold many SIF Object but: ¡ ¡ All

6 Event Payload Each Event can hold many SIF Object but: ¡ ¡ All Objects must be of the same SIF Object type such as Student. Event Type is the same for all SIF Objects in a particular event (cannot mix Update, Delete in a single event). Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

7 Infrastructure required for Events For an Object Provider and/or Consumer to be able

7 Infrastructure required for Events For an Object Provider and/or Consumer to be able to deal with Events the following infrastructure components are required: ¡ Event Connector: Endpoint where Object Provider publishes events to. ¡ Queue Manager & Message Router: Manages queues for various consumers. Ensures in-order & guaranteed delivery. ¡ Subscription Connector: Endpoint where Consumers can subscribe to. Tell the Queue Manager which events they are interested in. ¡ Queue Connector: The endpoint where consumers will poll for available events. Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

8 Infrastructure required for Events (cont. ) Who Provides Event Infrastructure? ¡ DIRECT Environment:

8 Infrastructure required for Events (cont. ) Who Provides Event Infrastructure? ¡ DIRECT Environment: Optional. ¡ Brokered Environment: Yes - Mandatory => Broker will take care of all the Event Infrastructure and Requirements. Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

9 Events Demo • 100, 000 Daily Attendance Records • CREATE (today’s attendances) •

9 Events Demo • 100, 000 Daily Attendance Records • CREATE (today’s attendances) • Let’s assume 0. 1 sec per message to transmit SIF 2. x SIF 3. x 1 CREATE record/event message 100 CREATE records/event message 100, 000 Get Messages 100, 000 DEL/ACK Messages 1, 000 Get Messages One Consumer Thread to deal with 200, 000 messages sequentially 2 Concurrent Consumer Threads deal with 500 messages each Total Time Taken: 5. 5 hours!!! Total Time Taken: 50 secs!!! 400 times faster Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

1 0 Events Demo (cont. ) Broker: Amazon Instance (Sydney) ¡ Small Instance l

1 0 Events Demo (cont. ) Broker: Amazon Instance (Sydney) ¡ Small Instance l l Basic single CPU single core Xeon @ 1. 0 -1. 2 GHz 1. 7 GByte Memory Consumer: Amazon Instance (Sydney) ¡ Small Instance (Uses SIF 3 Framework, Java 7) l l Basic single CPU single core Xeon @ 1. 0 -1. 2 GHz 1. 7 GByte Memory i. Phone 5 s: l l 1 CPU, 2 Cores @ 1. 3 GHz 1 GByte Memory Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd

1 1 Where do I get access to a Broker? Systemic Pty Ltd Joerg

1 1 Where do I get access to a Broker? Systemic Pty Ltd Joerg Huber: joerg. huber@systemic. com. au Web: http: //www. systemic. com. au/sif SIF 3 Framework (Open-Source: Git. Hub) Java: https: //github. com/nsip/sif 3 -framework-java. Net: https: //github. com/nsip/Sif 3 Framework-dot. Net Melbourne Nov 2014: SIF 3 Events & Demo November 20 © Systemic Pty Ltd