Resilient Microservice Design – Bulkhead Pattern

Need For Resiliency:

MicroServices are distributed in nature. It has more components and moving parts. In the distributed architecture, dealing with any unexpected failure is one of the biggest challenges to solve. It could be a hardware failure, network failure, etc. The ability of the system to recover from the failure and remain functional makes the system more resilient. It also avoids any cascading failures.

Why Bulkhead?

A ship is split into small multiple compartments using Bulkheads. Bulkheads are used to seal parts of the ship to prevent the entire ship from sinking in case of a flood. Similarly, failures should be expected when we design software. The application should be split into multiple components and resources should be isolated in such a way that failure of one component is not affecting the other.

How to Implement Oauth2 Security in Microservices

Purpose

I wanted a solution where we can easily captured Oauth2 and Oauth2 client for the secure communication with all of the microservices. Focusing, how to achieve oauth2 full flavor into microservices architecture. User can’t access API without token. The token will be available when user given basic and authentication details to generate token for access API.

All requests will consider one entry point API-Gateway but, service-to-service can communicate. The API-Gateway will dynamic routing using Zuul Netflix OSS component. Every request will check authorization when request will arrived into service and service will request authorization server to verify is either authenticate or not. The entire Meta configuration settled into the central configuration on github (You can manage on any repository).

GraalVM — Byte Code to Bit Code

Early adopters for Cloud-Native (microservices, serverless) are now moving to its next wave called v2.x., leveraging the maturity, learnings, and identified shortfalls to design next-level stuff.

Let's recap few purposes of going cloud-native that we will relate here:

Serverless Batch Process With Kumologica

A batch job is a scheduled block of code that processes messages without user interaction. Typically a batch job will split a message into individual records, performs some actions on each record, and pushes the processed the output to other downstream systems.

Batch processing is useful when working with scenarios such as

Targeting Kubernetes Cluster With Gremlin Chaos Test

Gremlin is a leading software company focusing on chaos-test in the market. It also has a tool similar to Chaos Monkey which belongs to Netflix, but is more customized to test the system with random loads or scheduled shutdowns. In the article below, we will be testing a simple Kubernetes cluster running on EKS with Chaos Test.

Why Is Chaos Testing Important?

Chaos Engineering is used to improve system resilience. Gremlin’s “Failure as a Service” helps to find weaknesses in the system before problems occur.

A Journey From MuleSoft to Serverless Integration

In the current highly volatile market trend the cost optimizationinfinite scalability, and agile development tools are very vital for any enterprise digital roadmap. The fast-growing trend of FaaS world with AWS Lambda, Google Cloud function, and Azure Fn has already received recognition of small, medium, and large enterprises and this indicates that the move from the iPaaS to FaaS is natural and unavoidable. This move opens a new world of Serverless Integration.

The key features of serverless integration are:

Breaking Down Serverless Anti-Patterns

Serverless adoption rates have been climbing ever since the technology was brought into the spotlight with the release of AWS Lambda in 2014. That is because serverless makes an offer that cloud developers simply can not resist, providing the following benefits:

  • Server management is abstracted to vendor
  • Pay-as-you-go model where you only pay for what you use
  • Automatically scalable and highly available

These benefits are achieved by the characteristics that define the technology. Serverless applications are stateless distributed systems that scale to the needs of the system, providing event-based and async models of development. This has worked in favor of the technology, resulting in a desirable solution for the cloud.

API Development – Glossaries

In the API development world, we frequently hear many abbreviations which are important to know in terms of its full form and the definition of the same. Here I will try to put those abbreviations and small description about it. To work on API, one should have good understanding of the abbreviations which I am putting it here. 

Keyword Full Name Description
API Application Programming Interface It is an intermediary software that allows applications to talk to each other . There are many types of APIs like Java APIs, Web APIs (SOAP and REST), RPC
REST Representational State Transfer It is a software architectural style that suggest  set of constraint to be used to create webservices. If any webservice applies these constraint then it is called RESTFul Services
SOAP Simple Object Access Protocol It is a messaging protocol which is being used to exchange the structure information while working on Web Services. These are mainly Stateful Services. Uses XML to exchange the message
DDD Domain Driven Design It is an approach to software development and widely used in the micro services based architecture. It basically suggests to think application in perspective of domain and define definite boundaries of the domain before doing development
SDD Specification Driven Design It is also a software development process that uses API specification as a guide for implementation. If anything changes in the implementation then Specification needs to be updated first then development
CRUD Create Read Update Delete It is nothing but terminology which is being used for Creating, Updating , deleting or Reading any resource. this word commonly used in API Development, DB operations 
CORS  
Cross-origin Resource Sharing
It is a mechanism that allows restricted resources on the web page to be requested from another domain. Assume if one website is requesting data from another website and both are deployed in different Domain or network which are not trusted. then CORS needs to be enabled.
ESB Enterprise Service Bus It is an integration pattern where centralized software components perform integration to back-end system and make those integration and transformation available as Services for other systems to use. IBM, Mule , TIBCO etc provides standard ESB 
JSON  
Javascript Object Notation It is nothing but a lightweight data exchange format. which is a key - value pair and heavily used in the RESTFul APIs and other web based application development
JWT Javascript web token It is standard for safely passing in space constraint environment. Simplicity, Compactness and usability is the light of the architecture. Click here for more details 
HTML Hypertext Markup Language It is a standard markup language for documents designed to be displayed in the browser. For detail reading click here
HTTP Hypertext transfer protocol
It is application layer protocol for distributed, collaborative and hypermedia information systems. 
HATEOAS  
Hypermedia as the Engine of Application of State

RAML  
 RESTFul API Modeling Language
RESTful API Modeling Language is a YAML-based language for describing RESTful APIs. It provides all the information necessary to describe RESTful or practically RESTful APIs. More detail click here
URL Uniform Resource Location
It is basically a web address and reference to the web resource. Ex.  
URI Unified Resource Identifier
It is compact sequence of characters that identifies and abstract or physical resource.  Read this website for more detail
WSDL Web service Definition Language
It is used to describe the SOAP based web services. It provides the location of the service . It defines data types used in the services, data elements for each operation, operation that can be performed and protocol and data format for each type. 
XML  
Extensible Markup Language
It is also a markup language that define set of rules for encoding documents in format which is human and machine readable. Heavily used in Web services for format exchange and other documentation like ORM. More details 
YAML  
Yet Another Markup Language AML is a human-readable data-serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. More details
SOA Service Oriented Architecture It is again an architectural style where Services are provided to other components by application over the network using different-2 Communication channel. Every service logically represent the business activity, Self-Contained in the nature, Black box for the consumer and many consist many other services internally. Read service based architecture in detail here
gRPC gRPC, Remote procedure Call It is an open source RPC System for high performance framework that runs in any environment. You can look for more details here
OAuth2 OAuth2.0 It is a standard protocol for  Authorization for the API and Micro-services access. more details click here
GraphQL
It is a query language for your API and runtime for fulfilling those queries with existing data. More details click here



That's it for this article. 

Building a Secure REST API with OpenID Connect

Introduction

In this article, we’ll take a look at building a secured REST API by integrating with Okta as the identity provider via OpenID Connect (OIDC). This article is based on the DZone article Building a Java REST API with Quarkus, which explains how to create a Java REST API with Quarkus and Okta. We will be implementing a similar scenario here by using Ballerinalang, and show how it’s simpler and more straightforward to implement compared to our Java counterpart. 

Prerequisites

  • Ballerina Installation(>= v1.2.6)
    • Verify the installation by typing “ballerina -v” in the command line. This should output the currently installed Ballerina version. 

Orchestrating Puppeteer From Lambda With Zero Lines of Code

In this article, we will look into the details of how to use the Kumologica Puppeteer node to capture website content. For those who are not familiar with Kumologica, let me give a quick overview.

Kumologica is a free low-code development tool to build serverless integrations. Kumologica provides drag and drops visual designers to build your integration flows or micro-services that can be tested and deployed on to a serverless infrastructure (AWS Lambda).

Splunk Logging in Lambda Using Low Code Approach

A centralized logging management solution like Splunk, Datadog, Sumologic, etc. enables organizations to collect, analyze, and display logs through a single pane of glass.

In this article, we will see how application logs can be sent to Splunk from lambda using the Kumologica Splunk node.

Data Mapping in Kumologica

Data mapping is a key element in integration. Most of the prominent integration tools provide different capabilities for data mapping.

In this article I thought of sharing on how data mapping can be achieved in Kumologica . Kumologica uses JSONata as the base for data mapping. JSONata is a Lightweight query and transformation language for JSON data. It supports complex queries expression which can be achieved with minimal syntax and has a location path semantics of Xpath 3.1.

Microservices, Event-Driven Architecture and Kafka

Imagine having a huge monolith application with a lot of complex functionalities strongly tied together. The scalability is a big challenge, the deployment process could become very cumbersome, and, since the internal components are highly coupled, to change the functional flow isn’t gonna be that easy.

Maybe a lot of people are familiar with this concept since this was the standard way to build an application until few years ago and that there are still a lot of monoliths in production these days.

SSL-Based/Secured FeignClient Example in Java Microservices With Eureka

Prerequisite:

  • You should have one Discovery Server up and running
  • An SSL based microservice registered with the above Discovery Server up and running which we are going to consume from below FeignClient
  • You need to generate your client application's keystore and trust store. You need to add your server certificate into your client application's trustStore and add your client application's certificate in the Server application's trustStore.

Before reading this article make sure that you know about Spring Feign Client. In this article, I will explain how to develop a Feign Client application/service to establish two way SSL based communication. In simple words, how a Feign Client can make an HTTPS REST service call. Also for this project, I assumed that we have a Eureka discovery server and one SSL based Spring boot microservice called global-repository. In other words from our FeignClient below, we are going to consume an SSL based microservice (global-repository)with a valid certificate.

Local Development With OpenShift and Tilt

In this article, I am going to show you how to use Tilt to facilitate local OpenShift development. Tilt's capabilities will be demonstrated in a practical example that uses buildah and CodeReady Containers. If you develop containerized applications on OpenShift, this blog post is for you.

How Does Tilt Facilitate Local Development?

The diagram below depicts a development workflow orchestrated by Tilt. After you execute the tilt up command on your development machine, Tilt will keep running while performing the following actions: