Unwired API-Led Connectivity

Unwired API-Led Connectivity

API-Led Connectivity

MuleSoft’s API-led Connectivity is a methodical way to connect and unlock data from systems and devices, composing data into processes, or delivering an experience through reusable and purposeful APIs that become primary building blocks for addressing enterprise grade integration needs and digital transformation. Based on Gartner’s Pace-Layered Application Strategy, it is intended to categorize, select, manage and govern applications APIs (microservices), divided into 3 categories: Experience APIs, Process APIs and System APIs, where in this context, terms such as “API” and “microservice” are often used to refer to Mule applications exposing RESTful web services and in this post I will use the same terminology.

No alt text provided for this image

Unwired

The picture above implies that API-Led Connectivity has to be done in a way that the communication between the APIs has to be done synchronously, where Experience APIs are bound to make HTTP call Process APIs and these last ones call System APIs also through HTTP protocol. Nothing wrong with that approach, however it is not fully decoupled as one API depends on the other within the 3 layers and also restricts the solution to only work with HTTP protocol and connector rather than possibly one or more of the other hundreds available in Mule.

This POST aims to present a different way of thinking and designing the collaboration between APIs in a truly decoupled and asynchronous way, still maintaining the layering and collaboration between them, purely using Anypoint Platform tools at the integration layer. That can be achieved by implementing publisher/subscriber model and leveraging Anypoint MQ, where not only Mule applications, but virtually any rest client can collaborate by publishing and consuming messages from queues.

In order to better explain this model, I have created a fictitious scenario where a company stores Product Offerings in Salesforce and wants to integrate that data with underlying 3rd party FTP, a Retail POST system that exposes an API and a Showroom Application Cache DB, according to the family of product. The diagram below illustrates how it would look like:

No alt text provided for this image

On top of implementing a de-facto unwired (truly decoupled) API-Led Connectivity, we are also saving on computer processing power, since rather than MuleSoft polling Salesforce for new or modified products, Salesforce is responsible for calling an API exposed by MuleSoft to notify new or modified products, working in a reactive, event-driven way.

Practice

For the developers reading this, as usual, now things becomes really interesting as we are about to prove that the theory is right by implementing the Mule applications that comprise this solution, except for the fact that we are going to implement only one of the experience APIs, the Construction Products Experience API.

Queues

Let’s start with the beating heart of that solution, Anypoint MQ where 3 queues will be created:

No alt text provided for this image

The next thing is to create client applications for the 3 APIs that comprise the solution:

No alt text provided for this image

System API

After creating the queues and the client applications, we can switch to Design Centre and create the RAML for Product Offerings System API, which will be called by Salesforce to notify new or modified products:

No alt text provided for this image

When finished and ready to be implemented, we can switch to Anypoint Studio and implement the API, where the implementation flow publishes product notification to Anypoint MQ:

No alt text provided for this image

Process API

The next thing will be the creation and implementation of the process API from where we subscribe to Product Offering Events and this demo only routes the event to the appropriate destination, according to product industry. If there isn’t a queue correspondent to the product industry (construction), the message gets published to an "unidentified industry" queue:

No alt text provided for this image

Experience API

At that stage, both system and experience APIs have been implemented, so we just have to implement the Construction Product Offerings Experience API, which for this demo only logs the payload received from Construction Product Offerings queue:

No alt text provided for this image

Solution Execution

Once all the 3 APIs are ready and deployed to Cloudhub, requests can be sent to the System API and the final result can be seen as log entries in Construction Products Experience API log if the product industry is “construction”.

No alt text provided for this image

Otherwise the message will land in the “unidentified” queue:

No alt text provided for this image

Conclusion

MuleSoft’s Anypoint Platform is a full-blown enterprise integration platform, which caters for all sorts of integration patterns and styles. It leverages an enormous number of out-of-the-box, enterprise grade connectors for a number of platforms that run in the cloud or on-premises, via several application-level protocols - Synchronous, asynchronous, mix-and-match and beyond… You name it!

Happy integrations!

Author

Eduardo Ponzoni works for Datacom New Zealand as an Enterprise Integration Development Manager and is the MuleSoft Practice Lead. He hails from Sao Paulo, Brazil and has over 18 years’ experience in the IT industry, having been in a technical leadership and managerial role with Datacom for about 3 years. He is well versed in integration practices and has a number of certifications in numerous technologies including MuleSoft and Microsoft.

To get in contact, feel free to reach out via LinkedIn or email

Alisdair Watson

General Manager | Integration at Datacom

4 年

Another fantastic article Eduardo! Very informative.

要查看或添加评论,请登录

Eduardo Ponzoni的更多文章

  • Co-Existence: Key Pillar to Unleash Success in Digital Transformation

    Co-Existence: Key Pillar to Unleash Success in Digital Transformation

    A recent research conducted by IDC, has revealed that between 2020 and 2023, 54% of companies worldwide are going…

  • Using Boomi to Rapidly Improve Customer Experience in Hospitality

    Using Boomi to Rapidly Improve Customer Experience in Hospitality

    Despite the pandemic and economic crisis from recent times, according to travel research institutes, approximately 445…

    4 条评论
  • Seamless ITSM using MuleSoft

    Seamless ITSM using MuleSoft

    Introduction Enterprises from all over the world are spending all their efforts and investing in improving customer…

    6 条评论
  • Low-Level Integrations using MuleSoft - Part 3

    Low-Level Integrations using MuleSoft - Part 3

    This is the 3rd and final part of this article about low-level integrations using MuleSoft. In the first part a…

  • Low-Level Integrations using MuleSoft - Part 2

    Low-Level Integrations using MuleSoft - Part 2

    During the first part of this article about low-level integrations using MuleSoft, a scenario was presented where a…

    2 条评论
  • Low-Level Integrations using MuleSoft - Part 1

    Low-Level Integrations using MuleSoft - Part 1

    In the modern days that we live in it's almost impossible to think of any type of communication between disparate…

    5 条评论
  • To be or not to be MuleSoft certified

    To be or not to be MuleSoft certified

    “To be or not to be” MuleSoft Certified - That is the question that very often developers and architects ask among…

    3 条评论
  • Test Pyramids in MUnit

    Test Pyramids in MUnit

    Intro During the MuleSoft Summit 2019 in Auckland, New Zealand I have had the absolute pleasure of presenting to the…

    6 条评论

社区洞察

其他会员也浏览了