Forty Years of Pretending @reiddraper About me Eng. @ Basho - - PowerPoint PPT Presentation

forty years of pretending
SMART_READER_LITE
LIVE PREVIEW

Forty Years of Pretending @reiddraper About me Eng. @ Basho - - PowerPoint PPT Presentation

Forty Years of Pretending @reiddraper About me Eng. @ Basho @reiddraper Nobody ever got fired for making an RPC call RPC claims transparency between local and remote procedure calls This abstraction fails Even a simple web app is a


slide-1
SLIDE 1

Forty Years of Pretending

@reiddraper

slide-2
SLIDE 2

About me

slide-3
SLIDE 3
  • Eng. @ Basho

@reiddraper

slide-4
SLIDE 4

Nobody ever got fired for making an RPC call

slide-5
SLIDE 5

RPC claims transparency between local and remote procedure calls

slide-6
SLIDE 6

This abstraction fails

slide-7
SLIDE 7

Even a simple web app is a distributed system

slide-8
SLIDE 8

A resurgence with Javascript

slide-9
SLIDE 9

RPC

slide-10
SLIDE 10

History

slide-11
SLIDE 11

Pretending

slide-12
SLIDE 12

Today

slide-13
SLIDE 13

Tomorrow?

slide-14
SLIDE 14

RPC

slide-15
SLIDE 15

Remote Procedure Call

slide-16
SLIDE 16

[…] RPC mechanism is one in which local procedures and remote procedures are (effectively) indistinguishable to the programmer.

  • Nelson
slide-17
SLIDE 17

[…] the calling environment is suspended, the parameters are passed across the network to the environment where the procedure is to execute […], and the desired procedure is executed there. […] the results are passed backed to the calling environment, where execution resumes as if returning from a simple single-machine call

  • Nelson
slide-18
SLIDE 18

A synchronous network call does not make RPC

slide-19
SLIDE 19

send(2) is not an RPC call

slide-20
SLIDE 20

transparency between local and remote procedure calls

slide-21
SLIDE 21

Motivation for RPC

slide-22
SLIDE 22

Distributed systems are hard

slide-23
SLIDE 23

The procedure call is familiar

slide-24
SLIDE 24

Let's lift distributed programming to the procedure call abstraction

slide-25
SLIDE 25

Let's lift distributed programming to the method call abstraction

slide-26
SLIDE 26

Let's lift distributed programming to the function call abstraction

slide-27
SLIDE 27

History

slide-28
SLIDE 28

Telnet

slide-29
SLIDE 29

RFC 674 1974 Postel and White

slide-30
SLIDE 30

Procedure Call Protocol

slide-31
SLIDE 31

RFC 707 1976 White

slide-32
SLIDE 32

Remote Procedure Call

slide-33
SLIDE 33

The principal goal of all resource- sharing computer networks, including the now international ARPA Network (the ARPANET), is to usefully interconnect geographically distributed hardware, software, and human resources

  • White
slide-34
SLIDE 34

It forces upon the user all of the trappings of the resource's own system.

  • White
slide-35
SLIDE 35

It provides no basis for bootstrapping new composite resources from existing

  • nes.
  • White
slide-36
SLIDE 36

1970 2014 1974 1976 1981 1984 1991 1995 1998 2003 RFC 674 RFC 707 Xerox Remote Procedure Call Implementing Remote Procedure Calls CORBA v1 RFC 1831 XML-RPC SOAP

slide-37
SLIDE 37

An alternative history

slide-38
SLIDE 38

The Actor Model 1973 Hewitt

slide-39
SLIDE 39

RFC 684 1975 Schantz

slide-40
SLIDE 40

[…] objection to the"PCP philosophy"

  • Schantz
slide-41
SLIDE 41

RPC blurs the line between local (cheap) and remote (expensive)

slide-42
SLIDE 42

RPC blurs the line between local (cheap) and remote (expensive)

slide-43
SLIDE 43

[…] a model which relies on procedure calling for its basis does not take into account the special nature of the network environment

  • Schantz
slide-44
SLIDE 44

[…] and that such an environment can be more suitably handled in a message passing model.

  • Schantz
slide-45
SLIDE 45

Goes on…

slide-46
SLIDE 46

A Critique of the Remote Procedure Call Paradigm 1988 Tanenbaum van Renesse

slide-47
SLIDE 47

Implementing Distributed Systems Using Linear Naming 1993 Bawden

slide-48
SLIDE 48

RFC 2616 (HTTP 1.1) 1999 Fielding et al.

slide-49
SLIDE 49

REST 2000 Fielding

slide-50
SLIDE 50

Problems with RPC

slide-51
SLIDE 51

Consistent code

slide-52
SLIDE 52
slide-53
SLIDE 53

How do you atomically update the code?

slide-54
SLIDE 54

Handling failure

slide-55
SLIDE 55

What if the remote node never responds?

slide-56
SLIDE 56

Or the underlying TCP connection is closed?

slide-57
SLIDE 57

Did it fail halfway through?

slide-58
SLIDE 58

Did it fail right before it returned to us?

slide-59
SLIDE 59

Why don't we have a stacktrace?

slide-60
SLIDE 60

What if our procedure made another RPC call?

slide-61
SLIDE 61

Serializing values

slide-62
SLIDE 62

How do you serialize a file- descriptor?

slide-63
SLIDE 63

How do you serialize a database connection?

slide-64
SLIDE 64

The streaming problem

slide-65
SLIDE 65

Can we start processing partial results?

slide-66
SLIDE 66

The continuation problem

slide-67
SLIDE 67

The procedure call only models A->B->A communication

slide-68
SLIDE 68

(8) Fallacies of Distributed Computing

slide-69
SLIDE 69

Fallacies of Distributed Computing

slide-70
SLIDE 70
  • 1. The network

is reliable

slide-71
SLIDE 71
  • 2. Latency is

zero

slide-72
SLIDE 72
  • 3. Bandwidth is

infinite

slide-73
SLIDE 73
  • 4. The network

is secure

slide-74
SLIDE 74
  • 5. Topology

doesn't change

slide-75
SLIDE 75
  • 6. There is one

administrator

slide-76
SLIDE 76
  • 7. Transport

cost is zero

slide-77
SLIDE 77
  • 8. The network

is homogeneous

slide-78
SLIDE 78

Today

slide-79
SLIDE 79

Javascript and compile-to-Javascript

slide-80
SLIDE 80

Code sharing!

slide-81
SLIDE 81

Coupling

slide-82
SLIDE 82
slide-83
SLIDE 83

Even a simple web app is a distributed system

slide-84
SLIDE 84

meteor.js derby yesod-fay shoreleave hapstack dnode now.js nodejs-light_rpc

slide-85
SLIDE 85

Tomorrow

slide-86
SLIDE 86

The principal goal of all resource- sharing computer networks, including the now international ARPA Network (the ARPANET), is to usefully interconnect geographically distributed hardware, software, and human resources

  • White
slide-87
SLIDE 87

Distributed systems are still hard

slide-88
SLIDE 88

Implementing Distributed Systems Using Linear Naming 1993 Bawden

slide-89
SLIDE 89

Bloom (UC Berkeley)

slide-90
SLIDE 90

Questions

@reiddraper