Microservices Capabilities
As part of the move towards microservice-oriented development, Canvas offers the following features as microservices. These microservices shall be provided as Docker container images, which can be deployed on your project or application Dockers.
- Metadata – The Metadata microservice fetches the metadata of various Canvas components such as view, form, widget etc. Canvas provides two mechanisms for fetching the metadata namely, Java and Node JS. The Java service for fetching the metadata is inevitable whereas the Node JS is an optional one for the implementation teams. The Metadata service internally chooses to invoke a Mongo service or the in-memory cache to fetch the metadata based on the respective mechanisms chosen.
- Node JS Metadata Service -Â The Node JS metadata service is an event-based model where each service request is processed as an event. The threads for handling each request are passed to event handlers to fetch the metadata from cache. The Node JS metadata service stores, retrieves, and processes data in JSON format, thereby avoids data conversion from JSON to Java objects (Maps) and vice versa.
- Java Metadata Service -Â The Java metadata service is a thread-based model where each service request is processed as a thread. It loads the metadata from the database for the first time and stores it as an in-memory cache from which it serves the consecutive requests. The storage and retrieval of data involve data processing as it works with the table data directly. When the Node JS service is down, the requests to Node JS are routed to Java service to process them.
- Business Data Cache service – The business data cache service fetches the application data such as user details, product details etc. to be displayed in grids, charts etc. The business data cache service exposes the data fetching operation as APIs and the data are retrieved from MongoDB cache. These APIs can be used to access the business data using named services where the service returns the data based on entitlements.
- Authorization service -Â The authorization service handles the requests to fetch entitlements of a user. It returns the respective entitlement details mapped to the user from Redis storage. Therefore, for all incoming requests, Canvas checks the entitlements of the user using the authorization service. These entitlements will be verified to determine whether the request can navigate for further processing.
- Authentication service -Â The authentication service is a security mechanism that verifies the authenticity of the incoming request with the JSON Web Token (JWT ) security token attached to it. When the user logs in, Canvas creates a JWT with details embedded in it, which will help authenticate the subsequent requests. All further requests will have this JWT as a cookie and will be used to identify the User and Session.Â
- Notification service -Â The notification microservice is a standalone module that handles all requests to audit and alert events and sends out alerts/notifications to the end users via multiple channels like Email, SMS, Push Notifications and Inbox. These notifications can be sent based on priority viz. high, medium, low. Notification service also comes with a Quartz scheduler that can schedule a specific task to be executed at a specified time.
BENEFITS
Microservices-based development offers the following benefits:
- Modularized deployment of features
- Load distribution on the server
- Easier application scaling
- Reduction in server startup time from seven seconds to one second.
For more information, refer Canvas Microservices.