Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between an API and SOA

Tags:

soa

api

There are a lot of What is the difference between... questions out there but I couldn't find this one.

Wikipedia says this about an API

An application programming interface (API) is a source code-based specification intended to be used as an interface by software components to communicate with each other.

And this about SOA

SOA also generally provides a way for consumers of services, such as web-based applications, to be aware of available SOA-based services.

Aren't both technologies where you present services to other services?
Could someone expand on this?

like image 778
Niklas Avatar asked Feb 29 '12 09:02

Niklas


People also ask

Is rest a SOA?

REST Web ServicesREST (Representational State Transfer) is a software architecture style aimed at distributed hypermedia systems such as the web. This term refers specifically to a collection of principles for the design of network architectures. There are several projects that can benefit from a REST architecture.

What is considered a SOA?

SOA, or service-oriented architecture, defines a way to make software components reusable and interoperable via service interfaces. Services use common interface standards and an architectural pattern so they can be rapidly incorporated into new applications.

What is difference between SOA and microservices?

The main difference between SOA and microservices: Scope To put it simply, service-oriented architecture (SOA) has an enterprise scope, while the microservices architecture has an application scope. Many of the core principles of each approach become incompatible when you neglect this difference.

How is SOA different?

Service reusability: In SOA, applications are made from existing services. Thus, services can be reused to make many applications. Easy maintenance: As services are independent of each other they can be updated and modified easily without affecting other services.


2 Answers

Service Oriented Architecture is an architectural methodology. It is a way of specifying separation of responsibility from a business oriented point of view into independent services, which communicate by a common API (often but not necessarily by publishing events to a bus).

As an example, you could have one service responsible for capturing customer orders, which publishes an OrderCaptured event to the bus; and a separate service responsible for tracking when the customer is billed and how much is owed, which subscribes to the Bus and responds to the OrderCaptured event. The first service might not need to know anything about billing due to the separation of responsibility. And the two services don't need to know about each other either, only about the events going on around them.

An API is an interface that a component/service exposes so that other components can communicate with it. In the example above the Bus is providing a common API for a number of services to communicate.

In summary:

API = any way of communicating exposed by a software component.

SOA = a set of enterprise architectural design principles to solve scalability issues by splitting responsibility into services.

like image 90
perfectionist Avatar answered Sep 20 '22 16:09

perfectionist


In other Words:

SOA is the Architecture pattern.

An API is one of the ways to enact or to enable the SOA pattern.

SOA is the "Planning" {Blue Print} design method.

API is the actual implementation of the design.

like image 25
Kbdavis07 Avatar answered Sep 24 '22 16:09

Kbdavis07