Build Third party multi-service provider integration using Event-Driven based architecture & Reactive programming
Objective
- This document highlights the solution approach for multi telecom service provider integration on AWS platform using Event-Driven based Architecture & reactive programming using the Java based Spring Boot framework & Java RX.
- In telecom, there are two types of incident management of creating the ticket, CM i.e. change management & TM i.e. trouble management
- CM Creating the request/ticket for the infrequent events. This can be happened one/two times in a year, as a production release plan.
- For the CM category, there are many service providers who are giving support for creating the ticket CM.
- TM Trouble Management, request/ticket would be created frequently in a year, like creating the ticket for the network router, cable, device, etc.
- About to crate TM ticket, there is so many TM category of multi-service provider.
Key challenges
- On-boarding the multi telecom service provider in a common platform is really challenging due to each service provider has their own semantic APIs which can pose a challenge.
- Latency While calling multiple service provider API, which increases the latency of service even in the case when calls are made parallel.
- Failure One service provider API failure could make a major impact on the performance degradation of the overall service.
- Timeouts For any service provider’s API time out, which could impact overall service performance and availability.
Conceptual solution approach
Conceptual HL solution design
Key components solution
User Interface: There are mainly three categories of users like web, mobile, IOS users. About user interface follows the single page application which is running on browser. Here, UI makes an API call to Service Orchestration MS with required service category provider parameters & receives a unique identifier for a specific telecom service provider.
Service Orchestration MS: This service basically generates the event message for a specific service provider it might be CM or TM provider. And the message sends to EVENT BUS. A callback to submit the response from the Ticket Processing MS (CM || TM) in a reactive manner. This MS will also play the role of both event producer & consumer.
Event Bus: It will play a major role in EVD-based architecture, it enables transportation, and routing, and redirect the event to the right services. Service orchestration service raises a set of events to the EVENT BUS for multi-service provider-based requests, there is one event for each partner that is listened to by the reactive services.
Reactive Services: All the ticket processing MSs will consume events from their respective EVENT BUS, after that, it will do the required processing i.e. transforming the API request/response, And making calls to third-party API (multi-service provider) in a parallel way. Each service also implements the JMS listener to consume the event from the corresponding QUEUE. After getting the response from the third-party service provider, it will PUSH the notification again EVENT BUS.
Caching: Service orchestration MS will consume the response for any specific third-party service provider from EVENT BUS, after that, it will commit the response to CACHE (Here REDIS). UI interface will poll the data from this CACHE and load it into an angular single-page application.
Technology Stack
Mapping conceptual components on AWS
AWS provides cloud-native services enabling how to do brain mapping with logical components & real components in AWS.
User Interface: Built the load balancing interface in Angular and host it on Apache Web Servers running (AWS ECS) AWS Elastic Container Service. AWS load balancing distributes traffic evenly across the containers. Running a container gives the required flexibility and scalability needed.
Service Orchestration MS: This microservice is built using Spring Boot and running on AWS ECS containers. The choice of Spring Boot and AWS ECS gives flexibility and scalability through cluster auto-scaling.
Event Bus: To build multi-service-provider integration on AWS using EDA, AWS SNS (Amazon Simple Notification) notification service is used. This offers the right capability, implemented by defining topics, this topic is subscribed by reactive services for each service provider integration, here, AWS SQS (Amazon Simple Queue Service) is used for each service provider-specific messaging QUEUE to consume the message from AWS SNS for asynchronous processing.
Reactive Services: These MSs are built using two different technologies, Spring Boot MS running on AWS ECS container and AWS Lambda functions. AWS Lambda is one of the key components which can be help full for building the multiservice provider integration using an event-driven, server-less computing platform in this scenario.
Sequential Workflow
Sequential workflow highlights.
- This Hash code is a unique identifier to identify any user-specific third-party CM/TM provider service-related request/ticket. This service will basically play two key important roles here, first of all, it will generate the message with hash key (234D9705G ) & PUSH the message to AWS SNS.
- While UI calls this service first time, then Service Orchestration will return the response with Hash Code & parallels it also do the other necessary operations
- It will first consume the message from CM/TM AWS SQS which is already subscribed with AWS SNS,
- Do the required transformation,
- After that using the REST client, it will call a third-party provider (CM/TM) service.
- Get the response from the third-party service provider & commit the response in NOSQL MongoDB against the Hash Key (234D9705G ).
- PUSH the response message also to AWS SNS against Hash Key (234D9705G ).
- This service also takes the responsibility of consuming the message from AWS SNS (i.e. this message is a combination of third-party service provider response & hash key (234D9705G )
- After successfully consuming the message from AWS SNS, it will commit the message to REDIS CACHE with key-value pair like Key: 234D9705G, Value: CM/TM third-party service provider response.
Service Catalogue
API Endpoint (Service catalog details)
In Service Orchestration, basically, two API Endpoints are used. One Endpoint is taking the responsibility of initiating the request and creating the CM/TM service provider ticket & another endpoint will take care of Polling the records from REDIS which we have received from third-party service providers.
1) Identify the third-party service provider & call their key details. (Using this endpoint, UI will initiate the request for third-party service provider data.
Http method : POST
Endpoint: /v1/telecom/tickets.
Request payload: User Id, Mobile No, Ticket category, service provider Id
Response payload: send HashCode : 234D9705G as a response.
2) Poll CM/TM specific response data from REDIS. (UI will use this endpoint to fetch the records from REDIS.
HTTP method: GET.
EndPoint : /v1/telecom/ticket/{HashCode} (Here HashCode : 234D9705G )
Data Storage
Third Party Remote API tracking
Event Notification Solution Approach
- One is read the template id or text file from AWS S3 bucket,
- Consume templateDataMap related message from AWS SQS.
- Transforming the request for third party CBUS tool.
- Using the REST client to make a connection to the CBUS tool, and send the request to this tool.
Handling third party API Security
Artifacts
Code Quality
- It will be integrated into Java project via Maven and by IDE plugins
- Rules will be used to check for violations.
- Its integrated into CI/CD pipeline as well as developer environment .
DevOps CI/CD
- AWS managed continuous integration & delivery service used to automatically build & deploy code.
- It's based on JENKINS.
- The team defines the build, test, and deployment pipelines in the AWS TERAFORM file and registers the project with the platform, when changes are pushed to the Source REPO , the platform will run the appropriate pipeline jobs.
- Unit tests and component tests are typically run as part of the build phase. AWS platform collects, tracks and displays these test results and static analysis reports.
- Build logs are also available to see the status of the build.
Load testing or performance engineering
How this solution approach address multi-service provider integration
Conclusion
In the IT digital field, APIs are the most common key mechanism for system integration. Building a solution which is resilient, scalable and share the best customers experience is one of the biggest challenge. Here, Event Driven based Architecture with Reactive programming offers a solution to address this issues. Using AWS cloud platform, now able to achieve the availability of over 99.9%, while maintaining a positive customer experience on this platform.
Thank you for providing useful content 👌
ReplyDelete