Guaraná SDK 1.4.0 beta

Guaraná SDK is a software development toolkit that gives support to implement integration solutions designed with Guaraná DSL.

See:
          Description

Packages
guarana.framework.message Provides an implementation of message.
guarana.framework.port Provides a base implementation for Guaraná's communication ports.
guarana.framework.process Provides an abstract implementation for the core processes in Guaraná DSL.
guarana.framework.task Provides a base and abstract java implementation for tasks.
guarana.toolkit.adapter Provides adapters to access different resource types.
guarana.toolkit.adapter.jbi Provides adapter implementations to enable the use of JBI Binding Components as adapters.
guarana.toolkit.adapter.proxy Provides interfaces for passive and remote communicators.
guarana.toolkit.adapter.rmi Provides an RMI Adapter to establish direct communication between entry and exit ports inside the solution.
guarana.toolkit.engine Provides an asynchronous and multi-thread runtime system to execute EAI Solutions.
guarana.toolkit.task.communicators Provides tasks that must be used to send or receive messages through ports to applications or solutions resources.
guarana.toolkit.task.communicators.dummy Provides dummy communicators for testing your solution without the need of adapters.
guarana.toolkit.task.mappers Provides tasks tho map the body of a message from XML to Stream or vice-versa.
guarana.toolkit.task.modifiers Provide tasks that add or remove data from the body and header of inbound messages, but do not alter the schema of the message.
guarana.toolkit.task.routers Provide tasks that does not change the state of a message.
guarana.toolkit.task.streamdealers Provides tasks that does not change the state of a message.
guarana.toolkit.task.streamdealers.ciphers Provides a set of supported and already implemented ciphers.
guarana.toolkit.task.streamdealers.codecs Provides a set of supported and already implemented codecs.
guarana.toolkit.task.streamdealers.compressors Provides a set of supported and already implemented compressors.
guarana.toolkit.task.timers Provide tasks that are time-dependent.
guarana.toolkit.task.transformers Provide tasks that help transform one or more inbound messages into new outbound messages whose schemata are completely new.

 

Guaraná SDK is a software development toolkit that gives support to implement integration solutions designed with Guaraná DSL. Guaraná DSL is a Domain-Specific Language (DSL) to design Enterprise Application Integration (EAI) solutions at a high-level of abstraction. A java implementation of this language is provided by the Guaraná SDK, which is organised in two layers. The first layer, referred as the framework, provides an abstract implementation of all basic concepts from the domain specific language. The second layer, referred as toolkit, provides a concrete implementation of the framework, as well as, a task-based runtime system that can be used to execute the solutions. The resulting models designed with Guaraná DSL are platform-independent, so engineers do not need to have skills on a low-level integration technology when designing their solutions. Furthermore, this design can be re-used to automatically generate executable EAI solutions for different target technologies. Catch a glimpse at the Integration Stack with the abstraction levels for an integration solution.

Functionality and structure of an EAI solution are completely defined by using the language process, ports, tasks, decorator, slots and integration links. Guaraná's tasks are based on the Enterprise Integration Patterns (EIP Patterns) by Gregor Hohpe and Bobby Woolf. It is possible to design the internal structure of all kinds of process (wrappers and integration processes) and its communication ports (EntryPort, ExitPort, SolicitorPort and ResponderPort) by using tasks; it is also possible, to create integration flows that allow applications to collaborate by connecting these process by means of integration links. Applications that participate in the integration solution are documented using decorators as well as its layers being used as communication interface. Below you can see two examples of integration solutions designed with Guaraná DSL.

Travel Agency: Search for Flights and Hotels Solution




Description

A search for flights and hotels is a well-known integration problem in the context of travel agency business systems. The goal is to devise an EAI solution that makes it easier searching for the most inexpensive combination of flights and hotels for a desired travel with a limited budget, so that the customer can decide which one he/she will book.

The EAI solution involves two applications, namely: Flights Façade (FF) and Hotels Façade (HF). Both applications represent interfaces that allow for querying several flight and hotel companies, without restricting results by price. Requests to FF get a response with all of the application can find for a specific date, departing and destination cities. Likewise, HF responds with all of the available in a destination city for a specific date.

The EAI solution should publish a unique interface by means of which travel searches, containing all of the necessary information about the travel, can be requested and returns all the possible flights and hotels combination within the customer’s budget.

A designed solution with Guaraná DSL

The EAI solution we have devised using Guaraná DSL is composed of one orchestration process and two wrapping processes. The orchestration process uses a responder port to publish an interface for searching combinations of flights and hotels. FF and HF applications were provided with wrapping processes that allow for querying them and removing entries that exceed the maximum affordable price for flight and hotel, respectively. We have decided to implement this functionally outside of the orchestration processes, so that it can be reused in other EAI solutions.

The integration flow begins at responder port (1). This port receives request messages and adds them to slot (2) inside the orchestration process, from which replicator task (3) gets them. The replicator creates two copies from a message; the first copy is used to search for the flights and hotels, whilst the second is used to remove combinations of flights and hotels that exceed the total budget from the response. Task (4) promotes the request id from the body of the message to the header of the message, so that it can be used for correlation purposes in tasks (6) and (7). Prior to the correlation, the first copy is chopped by task (5) into different messages, so that tasks (8) and (9) can assemble the outbound messages used to request all possible flights and hotels, respectively. The wrapping process for FF receives request messages from exit port (10), queries the FF application by means of solicitor port (11), slims the responses in task (12), and, then, by means of exit port (13) writes the responses to files. Symmetrically, the wrapping process for HF queries its corresponding application with messages received from exit port (14). Back to the orchestration process, task (15) builds every possible combinations of flights and hotels returned by the wrapping processes, and, finally, before making the response available at responder port (1), task (16) slims the response to ensure none of the combinations exceeds the maximum budget.




Travel Agency: Book Flights and Hotels Solution




Description

Not only requires a travel agency an integration solution that eases the process of searching for flights and hotels, but they also need to automate the booking process. Thus, the goal is to devise an EAI solution that takes a travel booking request as input and books the flights and the hotel specified.

The EAI solution involves five applications, namely: Travel System (TS), Invoice System (IS), Mail Server (MS), Flights Façade (FF) and Hotels Façade (HF). TS is an off-the-shelf software system the travel agency uses to register information about their customers and booking requests. The invoice service runs on the IS, which is a separate software system that allows customers to pay their travels using their credit cards. MS runs the e-mail service and is used for providing customers with information about their bookings. FF and HF represent interfaces that allow booking flights and hotels. They both, in addition to the MS (that allows for POP3 and STMP connections), represent applications that were designed with integration concerns in mind. Contrarily, TS and IS are software systems that were designed without taking integration into account, thus, the EAI solution must interact with them by means of their data layer. The only assumption we make is that every booking registered in TS contains all of the necessary information about the payment, flight and hotel, and a record locator which uniquely identifies the booking.

The EAI solution should periodically poll TS for new travel bookings, so that flights and hotel can be booked, the customer can be invoiced and provided with an email with the information about his/her travels.

A designed solution with Guaraná DSL

The EAI solution we have devised using Guaraná DSL is composed of one orchestration process that exogenously co-ordinates the applications involved in the solution. Some ports have access to the TS and the IS data layers by means of files. Translator tasks were used in the process to translate messages from canonical schemas into schemas with which the integrated applications IS and MS work.

The integration flow begins at entry port (1), which periodically polls the TS to find new bookings. Bookings are stored in individual XML files. For every booking, the entry port inputs to the process a message that is added to slot (2). Task (3) gets messages from this slot and replicates them, so that one copy is used to send the email to the customer and the other is used for the invoice and for the bookings. The first copy goes through filter task (4), which prevents exit port (5) from receiving messages without a destination email address. Task (6) promotes the record locator from the body of the message to the header of the message, so that it can be used for correlation purposes in tasks (8) and (9). Prior to the correlation, the second copy is chopped by task (7) into different messages, so that one outbound message containing the payment information goes to the IS and tasks (10) and (11) can assemble the messages used to book the flights and the hotel, respectively.


Please, refer to http://www.tdg-seville.info/rzfrantz/guarana for more examples and information on Guaraná.



Guaraná DSL Home