0% found this document useful (0 votes)
3 views

APIs Paradigm

The document covers the concepts of APIs, monolithic architectures, and microservices, detailing their definitions, advantages, and disadvantages. It highlights the need for microservices in modern software development to achieve business agility and faster delivery. The document also discusses principles for designing microservices and their interactions, emphasizing the importance of independence and modularity.

Uploaded by

Sukrutha Gowda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

APIs Paradigm

The document covers the concepts of APIs, monolithic architectures, and microservices, detailing their definitions, advantages, and disadvantages. It highlights the need for microservices in modern software development to achieve business agility and faster delivery. The document also discusses principles for designing microservices and their interactions, emphasizing the importance of independence and modularity.

Uploaded by

Sukrutha Gowda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

By now we have covered:

• HTTP protocol
• HTTP communication (client – server)
• HTTP communication methods
• Advantages of various HTTP communication operations
• HTTP security (HTTPS)
• How HTTPS enabled?
• Cookies - advantages and challenges
APIs Paradigm

Instructor: Hafiz Ali


Acknowledgement
Slides used in the lecture notes of this course come from or are adapted from the following sources:

Lalit Kale, Duduman Bogdan Vlad and Ryan Baxter


Learning goals
• What is API?
• Monoliths
• Monoliths advantages and disadvantages
• Microservices
• Principles of microservices
• Designing microservices
• Microservices advantages
What is API?
API stands for Application Programming Interface. In the context of APIs,
the word Application refers to any software with a distinct function. Interface
can be thought of as a contract of service between two applications. This
contract defines how the two communicate with each other using requests
and responses. Their API documentation contains information on how
developers are to structure those requests and responses.

For example, the weather bureau’s software system contains daily weather
data. The weather app on your phone “talks” to this system via APIs and
shows you daily weather updates on your phone.
What are Monoliths?
A monolithic architecture is a traditional model of a software program, which is built as a
unified unit that is self-contained and independent from other applications.

Examples and features:

• Netflix. Amazon.com, Ebay, Paypal


• Single-Tiered Software application
• Responsible not for a particular task
• Long build time
• Building and deploying the whole application
• Support only vertical scaling
Dependencies: a big problem
Monolith Architecture
Monolith Architecture (Failure)
Merits and demerits of Monoliths
Merits
• A single layered architecture
• A single technology stack
• A single code base maintained by multiple teams
Demerits
• All parts are interconnected
• Many other systems are connected to your system
• Hard to change, hard to maintain
• Slow innovation
• Hard to move to newer technologies
Why microservices?
• Needs a business transformational instrument in:
o Organizational Restructuring
o Supporting hyper-scale growth
o Scaling business capabilities
• Provides Business Agility and faster pace to delivery.
• Unlocks experimentation and learning capabilities on
organizational level which is not at all possible with
Monolithic architectures.
What are microservices?
Microservices. Evolution
Microservices. Evolution
Microservices
Every microservice is different, yet they share some common characteristics.
Microservice architecture
What is NOT Microservices?
If you force monolith to get Microservices any which way, all you can get is Microlith

Microservice?

Microlith

Monolith Monolith
Microservice vs. scaled monolith
What is NOT Microservice?
Service discovery in microservices
Principles of Microservices

Independence Automation
Independence Fail-Safe
Independence Isolation

Fail Based on Business


Capability
Deployment Security Infrastructure Predictably

Technology Single
Responsibility
No SPoF
Testing Operations
Versions

Developme Hide
Languages
nt Automated ‘Implementation’
Recovery
Designing Microservices

• ‘Micro’ is misleading most of implementations


• It is NOT about how many lines of code in your microservice have
• Should be Manageable by a small, self-sufficient team
• Evolutionary design
Designing Microservices

• Service = Business Capability


• Single Responsibility Principle(SRP)
• Find the Seams around Service Boundary.
• DDD – Follow Bounded Context Pattern
• Follow Consumer Driven Contracts
Designing Microservices

• Ensure independent development and deployment of the service

• Focus more on the scope of the microservice, but not about


making the service smaller

• SOA = Coarse Grain Services while microservice should have a very


few operations/functionalities and simple message format.

• It is often a good practice to start with relatively broad service


boundaries to begin with, refactoring to smaller ones (based on
business requirements) as time goes on.
Microservices Interactions
• Orchestration vs. Choreography
Microservices Interactions
• Understanding Message Queue, Message Bus

• FIFO • No sequential preference


• Same system different processes • Pub-Sub Mechanism
• Separate queues for separate • Single Message bus for connecting
dependent Process different applications
API Gateway
Microservices. Advantages
• Simple
• Modularity
• New features as microservices
• Small codebase
• Easy to scale
• Easy to deploy - loosely coupled
• System resilience
Microservices. Advantages
• Technology independent
• Replaceable parts
• High performance
• Easy to test
• Autonomous
• Specification change is frequent
Microservices. Advantages
• Single Responsibility Principle
• Light-weight communication
THANK YOU

You might also like