Presentation is loading. Please wait.

Presentation is loading. Please wait.

The FI-WARE Project – Mediator GE Webinar June 2013 Mediator GE Webinar.

Similar presentations


Presentation on theme: "The FI-WARE Project – Mediator GE Webinar June 2013 Mediator GE Webinar."— Presentation transcript:

1 The FI-WARE Project – Mediator GE Webinar June 2013 Mediator GE Webinar

2 The FI-WARE Project – Mediator GE Webinar Agenda 2 Mediator GE Overview Mediator GE: Mediation Engine (TI) Mediator GE: Dynamic Mediation API (Thales) Demo: Event Brokering Questions & Answers

3 The FI-WARE Project – Mediator GE Webinar Overview FI-WARE platform should be able to support services exposed through different protocols and technologies and enable the creation of new composite services. The mediator shall provide the glue between the service layer and the composition layer in order to enhance the composition capabilities of the compositor GEs.

4 The FI-WARE Project – Mediator GE Webinar Capabilities 4 The main capability of the Mediator GE is to build an interoperability layer providing implementation for various enterprise integration patterns and data and protocol transformations It is a kind of broker between the service consumer and the service provider Particularly it provides Data Mediation (Transformation), Protocol Mediation and routing capabilities using various mechanisms: Using a library of built-in transformers in case of well-known formats Using templates for more flexible data/protocol transformation capabilities Using XML DSL (Domain Specific Language) in order to fulfill more complex protocol/data transformation requirements or complex integration patterns (split/aggregations) Using custom code (various programming languages are supported) to reach maximum flexibility in most complex scenarios

5 The FI-WARE Project – Mediator GE Webinar Role in FIWARE 5 Basically the Mediator GE could play the role of centralizing and abstracting the access towards the heterogeneity of different devices or target applications exposing different capabilities or the same capabilities through different interfaces and data models. In this scenario the mediator GE can be configured to implement different functionalities: exposing a uniform interface and data model towards a plethora of heterogeneous devices and sensors routing incoming messages towards the right target device or service based on the content of the message or other criteria performing the role of splitting a coarse grained task into many specific items that shall be executed by different actors (device or applications), dispatching the split tasks and aggregating all results in order to return the whole result to the caller. performing the role of event broker. A client application interested in events from a particular set of devices or other applications can subscribe to them using a particular service exposed by the mediator where all relevant event sources are configured. providing an API for automatically solving particular mediation issues (based on semantic meta-data)

6 The FI-WARE Project – Mediator GE Webinar Architecture The mediator offers a set of available mediation tasks: the set of mediation capabilities that can be used via the mediator. The mediator allows users to create and manage their mediation services: a mediation service is a virtual proxy towards a web service that executes a mediation task between the caller and the target service. The mediation task must be chosen from the set of available mediation tasks. The mediator GE is used mainly by the Compositor Editor and Compositor Engine GEs within the FI-WARE platform. It provides a layer of virtual proxies to be used by the compositor instead of the target services in order to make the compositor able to support various kind of target services. Besides the FI-WARE platform also Future Internet applications or composite services on top of the FI-WARE platform can use the mediator as a service for their own purpose.

7 The FI-WARE Project – Mediator GE Webinar Mediation Engine (TI) The reference implementation of GE-Mediator provided by Telecom Italia is based on two open source frameworks: WSO2 ESB (http://wso2.com/products/enterprise-service-bus)http://wso2.com/products/enterprise-service-bus Apache Camel (http://camel.apache.org) Particularly the value added by Telecom Italia is related to: A custom mediation module based on Apache Camel in order to enhance the mediation capabilities of WSO2 ESB. Basically it is possible to add Camel route to a running instance of WSO2 ESB through a customization of the WSO2 ESB Web Admin GUI An enhanced per user logging capability Basically it provides data related the who is using what inside the ESB The integration with a monitoring and disaster recovery tool based on JMX

8 The FI-WARE Project – Mediator GE Webinar WSO2 Enterprise Bus Overview The mediation built-in capabilities are provided through: Service Virtualization Message Mediation The main mediation capabilities are: Data Transformation Protocol mediation Load Balancing and Failover Manipulating SOAP Headers (WS-Security) Iterate/clone messages Policy enforcement

9 The FI-WARE Project – Mediator GE Webinar How to configure Mediators  WSO2 ESB provide a built in Mediator Catalog  Usually a mediator is configured using XML  WSO2 ESB provides a Web GUI to help to configure Mediators without or less XML  ESB mediation framework is extensible. It is possible to write custom mediators using:  Pure Java  Spring Bean  Scripting Languages: javascript, ruby  Examples of Mediator functionalities:  Drop Mediator : Drops a message, stopping further processing of the message Drop Mediator  Send Mediator :Send the message out, using information inside the message or according to some external configuration Send Mediator  Script Mediator : Executes a scripting language with the message Script Mediator  Filter Mediator : Filter messages using XPath Filter Mediator  XSLT Mediator : Do XSLT transformations on messages XSLT Mediator

10 The FI-WARE Project – Mediator GE Webinar Mediators catalog: core mediators NameDescription SendSend a message out LogLogs a message PropertySet or remove properties associated with the message SequenceRefer a sequence EventSend event notifications to an event source DropDrops a message EnrichEnriches a message EnqueueCreate an enqueue mediator

11 The FI-WARE Project – Mediator GE Webinar Mediators catalog: filter mediators NameDescription FilterFilter a message using Xpath (if else logic) OutInbuilt filter for choosing messages in ESB out path InInbuilt filter for choosing messages in ESB path SwitchFilter a message using Xpath (switch logic) RouterRoute messages based on XPath filtering Conditional RouterRoute messages based on 'Condition' ValidateSchema validation for messages

12 The FI-WARE Project – Mediator GE Webinar Mediators catalog: transform mediators NameDescription XSLTXSLT Transformations XQueryXQuery Transformations HeaderSet or remove SOAP Headers FaultCreate or remove SOAP Faults RewriteCreate a rewrite mediators

13 The FI-WARE Project – Mediator GE Webinar Mediators catalog: advanced mediators NameDescription CacheXSLT Transformations CloneClones a message IterateSplits a message AggregateCombines messages CalloutBlocking web services calls TransactionExecutes a set of mediators transactionally ThrottleLimit the number of messages RMsequenceReliable messaging DBReportWrites data to a database DBLookupRetrieve data froma database RuleExecute Rule Other…

14 The FI-WARE Project – Mediator GE Webinar Mediators catalog: extensions NameDescription ClassCreate and execute a custom mediator written in Java POJOCommandExecute a custom command ScriptExecute a mediator written in scripting language SpringCreate a mediator managed by spring Other…

15 The FI-WARE Project – Mediator GE Webinar Example 1: managing WS-Security

16 The FI-WARE Project – Mediator GE Webinar Example 2: Data Transformation SOAP2REST

17 The FI-WARE Project – Mediator GE Webinar Example 2: Data Transformation SOAP2REST XSLT

18 The FI-WARE Project – Mediator GE Webinar Example 3: Protocol Transformation TCP2HTTP

19 The FI-WARE Project – Mediator GE Webinar Example 4: Throttling capability The throttling capability means that it is possible to restrict the usage of a mediation service using different parameters. Range - The IP address range or the domain is restricted from accessing the service. Requests from such clients will be restricted based on the specified values. The restriction can be : Deny or Control Control means that it is possible to set usage limitation based on: - Maximum Request Count (MRC) - Prohibit Time Period (PTP)

20 The FI-WARE Project – Mediator GE Webinar Example 5: Loadbalancing capability The loadbalancing capability means that it is possible to configure a mediation service to use different service endpoints in order to balance the calls using a round robin algorithm. More complex loadbalancing algorithms currently can be configured only using a custom mediator. ? +

21 The FI-WARE Project – Mediator GE Webinar Dynamic Mediation API (DMA) Optional Library provided by Thales

22 22 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. Dynamic Mediation API (DMA) Main features and assumptions: Optional library delivered as part of the Mediator GE Can be used “internally” by the Mediator as part of a created “Mediation Service” API can also be used directly by third-parties for solving particular mediation issues (as shown in this presentation) FI-PPP projects: use under the conditions established in the FI- PPP Collaboration Agreement. Distributed under Thales license as a binary-only closed-source library Useful when syntactic mismatch occurs (at design or runtime) between Service consumer’s needs and Target Service offer. Additional semantic information (meta-data) + domain ontology is used automatically by the DMA for bridging the syntactic gap between a Service Consumer and a Target service => automatic data conversion

23 23 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. DMA Overview SSL - Smart Systems Lab Ontology Automatic conversion Mismatch Service Request Target Service Data Request Data Target  (1) Automatically deal with service (request / target) syntactic mismatch  Use semantic-based characterization of service features (methods, parameters,…)  Supports direct target service invocation through library API  Communication protocol agnostic (SOAP, REST)  (2) Automatic data mediation between services  Data must be described using XSD and semantically-annotated  (3)Use of ontology as business model reference  (1) Automatically deal with service (request / target) syntactic mismatch  Use semantic-based characterization of service features (methods, parameters,…)  Supports direct target service invocation through library API  Communication protocol agnostic (SOAP, REST)  (2) Automatic data mediation between services  Data must be described using XSD and semantically-annotated  (3)Use of ontology as business model reference DMA Library is_equivalent

24 24 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. DMA API typical use cases 1.Consumer needs to invoke a specific operation on an available target service and already has a structured payload he wants to send Potential mismatch at data-model level  payload needs to be automatically converted by the DMA Semantic annotation of consumer-side payload and target service offer mandatory DMA will find the semantically matching operation in the target service 2.Consumer needs to invoke a specific operation on an available target service and doesn’t have an imposed structured payload to send Consumer will provide DMA with a list of parameters with simple data type Consumer-side data-model undefined  payload will be automatically created by the DMA Semantic annotation of parameters and target service offer still mandatory DMA will find the semantically matching operation in the target service 3.In both cases, DMA can be used either to build the right payload (and stop), or to also deal with target service invocation

25 25 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. DMA API (1/4) DMA provides 4 Dynamic Mediation Tasks that are accessible as Java methods or SOAP endpoints: String dynamicallybuildServicePayloadNoOPWithParameters( String usdlURI, String serviceID, String operationConcept, List inputs) throws MediatorException; Method description: Purpose: using a list of unstructured data as input parameters, dynamically building an XML payload adapted to a given service and linked to an operation concept.

26 26 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. DMA API (2/4) String dynamicallybuildServicePayloadNoOPWithPayload( String usdlURI, String serviceID, String operationConcept, String saxd_payload, String payload ) throws MediatorException; Method description: Purpose: using a structured payload (with its associated data schema) as input parameter, dynamically building an XML payload adapted to a given service and linked to an operation concept.

27 27 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. DMA API (3/4) String dynamicDataMediationInvocationNoOPWithParameters ( String usdlURI, String serviceID, String operationConcept, List inputs, List awaitedOutput) throws MediatorException; Prototype description: Purpose: dynamically searches and invokes a service capability based on the given operation concept. The operation of the service, if found, is called with a dynamically built payload based on the list of unstructured data passed as input parameters. Note: the expected data format of the result(s) is defined by the last input parameter awaitedOutput. The result is then adapted before being returned.

28 28 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. DMA API (4/4) String dynamicDataMediationInvocationNoOPWithPayload ( String saxsd_payload, String serviceID, String payload, String wanted_response, String operationConcept) throws MediatorException; Prototype description: Purpose: dynamically searches and invokes a service capability based on the given operation concept. The operation of the service, if found, is executed using the input payload, first adapted to the service. Note: the data format of both input payload and expected result(s) is defined by the input parameter saxd_payload. The result is then adapted before being returned.

29 29 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. A: Consumer needs to invoke a specific operation on an available target service and doesn’t have an imposed structured payload to send IMediator mediator = MediatorEntry.getInstance();; String operationConcept = "http://www.example.com/Calculator.owl#Addition"; SemanticParamItem param1 = new SemanticParamItem(); param1.setConcept("http://www.example.com/Calculator.owl#OperandeGauche"); param1.setValue("12"); SemanticParamItem param2 = new SemanticParamItem(); param2.setConcept("http://www.example.com/Calculator.owl#OperandeDroite"); param2.setValue("5"); SemanticParamItem param3 = new SemanticParamItem(); param3.setConcept("http://www.example.com/Calculator.owl#Somme"); List result = null; result = mediator.dynamicDataMediationInvocationNoOPWithParameters(usdlURI, serviceID, operationConcept, inputs, outputs); for (SemanticParamItem item : result){ assertTrue(item.getValue().equals("17")); System.out.println(item.getConcept()); System.out.println(item.getValue()); } Use case: simple calculator exemple – Case 1

30 30 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. B: Consumer needs to invoke a specific operation on an available target service and already has a structured payload he wants to send IMediator mediator = MediatorEntry.getInstance();; String wanted_response = "AdditionResponse"; String payload = Util.getLocalPathFromResource("fiware/payload.xml"); SemanticParamItem param3 = new SemanticParamItem(); param3.setConcept("http://www.example.com/Calculator.owl#Somme"); String saxsd_payload = Util.getLocalPathFromResource("fiware/saxsd_inputs_outputs.xml"); System.out.println(saxsd_payload); String operationConcept = "http://www.example.com/Calculator.owl#Addition"; String result = null; result = mediator.dynamicDataMediationInvocationNoOPWithPayload( saxsd_payload, usdlURI, serviceID, payload, wanted_response, operationConcept); assertTrue(result != null); assertTrue(result.contains("15")); Use case: simple calculator exemple – Case 2

31 31 Les informations contenues dans ce document demeurent la propriété exclusive du groupe THALES et ne doivent pas être divulguées à l'extérieur du Groupe. Hypothesis of work: Payload: 12 3 Annotated schema for the payload and/or request/response using SAWSDL: Use case: simple calculator exemple – Case 2

32 The FI-WARE Project – Mediator GE Webinar DEMO

33 The FI-WARE Project – Mediator GE Webinar Example Scenario: Task Dispatcher and Event Brokering 33

34 The FI-WARE Project – Mediator GE Webinar Example Scenario: Task Dispatcher and Event Brokering 34 In this scenario the mediator can play the roles of task dispatcher using the split/aggregator pattern and event broker. As a task dispatcher the mediator receive a coarse grained task from the task manager and, based on some criteria related to the content of the task, split it into specific items and dispatch them to the right target (human or application) As an event broker the mediator exposes a service in order to receive events from one or more event sources and allows applications to subscribe to an event topic in order to get related events when they are received by the broker. In this way the event broker collect events from devices, optionally filter them and send them to the current subscribers. Moreover, in this demo scenario the mediator play also the role of centralizing the calls to third party services used by the client (subscribed) applications (i.e. and sms services). In order to show the load-balancing capability of the mediator GE, the service mediation can be configured to use two different endpoints balanced through a simple round robin algorithm

35 The FI-WARE Project – Mediator GE Webinar References  Fiware Apps Wiki Architecture  https://forge.fi-ware.eu/plugins/mediawiki/wiki/fi-ware-private/index.php/FIWARE.OpenSpecification.Apps.Mediator  Fiware Apps Wik Open Spec:  https://forge.fi-ware.eu/plugins/mediawiki/wiki/fi-ware-private/index.php/FIWARE.OpenSpecification.Apps.Mediator  WSO2 ESB docs site:


Download ppt "The FI-WARE Project – Mediator GE Webinar June 2013 Mediator GE Webinar."

Similar presentations


Ads by Google