API Days Paris - When RESTful maybe considered harmful
My presentation from API Paris, Dec 2015. Discussing the limitations and problems of Web APIs at scale, and looking at real-time streaming APIs as a better alternative in some use cases.
1234567890, title : “Something else”, db_key : “some_thing_item”, modified_date : “06-08-2015”, … } It’s like the Internet is running with Debug turned on @gssor
prove to be much more robust and fault-tolerant. • Producers and consumers are truly independent. • Scalability is easier to achieve, and we can distribute messages to multiple systems at a time. @gssor
• It will let you down – Insufficient bandwidth – Inconsistent bandwidth – High latency – Loss of connectivity on a regular basis • Be sympathetic to realities of the network @gssor
TCP slow-start are usually not a good match for constantly dropped connections • Network interface kills battery • Large responses + periodic polling = bad @gssor
know - when application response time exceeds their expectations they assume the system is down • Slow responses tie up resources on the called system and the calling application 24 A responsive system is quick to react to all users — under blue skies and grey skies — in order to ensure a consistently positive user experience.
react to variable conditions and failures • A resilient system keeps processing transactions, even when there are transient impulses, persistent stresses or component failures disrupting normal processing 26 Resilient = Reliable
allocate / de-allocate resources for every individual component or client as demand varies • Elasticity also requires non-blocking design 27 Elastic is another word for Scalable
may be event-driven, actor-based, or a combination of the two • An event-driven system is based on events which are monitored by zero or more observers – The caller doesn’t need to block waiting for a response from the invoked routine • Event-driven applications are not focused on the call stack, but rather on triggering events • Events may be encoded as messages that are placed in a queue that is monitored by zero or more observers 28