Skip to content

IntellectEU/catalyst-bootstrap

Repository files navigation

Build Status Coverage License

Catalyst

Catalyst Bootstrap (hereinafter Catalyst) is the first open source integration toolkit connecting traditional infrastructures with modern blockchain-based eco-systems and IoTs.

All implementations you do with Catalyst are lightweight by design, basically, it does not have any of specific abstractions and does not impose you to overengineer your implementations: you just select required connectors set and ask Catalyst to produce integration sample to follow up your task. Each of such samples get equipped with operational transactionality, error handling engine and secure by design features. In addition, cluster implementations of Catalyst provide with natural resilience and reliability of business flows it runs.

Technologically, Catalyst is built on top of two major frameworks:

Supported interfaces

Catalyst can be used as follows:

Tip

You can "curl" an instance to get a usage page with examples

Generating a project

If you click on "Generate Project" on the web ui of our instance, it will download a project archive with a Maven-based project and the necessary infrastructure to start a basic Spring Boot app.

Building from Source

You need Java (1.8 or better), Maven 3.2+ and a bash-like shell.

Building

Just invoke the build at the root of the project

$ ./mvnw clean install

If you want to run the smoke tests using Geb, you need to enable the smokeTests profile. Firefox should also be installed on your machine:

$ ./mvnw verify -PsmokeTests

If you want to build both the library and the service, you can enable the full profile:

$ ./mvnw clean install -Pfull

Running the app locally

Once you have built the library, you can easily start the app as any other Spring Boot app from the catalyst-service directory:

$ cd catalyst-service
$ ../mvnw spring-boot:run

Notes

Use cases

There are various types of use cases that are used to generate a project.

REST Connector

This use case includes a basic REST client part and server part implemented with a help of camel restlet component. You’ll get a project with a service that accepts HTTP GET requests with id parameter in the query string at

http://localhost:8080/people/{id}

and respond with a JSON representation of a person

{
    "name": "Luke Skywalker",
    "gender": "male",
    "height": "172",
    "birth_year": "19BBY",
    "hair_color": "blond",
    "homeworld": "Tatooine",
    "starships": [
        {
            "name": "X-wing",
            "model": "T-65 X-wing",
            "starship_class": "Starfighter"
        },
        {
            "name": "Imperial shuttle",
            "model": "Lambda-class T-4a shuttle",
            "starship_class": "Armed government transport"
        }
    ]
}

Follow link for more details http://camel.apache.org/restlet.html

SOAP Connector

The use case defines best practices of SOAP usage.

It includes server and client part. SOAP server performs temperature conversions from Celsium to Fahrenheit. A Client is configured to send requests to this server. Both client and server use camel routes to do their functions. A celsiumToFahrenheit.wsdl file which is located under resources/wsdl contains the full definition of the service, XML request and response types.

Before running a Spring Boot application, please, execute

mvn clean compile

Maven plugin jaxws-maven-plugin that is included in project’s pom file will generate POJO objects required for SOAP service from the aforementioned wsdl and put them into 'model' package. This package can be found under 'target\generated-sources' folder.

To run the application, please, execute

mvn spring-boot:run

Now your service is available at http://localhost:9090/intellecteu/catalyst/convert Use SoapUI to send a request to this service. To create a project in SoapUI, please, use the celsiumToFahrenheit.wsdl file and put request.

Sample of request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://intellecteu.com/types/convert">
   <soapenv:Header/>
   <soapenv:Body>
      <con:celsiumTemperature>
         <con:celsium>81</con:celsium>
      </con:celsiumTemperature>
   </soapenv:Body>
</soapenv:Envelope>

After sending this request, you will get the following response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <fahrenheitTemperature xmlns="http://intellecteu.com/types/convert">
         <fahrenheit>177.8</fahrenheit>
      </fahrenheitTemperature>
   </soap:Body>
</soap:Envelope>

License

Catalyst is Open Source software released under the Apache 2.0 license.