Coherent Logic Enterprise Data Adapter

Project Website | Maven | Bamboo Automated Build Results

Maven Central Details:

Group: com.coherentlogic.enterprise-data-adapter
Modules: { see here }
Version: 2.0.2-RELEASE

The problem: You need to call a RESTful web service specifically for the purpose of bringing data in-house, for use in your business. The data needs to be modeled and persisted to any number of databases, it needs to run as either a standalone application, an embedded application, or an enterprise application; the solution should use common APIs for developing in the Java language; it should prevent unnecessary calls being made to the server, it should stop incorrect calls being made to the server, and it should be scriptable. The solution needs to be uniform for all web services the business calls, irrespective of the format (it should be able to work with both XML and JSON-based web services).

The solution: Use the Coherent Logic Enterprise Data Adapter Framework.

The Coherent Logic Enterprise Data Adapter delivers the following:

  • A Maven Bill of Materials with baseline dependencies required for this and other projects.
  • A component framework expressed as Spring beans that is used to query a data source via a builder pattern.
  • A domain model based on the Java Persistence API (JPA).
  • An API that works with either RESTful or SOAP-based web services.
  • Predetermined dependencies for transforming XML, JSON, and CSV data; other formats can be easily handled as well.
  • A cache-neutral interface so that repeat queries for the same data are not performing expensive operations, such as making remote calls for data.

This framework is used by the following APIs — feel free to refer to any of these for implementation examples, or to use if the adapter is already available for the web services you’re planning to call:

The AbstractQueryBuilder assists developers in delivering a domain-specific language which looks almost identical to the URI they’re trying to invoke — for example:

the following URI:

https://api.stlouisfed.org/fred/series/observations?series_id=EXJPUS&api_key=redacted

is expressed in Java as:

queryBuilder
    .series ()
    .observations ()
    .setSeriesId("EXJPUS")
    .doGet(Observations.class)

the following URI:

https://api.worldbank.org/countries/all/indicators/SP.POP.TOTL?date=1998:2012

is expressed in Java as:

queryBuilder
    .countries("all")
    .indicators("SP.POP.TOTL")
    .setDate("1998:2012")
    .doGet(DataPoints.class)

Since URIs are simple strings the AbstractQueryBuilder can be instantiated with a cache provider to prevent remote calls from being made by checking if the URI is already associated with an object in memory. This can increase application performance substantially.

See also:
[1] How to Consume RESTful Webservice in Java Spring
[2] Calling REST API from Java Code
[3] Consume REST Service in ADF
[4] HTTP Utils
[5] Why ESB is Bad
[6] Spring RestTemplate XML Example
[7] Open Source Integration Middleware

Summary
Aggregate Rating
5 based on 1 votes
Software Name
Coherent Logic Enterprise Data Adapter
Operating System
Agnostic (Java)
Software Category
Middleware
Price
USD 0.00
Landing Page

Leave a Reply

Your email address will not be published. Required fields are marked *