Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © Talend 2014 Service Locator Talend ESB Training 2014 Jan Bernhardt Zsolt Beothy-Elo

Similar presentations


Presentation on theme: "1 © Talend 2014 Service Locator Talend ESB Training 2014 Jan Bernhardt Zsolt Beothy-Elo"— Presentation transcript:

1 1 © Talend 2014 Service Locator Talend ESB Training 2014 Jan Bernhardt jbernhardt@talend.com Zsolt Beothy-Elo zbeothy-elo@talend.com

2 2 © Talend 2014 Agenda ➜ Introduction to Service Locator Problem Definition Concepts Loose Coupling Automatic Failover Selection Strategies Common Pitfalls ➜ Hands-on Installation & Configuration Demo Service using Service Locator

3 3 © Talend 2014 Introduction to Service Locator

4 4 © Talend 2014 Problem: Tight Coupling ➜ Direct invocation from Application A to Service X Static endpoint address Application A Service X invokes

5 5 © Talend 2014 Application A Service X invokes Problem: Tight Coupling (Service Blackout) ➜ Service X goes offline Application A stops working as well Application A needs to be fixed Reconfiguration or even redeployment

6 6 © Talend 2014 Application A invokes Problem: Tight Coupling (Relocation) ➜ Service X was moved to a new location Application A stops working Application A needs to be fixed Reconfiguration or even redeployment Application A Service X

7 7 © Talend 2014 Solution: Loose Coupling Application A Service Locator SL Client Service X SL Client 2: performs lookup 3: returns address 4: invokes 1: registers

8 8 © Talend 2014 Solution: Loose Coupling Application A Service X Service Locator 1: registers SL Client Service X SL Client Service Y SL Client 1: registers 3: invokes 2: performs lookup 3: returns address

9 9 © Talend 2014 Solution: Transparent Failover Application A Service X Service Locator SL Client Service X SL Client Service Y SL Client 1: invokes 4: invokes Heartbeat 2: performs lookup 3: returns address

10 10 © Talend 2014 Highlights ➜ Automatic endpoint registration Easy to use ➜ Dynamic lookup of endpoints No reconfiguration needed ➜ Automatic failover Error handling is transparent to application ➜ Status monitoring Only active endpoints are used ➜ Transparent extension No Custom Code inside Application required

11 11 © Talend 2014 Problem: Single Point of Failure Application A Service X 3: performs lookup 2: registers SL Client Service X SL Client Service Y SL Client 1: registers 2: registers Service Locator

12 12 © Talend 2014 Solution: Distributed Services Application A Service X Service Locator SL Client Service X Service Y SL Client Service Locator Sync SL Client 3: performs lookup 2: registers 1: registers 2: registers

13 13 © Talend 2014 Solution: Distributed Services Application A Service X Service Locator SL Client Service X SL Client Service Y SL Client Service Locator Sync 2: performs lookup 1: registers 4: invokes 3: returns address Heartbeat

14 14 © Talend 2014 Hands-on: Cluster Setup ➜ copy container ➜ install locator ➜ update ports ➜ configure cluster server config client config ➜ Install SOAP/REST Service Perform requests (empty result)

15 15 © Talend 2014 Problem: Bad Selection ➜ Quality of Service Poor network connectivity Services running on weak hardware Overload of one Service chosen by all clients ➜ Services provide different content Video Surveillance Stream Package Counter ➜ Producing additional costs Some providers may charge each service invocation

16 16 © Talend 2014 Solution: Flexible Selection Strategies ➜ Round Robin Automatic Load Balancer ➜ Metadata Selection Localize preferred services

17 17 © Talend 2014 Common Pitfalls ➜ Stateful Services Session State would be lost or needs to be synchronized Sticky Selection Strategy recommended ➜ Even number of SL instances Majority required to re-sync lost nodes ➜ Insufficient Configuration Client needs to know multiple SL instances

18 18 © Talend 2014 Hands-on

19 19 © Talend 2014 Hands-on: Service Locator Application A Service Locator SL Client Service X SL Client 2: performs lookup 3: returns address 4: invokes 1: registers

20 20 © Talend 2014 Hands-on: Enable Locator ➜ Prepare services for locator feature Add locator feature to service consumer & provider Set Consumer address to locator:// ➜ Install locator service Locator Server REST Interface ➜ Install service provider One on each container ➜ Validate Results Perform SL lookup (REST)

21 21 © Talend 2014 Hands-on: Metadata Selection ➜ Add config admin support Add Property-Placeholder in Blueprint enable automatic bundle reload Create config file in./etc folder ➜ Add metadata to service provider Make location configurable ➜ Add metadata filter on consumer side location = Bonn ➜ Validate Results Perform SL lookup (REST)

22 22 © Talend 2014 Thank You!


Download ppt "1 © Talend 2014 Service Locator Talend ESB Training 2014 Jan Bernhardt Zsolt Beothy-Elo"

Similar presentations


Ads by Google