A first glance at Mule’s API capabilities

Since 2006, Mulesoft is offering middleware and messaging. Back then, building integrations was still heavily XML file based, with a set of Eclipse based plugins. This has changed though! With their Anypoint Studio, an Eclipse-based graphical development environment for designing, testing and running Mule flows, they really upped their game. Together with their new IPaaS platform CloudHub and their API capabilities, Mulesoft is looked at as a big player in IPaaS and API arena as shown in a previous article here where both Gartner and Ovum rate them as leaders. To add to that, Mulesoft was placed in the Forbes Cloud top 100 at number 20.

mulesoft

As I was quite curious how the new studio compared to my daily integration work with JDeveloper, I downloaded it and gave it a swing with a simple integration. You can download Anypoint Studio right here.

I started of by creating a simple mule project. File > New > Mule Project and clicking finish. As you can see, you can also use Maven but I will leave this unchecked for now.

MuleProject

After clicking finish you will see that it generates a project structure on the left side:

MuleProjectExplorer

In the middle is the canvas on which you can drag and drop items from the palette which is on the right. Straight away you can see there are quite a few connector which come out-of-the-box.

MuleProjectConnectors

I will start of with a HTTP connector. You can search in palette by typing HTTP. Now just drag the component onto the canvas. When you select the component, you can see the properties at the bottom. I will just keep the HTTP Display Name but I will set the Path to /simplemuleservice. Then I will need to generate a listener configuration by clicking the + sign on the right. I will accept all the default values which are 0.0.0.0 at port 8081. Next I am going to add a simple response. Look for Set Payload in the palette and drag it in the box next to the HTTP connector. Now select it and input a value. Mine is Hello…this is a simple Mule service.

setpayload

Next lets add some Logging. Add the Logger component and add it to the canvas. In the Message property of the Logger we can state what we want to log. The settings for the logging are defined in the log4j2.xml under resources. You can also use the Mule expression language here to access all sorts of info. I will just log all of the parameters send with the request by adding the next message: My simple mule service called with parameter #[message.inboundProperties.'http.query.params']

logger

Now save the whole project. Lets see if it also runs. Just right click the application a choose > Run as > Mule application.

You can see the application is running.

running

Now open your browser and type in server and port you defined. In my case http://localhost:8081/simplemuleservice. As I also added the parameters to the Logger step, I will also add some of those like this: http://localhost:8081/simplemuleservice?caller=Hugo&message=Hi

As you will see the browser will respond with the output we defined.

browser

And the logging shows:
loggerOutput

As you can see, creating a flow is much easier then before. Underneath it is still al XML but the visual wrapper around it makes it easier to work with in my opinion. This was actually a very simple flow. The next step is to do something which is a bit more work but more like an actual usecase.

Lets say we have a SOAP service running on-premise. We want to expose that service as an API to the outside world. So basically 2 things:

  • Design the API first
  • Convert REST to SOAP and call the webservice
  • Convert the SOAP response back to a JSON result and return it

I want to make an API for a webservice which I have used before…..the ConversionRateService. It has 2 input values. FromCurrency and ToCurrency. The result is ConversionRate result. So let’s start with creating a simple RAML file. Mine looks like this:

#%RAML 1.0
title: Conversionrate API
version: v1.0
baseUri: http://conversionrate/api
mediaType: application/json
documentation:
  - title: Introduction
    content: |
      API to lookup currency conversion rates
/convert:
  get:
    responses:
      200:
        body:
          example: |
            {
                "conversionrate" : "1.2345",
                
            }

Now that we have our RAML file, start a new project, in my case simplemule2. Don’t forget to tick the Add APIkit components box below and select the RAML file we just created.

newProject

When you click finish, Anypoint Studio will generate skeletal backend flows, based on the RAML file. The next step is to delete the Set Payload in the get:/convert:conversionrate-config. This is the flow in which we will call our webservice. Drag the Web Service Consumer component onto the canvas. Then down below we can create a Connector Configuration.

webserviceconsumer. I used the WSDL from an old project here.

Now that I have the call to the webservice, I have to map the rest call to soap. Drag a Transform Message before the Web Service Consumer component. If you look at the properties below, you can see on the left side the Input, and on the right side the output. As the input parameters will be incoming as http query parameters, we can just type in the mapper file on the right, how we want to map them.

mapRequest

Next we want to transform the result from SOAP to a JSON response so drag another Transform Message but this time place it after the Web Service Consumer component. Again look at the properties below. On the left side you can the the data model of the webservice response. The right side Output shows unknown. As I just want to map the response, you can edit the result on the right side like shown below:

mapResponse

As you can see, we will return a simple JSON response in which we map the conversionrate field to the webservice response field ConversionRateResult. Save it and we are ready to test the application. To make it easy for myself, I have created the conversionrate webservice using SoapUI by importing the WSDL and creating a Mock service. It is running on http://localhost:8005/mockConversionRateService as defined in the Web Service Consumer component.

Now right click the application and choose Run as–> Mule application. As you can see it will also start the APIkit console automatically. It shows the description of the API and an interface to make calls. I will just use a good old browser call like this: http://localhost:8081/api/convert?FromCurrency=EUR&ToCurrency=USD which result in

mockResponse

As you can see, it hits the SoapUI mock which returns a SOAP response which is processed by Mule which returns a JSON response.

restResponse

I was surprised how easy it was to create an API design first. The UI works nice and easy and everything is deployed nice and fast on the integrated Mule server. I have just scratched the surface here of Mule’s capabilities but I am liking what I am seeing.

Integration Platforms as a Service in 2016.

Working in the integration business, you probably noticed quite an increasingly upcoming market of data sources which are no longer on premise. With more and more PaaS and SaaS solutions, the need to integrate them becomes obvious. Salesforce should talk to your on-premise CRM system and your custom applications should update your Twitter feed for example. Back in the day, you would get a piece of software usually called something with Gateway in the name. It would be able connect your internal enterprise software to the evil and scary outside world and usually do something extra like authentication, authorisation and monitoring. But integrating with Salesforce is different then integrating with SAP so you have to build quite a lot of custom software which is expensive. Also you had configure every new connection to the outside world as you don’t want unwanted people fiddling around with your internal services.

How handy would it be, if there was a platform which was located in the cloud and which was able to connect to SaaS vendors out of the box? Then you just have to make 1 connection from your company network to the platform and every data stream could be configured through there.
Well ladies and gentlemen, meet iPaaS aka Integration Platform as a Service.

iPaaS

At this moment there are quite some vendors which offer an iPaaS solution. You have the obvious big boys such as Oracle, Microsoft and IBM but also some lesser software behemoths which according to Forrester, Gartner and Ovum are taking the cake. Lets look at the reports for 2016.

reports

In the left graph, you can see the Forrester Wave.
In the middle graph you see the Gartner Magic quadrant and in the right one you see the Ovum decision matrix

As an Integration consultant working with Oracle software I was surprised Oracle wasn’t present in 2 of the 3 reports. Oracle’s Integration Cloud Service was identified by Gartner as a visionary but they aren’t in the magic quadrant as they seem to lack ability to execute at the moment.

Dell Boomi
Looking at all the three reports, Dell Boomi has the best papers.

Dell Boomi serves sMBs and large enterprises with a unified, multipurpose integration platform to address multiple use cases, master data management (MDM), electronic data interchange (EDi), and APi management. Dell Boomi’s templates and crowdsourced data mapping suggestion capability enable it to support nonintegration specialists in a limited manner. Dell Boomi continues to innovate, introducing, for example, features like a new online community site and crowdsourced capabilities for support, suggestion, and error resolution. the vendor fits particularly well with sMBs looking for an all-purpose integration product to avoid investing in too many integration skills. large enterprises can also adopt Dell Boomi as a tactical choice to complete their soA strategic investments to cover cloud integration needs. some large companies that are unhappy with their heavy soA investments would benefit from turning to Dell Boomi as a strategic choice. Dell Boomi should guide integrators with governance and canonical formats to reduce the complexity of maintaining point-to-point interfaces.

  • It has a lot of application connectors right out of the box.
  • Web based IDE
  • Architected specifically for cloud-based delivery
  • Pricing start from 550,- dollars per month

Mule CloudHub
Mulesoft is also scoring well in the leader quadrant in two reports.

MuleSoft CloudHub has matured significantly since its introduction in February 2011, and is widely used by midsize-to-large enterprises for achieving cloud service integration. MuleSoft has executed an aggressive product roadmap and strategy to achieve impressive subscription growth over the last two-to-three-year period. MuleSoft CloudHub offers easy federation with Mule ESB, a lightweight and scalable ESB, to effectively support hybrid integration needs. In addition, MuleSoft Anypoint Platform for mobile enables API-led connectivity with backend applications and data sources, such as Salesforce.com, ServiceNow, SAP, and Siebel applications/platforms.

  • Also a lot of pre-build connectors
  • Platform lift and shift from on-premise to Amazon cloud
  • Anypoint eclipse based on-premise IDE
  • Pricing unknown

IBM WebSphere Cast Iron Cloud Integration
Also scoring strong in all 3 reports.

IBM WebSphere Cast Iron Cloud Integration is a relatively mature solution capable of supporting a range of integration needs, including cloud-to-cloud, on-premise-to-cloud, and mobile application integration. It offers easy connectivity to several other WebSphere middleware platforms to cater for key integration requirements, including B2B integration (via IBM Sterling Commerce suite) and API management. It can be used with IBM Mobile Foundation bundle to achieve connectivity between mobile applications developed on IBM Worklight and other on-premise and SaaS applications.

  • Very complete solution with an ESB, BPM, BAM, MFT
  • WebSphere Iron Cast Studio on-premise based IDE
  • Pricing unknown

Jitterbit
One of the the runner-ups…

The Jitterbit Harmony platform addresses multiple integration requirements, including data, process, hybrid, B2B, real-time APi management, and iot integrations via a single, comprehensive platform. Jitterbit is available through direct sales teams in north America, Europe, and Asia and includes a free 30-day trial available from the website. it has a differentiated partner program with more than 200 resellers, technology companies, and independent software vendors, including Autodesk, Microsoft, netsuite, salesforce, and SAP, to deliver prebuilt integration solutions and templates for specific business and industry processes that enable business users and technologists to quickly connect applications, data, and business processes across on-premises and cloud environments. Jitterbit’s single, multitenant cloud platform fits particularly well with companies that are strategically moving to the cloud but need to connect with on-premises systems and databases. Jitterbit has 12 years of integration expertise, has 40,000 freemium and paid customers, and is based in the san Francisco Bay area.

  • Limited market share but ambitious
  • Web-based IDE
  • Pricing start from 2000,- dollar a month