building adaptive apis

19
Building adaptive mobile APIs with legacy services Priyank Gupta

Upload: priyank-gupta

Post on 20-Feb-2017

163 views

Category:

Technology


0 download

TRANSCRIPT

Building adaptive mobile APIs with legacy servicesPriyank Gupta

1.75 Billion people used Smartphones in 2014. The

count will rise to more than 2.0 Billion in 2015

- eMarketer

Legacy system and services

A legacy service

would typically use old technologies. Services

consumers with conventional needs.

Challenges?

Tightly coupled

Mobile consumers get tightly bound to the data

and payload format served by legacy systems. Legacy

services are often designed for high bandwidth, low

latency. Tends to be chatty.

Orchestration responsibility

Building orchestration logic and awareness about distributed systems in

mobile apps couples them tightly with data sources.

Existing multiple consumers

Multiple consumers already exist in ecosystem. They are often tightly bound to data

sources. Change at data source will often have ripple

effects downstream.

No control over data source

Legacy systems are outside the control of consumer

apps. Their evolution and technology choices are

made independently and needn’t always consider

consumer side benefits and constraints.

A small architectural change can improve the situation radically.

Lets look how.

Proxy in the middle

A dumb http proxy

That sits between legacy services and your consumers.

Why is that better?

Distill what is relevant

Adaptive API helps you exclude extra bits of

information from verbose services. This optimizes payload over potentially

slow mobile networks

Uniform payload format

Transform disparate and diverse payload formats

into a consistent and optimized one.

Source system abstraction

Single API to expose aggregated data from

multiple source services/systems.

Bridge to new age paradigms

Help traditional web services make a leap by

creating RESTful wrappers.

Independent evolution

Allow legacy source to evolve at a pace that is different from that of consumers. Versioning

adaptive API allows decoupled releases between both.

So, use always?

When is it an overkill?

■ When you own / control data sources

■ Limited or no other consumers

■ When existing services have considerations for mobile networks

■ When response time is critical **

Would love to hear feedback

Priyank Gupta

THANK YOU