SOA/MOA Flashcards
What is Service-oriented architecture?
Software design style / approach to build software.
Software that consist of services that ‘talk’ via net-protocols: atomic, reusable services.
In SOA, what is a service?
Software unit functionality encapsulates a business function.
Like: “Get credit card statement” or even “Payment”.
Can be accessed remotely and updated etc. independently (think cloud).
In SOA, what is an Enterprise Service Bus?
It is software which handles which orchestrates the services in a SOA application.
So the meaning of orchestrating is that it routes, and manages the communication while managing errors and maintaining sequence.
It also translates requests between services.
Dont say this but, think like a gateway that has a lot more business logic inside of it and then in a SOA application.
In SOA, the ESB handles some business logic. What kinds of logic?
It is like a business layer on top of the services:
- Handles business logic
- Route & format messages
- Security & Proxy
- Exception handling
In short it ties the services together.
Which communication principles are SOA based on?
Based on WSDL, RPC, SOAP, later on REST
What is the main principle of traditional SOA?
To break down the application into business-logic oriented services.
Is SOA typically web or programs?
Web
Does SOA have requirements to other systems outside of its own ecosystem?
Yes they can use other services 3rd party services.
There are two approaches to building SOA applications, which?
Top-down and Bottom up.
What is the Bottom-up approach
When you build the smallest components/services first.
Think like this:
You can start with the ESB as it does not require the whole stack to work and then add pieces to it. - small and many roll outs & investments.
What is the Top-down approach
Building services from the top - which needs other components to work.
Think like this:
requires much to be rolled out simultaneously. therefore, expensive, needs experienced developers who sees and plans for the requirements (so no mistakes). But people make mistakes so 80 % of these projects fail.
Pros with the SOA approach?
“Because you divide the application into services its easier to plan and work with and its easier and cheaper to update. It is also reusable”
From slides:
Retains RPC principles but standardizes the way components work together.
(RPC is a request–response protocol. An RPC is initiated by the client, which sends a request message to a known remote server to execute a specified procedure with supplied parameters. )
Reusable: Services are standalone.
Maintainable: ‘local’ changes and updates are easy.
Interoperability: uses well known protocols so it can work with 3rd party stuff.
Availability: ‘Everyone’ can call a service.
Reliable: often on cloud, easy to debug and fix smaller services.
Scalable: adding servers are easy.
Cons with SOA?
Because the services communicate over the network the systems can be hard to follow when debugging.
Complexity: If poorly designed the application can become complex and hard to implement. Or if its inherently just a complex program.
Initial investment is high
Hard to follow: it can be hard to follow the messages around the system.
Bottlenecks: can happen dependent on the case. (can be solved with caching maybe)
High coupling: can happen because a system is used a lot by other systems.
Slower because of the networking compared to a monolith.
What is the guidelines when building SOA based applications?
Service Statelessness
Loose Coupling: less dependency on others.
Service Abstraction: Black boxes to the outside world
Service Reusability: Logic is divided into services for reusability.
Service Autonomy: Services has control over the logic they deal with.
Service Composability: do one thing good, not 10 things bad.
Discoverability: be discovered - makes them available to be called.
Service Interoperability: Language agnostic
Standardized Service Contract: have a description of the service
Differences between SOA and Microservices?
Scope of the services:
SOA services scope is larger compared to microservices.
SOA is often synchronous (because ESB and things need to happen in sequence) think payment.
Microservices do not have ESB. They have smaller scope, own data source - some duplication in code because they all need to check the same things or access a db (does not mean that they are larger)