Thursday, July 15, 2021

Fine grained APIs vs Coarse grained APIs

In coarsed grained API, your data is typically housed in a few large components while a fine grained API spreads it across a large number of smaller components. 

If your components are equal in size but vary in complexity and feature, this could lead to a coarse grained granularity. To build a fine grained API, you divide your components based on the cohesiveness and coordination of their functionalities.

Following considaration will you to pick the right granularity level:

1. Reusability: Fine grained win.

Since more information is spread across a large number of APIa, they typically offer greater reusability than their coarse grained counterparts.

2. Scalability: fine graned win.

Fine grained APIs are designed to easily scale and improve the performance of your APIs.

3. Security & analytics: Fine grained win.

A fine grained approach enables you to provide security at a more granular level. It also collects detailed analytics to help resolve prod issues.

4. Management Overhead: Coarse grained win

Fine grained means you end up with managing more APIs, it typically increases overhead 

5. Ability to deploy: fine grained win

Since a coarse grained API is more destructive, it is more difficult to move changes and advance new functionalities towards production.

6. Agility & innovation: fine grained win.

7. Resource usage: coarse grained win.

Fine grained ressources consume infrastructure resources at a faster pace than coarse grained API.

8. Complexity: fine grained win

With a fine grained approach complexity at your node or leave leavel is simple.

9. Performance: tie

With a fine grained API,you only expose the information needed by the client. Therefore saving bandwidth, offers reliable performence, risk slowing down the client application since they will need to make multiple calls to get the information they need. With a coarse grained approach clients make fewer calls for the information they need. But it comes with the risk of potentially exposing unwanted data.

10. Latency: fine grained.


2 comments:

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...