API Decision Tree

Zhao Li
Analytics Vidhya
Published in
2 min readApr 11, 2021

--

Problem

I wanted to figure out when I should use certain API technologies, specifically:

Solution

I searched the web and read a handful of “versus” articles & “getting started” tutorials and wanted to capture my naive and over-simplistic decision process/tree here, just in case I forget what I had learned in the future.

I have not tried all of these different technologies so I cannot say for certain, but the following would be my “80/20 rule”/”rule-of-thumb” guideline, should a project present a need to choose a API design/architecture.

TL;DR

A decision tree
Decision Tree

Pull/Poll or Push

If API needs to support Pull/Poll, then prefer REST or GraphQL.

If API needs to support Push, then prefer gRPC, SSE, or websocket.

Starting Out/Simple or On Going/Complex

Given API needs to support Pulling/Polling data:

--

--