A BRIEF HISTORY OF THE FUTURE OF THE API QCon London 2020 Mark - - PowerPoint PPT Presentation

a brief history of the future of the api
SMART_READER_LITE
LIVE PREVIEW

A BRIEF HISTORY OF THE FUTURE OF THE API QCon London 2020 Mark - - PowerPoint PPT Presentation

A BRIEF HISTORY OF THE FUTURE OF THE API QCon London 2020 Mark Rendle @markrendle visualrecode.com BRIEF HISTORY 1970s to now APPLICATION PROGRAMMING INTERFACE Message Oriented Middleware (MOM) ISAM 1970s Object Oriented


slide-1
SLIDE 1

A BRIEF HISTORY OF THE FUTURE OF THE API

QCon London 2020 Mark Rendle @markrendle visualrecode.com

slide-2
SLIDE 2

BRIEF HISTORY

► 1970s to now

slide-3
SLIDE 3

APPLICATION PROGRAMMING INTERFACE

slide-4
SLIDE 4

► Message Oriented Middleware (MOM) ► ISAM

1970s

slide-5
SLIDE 5

► Object Oriented Programming ► Shared Libraries

► DLL, OCX, Shared Objects

► Dynamic Data Exchange (DDE) ► Sockets

1980s

slide-6
SLIDE 6

► Client-Server ► Common Object Request Broker Architecture (CORBA) ► Component Object Model (COM)

► DCOM, COM+

► World Wide Web ► Service Oriented Architecture (SOA) ► SOAP

1990s

slide-7
SLIDE 7

“ ”

Architectural Styles and the Design of Network-based Software Architectures

Roy Thomas Fielding, UC Irvine

2000

slide-8
SLIDE 8

► XMLHttpRequest ► JSON ► Windows Communication Foundation (WCF) ► ReST ► Mobile devices

2000s

slide-9
SLIDE 9

► eBay API ► Amazon ► Twitter ► Facebook Platform

2000s

slide-10
SLIDE 10

► Cloud computing ► Amazon Web Services ► Microsoft Azure

2000s

slide-11
SLIDE 11

► Microservices ► Containers ► Kubernetes ► Web Sockets

2010s

slide-12
SLIDE 12

WIRE FORMATS

slide-13
SLIDE 13

CORBA General Inter-ORB Protocol

0x47 0x49 0x4f 0x50 -> GIOP, the key 0x01 0x00

  • > GIOP_version

0x00

  • > Byte order (big endian)

0x00

  • > Message type (Request message)

0x00 0x00 0x00 0x2c -> Message size (44) 0x00 0x00 0x00 0x00 -> Service context 0x00 0x00 0x00 0x01 -> Request ID 0x01

  • > Response expected

0x00 0x00 0x00 0x24 -> Object key length in octets (36) 0xab 0xac 0xab 0x31 0x39 0x36 0x31 0x30 0x30 0x35 0x38 0x31 0x36 0x00 0x5f 0x52 0x6f 0x6f 0x74 0x50 0x4f 0x41 0x00 0x00 0xca 0xfe 0xba 0xbe 0x39 0x47 0xc8 0xf8 0x00 0x00 0x00 0x00 -> Object key defined by vendor 0x00 0x00 0x00 0x04 -> Operation name length (4 octets long) 0x61 0x64 0x64 0x00 -> Value of operation name ("add") 0x20

  • > Padding bytes to align next value

https://www.ibm.com/developerworks/library/ws-underhood/index.html

slide-14
SLIDE 14

XML

<?xml version="1.0" encoding="utf-8"?> <Books> <Book Year="1979"> <Title>The Hitchhiker&apos;s Guide to the Galaxy</Title> <Author>Douglas Adams</Author> </Book> <Book Year="1983"> <Title>The Colour of Magic</Title> <Author>Terry Pratchett</Author> </Book> </Books>

slide-15
SLIDE 15

SOAP

<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope/" soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> <soap:Body xmlns:m="http://books.org/books> <m:Books> <m:Book Year="1979"> <m:Title>The Hitchhiker&apos;s Guide to the Galaxy</m:Title> <m:Author>Douglas Adams</m:Author> </m:Book> <m:Book Year="1983"> <m:Title>The Colour of Magic</m:Title> <m:Author>Terry Pratchett</m:Author> </m:Book> </m:Books> </soap:Body> </soap:Envelope>

slide-16
SLIDE 16

JSON

{ "Books": [ { "Title": "The Hitchhiker's Guide to the Galaxy", "Author": "Douglas Adams", "Year": 1979 }, { "Title": "The Colour of Magic", "Author": "Terry Pratchett", "Year": 1983 } ] }

slide-17
SLIDE 17

Protobuf

syntax = "proto2"; message Book { string title = 1; string author = 2; int32 year = 3; }

slide-18
SLIDE 18

Protobuf

0A 38 0A 24 54 68 65 20 48 69 74 63 68 68 69 6B 65 72 27 73 20 47 75 69 64 65 20 74 6F 20 74 68 65 20 47 61 6C 61 78 79 12 0D 44 6F 75 67 6C 61 73 20 41 64 61 6D 73 18 BB 0F 0A 29 0A 13 54 68 65 20 43 6F 6C 6F 75 72 20 6F 66 20 4D 61 67 69 63 12 0F 54 65 72 72 79 20 50 72 61 74 63 68 65 74 74 18 BF 0F

slide-19
SLIDE 19

► Thrift ► Avro ► MessagePack ► BERT ► BSON

OTHER WIRE FORMATS

slide-20
SLIDE 20

PROTOCOLS

slide-21
SLIDE 21

► Raw, fast and painful

TCP/IP

slide-22
SLIDE 22

► Text-based ► Headers ► Body

HTTP 1.1

slide-23
SLIDE 23

► Over HTTP ► Hypermedia

Representational State Transfer

aka ReST

slide-24
SLIDE 24

► Binary ► Fast ► Windows Communication Foundation ► Proprietary to Microsoft

NETTCP

slide-25
SLIDE 25

► Binary ► Fast ► Internal to Google

STUBBY

slide-26
SLIDE 26

► Binary ► Fast ► HTTP/2 ► Open-sourced by Google

gRPC

slide-27
SLIDE 27

► JSON ► Efficient ► Flexible

GraphQL

slide-28
SLIDE 28

► Reactive Streams semantics ► Lower-level ► RSocket-RPC

RSOCKET

slide-29
SLIDE 29

WCF vs gRPC

2006 vs 2020

slide-30
SLIDE 30

WCF vs gRPC

WCF

 Wire formats

 SOAP  NetTCP encoding

 C# or VB.NET  Windows-only  Interop via SOAP  WSDL or native stub generator

gRPC

 Wire formats

 Protobuf  Customizable

 C++, Java, Python, C#, Go, Node…  Cross-platform  Interop as standard  Protobuf stub generator

slide-31
SLIDE 31

gRPC Language Support

Official

C++

Java

C#

Python

Go

Ruby

Node.js

Objective-C

Dart (beta)

3rd Party

Rust

Haskell

Erlang

Elixir

Elm

TypeScript

Scala

Kotlin

Perl

slide-32
SLIDE 32

WCF example

It's always a Calculator…

slide-33
SLIDE 33

gRPC example

Still a Calculator…

slide-34
SLIDE 34

THE FUTURE

slide-35
SLIDE 35

► 5G networks ► Satellite internet ► New devices

► Wearables ► Mixed Reality ► Voice ► IoT

THE FUTURE

slide-36
SLIDE 36

A BRIEF HISTORY OF THE FUTURE OF THE API

QCon London 2020 Mark Rendle @markrendle visualrecode.com