Presentation is loading. Please wait.

Presentation is loading. Please wait.

Activiti in an Event- driven architecture Robin Bramley Chief Scientific Officer, Ixxus.

Similar presentations


Presentation on theme: "Activiti in an Event- driven architecture Robin Bramley Chief Scientific Officer, Ixxus."— Presentation transcript:

1 Activiti in an Event- driven architecture Robin Bramley Chief Scientific Officer, Ixxus

2 Intro - RB

3 Intro - Ixxus

4 Activiti intro

5 Double entry considered harmful Increases risk of conflict

6 Integration is essential…

7 … in more connected times 7

8 Health warning 8

9 The fallacies of distributed computing Essentially everyone, when they first build a distributed application, makes the following eight assumptions. All prove to be false in the long run and all cause big trouble and painful learning experiences. 1.The network is reliable 2.Latency is zero 3.Bandwidth is infinite 4.The network is secure 5.Topology doesn't change 6.There is one administrator 7.Transport cost is zero 8.The network is homogeneous For more details, read the article by Arnon Rotem-Gal-Ozarticle 9

10 Integration styles 10

11 4 styles of integration 11 1 2 3 4 File Transfer Database RPC Messaging

12 Integration criteria Application coupling Intrusiveness Technology selection Data format Data timeliness Data or functionality Remote communication Reliability Security (AAA, confidentiality, integrity, …) 12

13 Messaging Asynchronous messaging is inherently loosely coupled and helps to overcome latency & unreliability issues Can easily apply ‘pipes & filters’ approach for flexibility Frameworks such as Spring Integration mask a lot of the complexity from application developers (but ties you to their API) 13

14 Event-Driven Architecture A good way of loosely integrating systems using the observer pattern Systems emit events when something that may be of interest to other systems happens Systems can listen for events that are interested in and can then take action when they are triggered The emitting application is unaware of which applications are listening to its events – good for extensibility Can be used for near real time business intelligence / business activity monitoring (BAM), alerting, indexing etc. 14

15 Complex Event Processing Complex Event Processing involves monitoring an event stream to identify activity patterns or correlations (within time windows) Used in Financial Services trading systems for fraud detection Other uses include billing/metering, delayed shipment with RFID tracking

16 Enterprise Integration Patterns 16

17 EAI Patterns

18 White: Section Head

19 Event Driven Analytics Complex Event Processors are designed for correlating events – Business Activity Monitoring / near real-time dashboards are one application Time is often a factor applied through a sliding window E.g. number of failed login attempts in the last hours

20

21 Event Publishing in Spring 21 public class Xyz implements ApplicationEventPublisherAware {... public create(Map foo) {... XyzCreatedEvent evt = new XyzCreatedEvent(foo); applicationEventPublisher.publishEvent(evt); private ApplicationEventPublisher applicationEventPublisher; public setApplicationEventPublisher(ApplicationEventPublisher aep) { applicationEventPublisher = aep; }

22 Event Listener 22 public class IndexingListener implements ApplicationListener { public onApplicationEvent(ApplicationEvent event) { if (event instanceof XyzCreatedEvent) { XyzCreatedEvent evt = (XyzCreatedEvent) evt;... // handle created event } else if (event instanceof XyzDeletedEvent) {...

23 Overview

24 Sample Code { // extract avm store id and path var fullpath = url.extension.split("/"); if (fullpath.length == 0) { status.code = 400; status.message = "Store id has not been provided."; status.redirect = true; break script; } var storeid = fullpath[0]; var path = (fullpath.length == 1 ? "/" : "/" + fullpath.slice(1).join("/")); }

25 Sample Code { // extract avm store id and path var fullpath = url.extension.split("/"); if (fullpath.length == 0) { status.code = 400; status.message = "Store id has not been provided."; status.redirect = true; break script; } var storeid = fullpath[0]; var path = (fullpath.length == 1 ? "/" : "/" + fullpath.slice(1).join("/")); }

26 Demo

27 Asynchronous browser updates 27 https://www.flickr.com/photos/gtweb/11328349694

28 Polling 28

29 Long polling 29

30 Streaming 30

31 HTML5 Web Sockets 31

32 Example EIP flow 32 http://leanjavaengineering.wordpress.com/2011/11/18/grails-push

33 Sample Code { // extract avm store id and path var fullpath = url.extension.split("/"); if (fullpath.length == 0) { status.code = 400; status.message = "Store id has not been provided."; status.redirect = true; break script; } var storeid = fullpath[0]; var path = (fullpath.length == 1 ? "/" : "/" + fullpath.slice(1).join("/")); }

34 Sample Code { // extract avm store id and path var fullpath = url.extension.split("/"); if (fullpath.length == 0) { status.code = 400; status.message = "Store id has not been provided."; status.redirect = true; break script; } var storeid = fullpath[0]; var path = (fullpath.length == 1 ? "/" : "/" + fullpath.slice(1).join("/")); }

35 Demo

36 Wrap-up Questions? Resources Hohpe & Woolf Enterprise Integration Patterns


Download ppt "Activiti in an Event- driven architecture Robin Bramley Chief Scientific Officer, Ixxus."

Similar presentations


Ads by Google