Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Hello

Slide 3

Slide 3 text

My second time here

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Anton Davydov github.com/davydovanton twitter.com/anton_davydov davydovanton.com

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Core member

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

twitch.tv/davydovanton

Slide 12

Slide 12 text

• OpenSource evangelist • Technical consulting

Slide 13

Slide 13 text

Stickers

Slide 14

Slide 14 text

• Memes • Coffee • Beer • Kendo • Psychology • jRPG • SW-2039-0208-4228 / 3DS also welcome • How to draw images for presentations

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

SOA in toptal

Slide 17

Slide 17 text

service oriented architecture

Slide 18

Slide 18 text

Microservices

Slide 19

Slide 19 text

Very specific and will work only in toptal

Slide 20

Slide 20 text

Why?

Slide 21

Slide 21 text

We have a specific requirements and this requirements related only for our company

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Instead make a decision we’re trying to find a solution

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

How we made architectural decision in toptal

Slide 29

Slide 29 text

Attention: experimental talk

Slide 30

Slide 30 text

Zero line of code

Slide 31

Slide 31 text

Why developers should think about it?

Slide 32

Slide 32 text

0. personal projects

Slide 33

Slide 33 text

How to start using own library in the company?

Slide 34

Slide 34 text

1. “I think it will be good for us”

Slide 35

Slide 35 text

Works only in small offices

Slide 36

Slide 36 text

Or with opinion leaders

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

2. Business wants to understand why they need to spend money and time for something

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

3. Sharing knowledge

Slide 41

Slide 41 text

Private discussions, meetings and public channels in slack

Slide 42

Slide 42 text

Hard to find information without knowledge where to find it

Slide 43

Slide 43 text

4. Learning and improving code

Slide 44

Slide 44 text

Loosing context of decision

Slide 45

Slide 45 text

Decision cycle

Slide 46

Slide 46 text

problem -> ??? -> solution

Slide 47

Slide 47 text

problem -> -> solution

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Problem

Slide 50

Slide 50 text

Problem Requirements

Slide 51

Slide 51 text

Technology list

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

Technical requirements

Slide 54

Slide 54 text

Architecture requirements

Slide 55

Slide 55 text

Business requirements

Slide 56

Slide 56 text

Current implementation

Slide 57

Slide 57 text

Problem Requirements Research solutions

Slide 58

Slide 58 text

Google

Slide 59

Slide 59 text

Books

Slide 60

Slide 60 text

Example: data composition approaches

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

Chats

Slide 63

Slide 63 text

Problem Requirements Research solutions Map solutions to requirements

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

PoC

Slide 66

Slide 66 text

Proof of concept

Slide 67

Slide 67 text

Expensive

Slide 68

Slide 68 text

Choose 2 solutions and make PoC for them

Slide 69

Slide 69 text

Problem Requirements Research solutions Map solutions to requirements Decision

Slide 70

Slide 70 text

Based on table/PoC/etc

Slide 71

Slide 71 text

Describe why you dropped or choose solution

Slide 72

Slide 72 text

What to do if solutions absolutely equal?

Slide 73

Slide 73 text

Choose simplest solution

Slide 74

Slide 74 text

Calculate price

Slide 75

Slide 75 text

Example: image service

Slide 76

Slide 76 text

imgix vs imgproxy

Slide 77

Slide 77 text

Check maintainers

Slide 78

Slide 78 text

Example

Slide 79

Slide 79 text

Apache Thrift

Slide 80

Slide 80 text

Thrift is an interface definition language and binary communication protocol used for defining and creating services for numerous languages. … written in a variety of languages and frameworks, including ActionScript, C, C++,[3] C#, Cappuccino, Cocoa, Delphi, Erlang, Go, Haskell, Java, Node.js, Objective-C, OCaml, Perl, PHP, Python, Ruby, Rust, Smalltalk and Swift. ....

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

PROFIT

Slide 85

Slide 85 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 86

Slide 86 text

Can be anything

Slide 87

Slide 87 text

ADR

Slide 88

Slide 88 text

Architecture Decision Records

Slide 89

Slide 89 text

Blog posts

Slide 90

Slide 90 text

Markdown

Slide 91

Slide 91 text

Emacs-org

Slide 92

Slide 92 text

Rules

Slide 93

Slide 93 text

Context of problem

Slide 94

Slide 94 text

Who made this decision

Slide 95

Slide 95 text

Provide pros and cons

Slide 96

Slide 96 text

Link all research information

Slide 97

Slide 97 text

# [short title of solved problem and solution] * Status: * Deciders: * Date: ## Context and Problem Statement ## Decision Drivers ## Considered Options ## Decision Outcome ### Positive Consequences ### Negative Consequences ## Pros and Cons of the Options ## Links

Slide 98

Slide 98 text

Share results with everyone

Slide 99

Slide 99 text

Example: slack retro meetings weekly updates @dev-all in email

Slide 100

Slide 100 text

Keep all decision in one place

Slide 101

Slide 101 text

GitHub Blog posts Confluence space Notion space Trello

Slide 102

Slide 102 text

Let’s talk about reality

Slide 103

Slide 103 text

SOA

Slide 104

Slide 104 text

SOA is simple

Slide 105

Slide 105 text

Infrastructure * How to deploy apps separately * Docker or something else * How to share resources * cloud or bare metal * CI and CD * Docker regestry * slack bots * local k8s cluster

Slide 106

Slide 106 text

Data * data evolution * How to store and calculate state * Allowed DB * How to share data between services

Slide 107

Slide 107 text

Sync communications * frontend <> backend * backend <> backend * How to handle failed services, DB or integration * Distributed tracing * Diagram of communications * Compatibility level * Documentation

Slide 108

Slide 108 text

Async communication * Message bus * Message schema evolution * Schema registry * How to consume and produce data * Distributed tracing * Diagram of communications * Compatibility level * Documentation

Slide 109

Slide 109 text

Gateways * api gateway * GQL gateway (if needed) * schema stitching * JSON API to GQL

Slide 110

Slide 110 text

Business logic and domains * distributed transactions * distributed locks * DDD and domain sharing * business events * microservice chassis

Slide 111

Slide 111 text

Management, teams and processes

Slide 112

Slide 112 text

Testing * contract testing * chaos engenering * e2e testing

Slide 113

Slide 113 text

Local development

Slide 114

Slide 114 text

AuthN / AuthZ

Slide 115

Slide 115 text

Observability * App level * Logs * Metrics * Error handling * Company level * Services diagram * Service characteristics * Service owning

Slide 116

Slide 116 text

Analytics * ETL * How to get data from services * Event based approach * How to work with DS models?

Slide 117

Slide 117 text

And more

Slide 118

Slide 118 text

Example from real live

Slide 119

Slide 119 text

Sync communications * frontend <> backend * backend <> backend * How to handle failed services, DB or integration * Distributed tracing * Diagram of communications * Compatibility level * Documentation

Slide 120

Slide 120 text

Sync communications * frontend <> backend * backend <> backend * How to handle failed services, DB or integration * Distributed tracing * Diagram of communications * Compatibility level * Documentation

Slide 121

Slide 121 text

Step 1

Slide 122

Slide 122 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 123

Slide 123 text

Avoid proliferation of solutions for sync communication in the future as the number of services keeps growing.

Slide 124

Slide 124 text

Step 2

Slide 125

Slide 125 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 126

Slide 126 text

• Uses JSON for serialization • Works with HTTP/1.1 • IDL + Tolerant reader • Bulshitless discussions • Pact integration • Simple documentation • Works with ruby, node.js, go, elixir, java • Easy for debugging

Slide 127

Slide 127 text

Step 3

Slide 128

Slide 128 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 129

Slide 129 text

Google

Slide 130

Slide 130 text

• JSON API • JSON RPC • gRPC • avroRPC • thriftRPC • GraphQL

Slide 131

Slide 131 text

Other experience

Slide 132

Slide 132 text

• Shopify - GQL • Github - BERT-RPC and GQL • Gitlab - nothing • Airbnb - Thrift • Heroku - JSON API • Coinbase - gRPC • Cookpad - gRPC • Twitter - Thrift

Slide 133

Slide 133 text

Interesting use cases

Slide 134

Slide 134 text

Twitch

Slide 135

Slide 135 text

Twirp

Slide 136

Slide 136 text

gRPC over HTTP/1.1

Slide 137

Slide 137 text

JSON serialisation

Slide 138

Slide 138 text

Netflix

Slide 139

Slide 139 text

No content

Slide 140

Slide 140 text

Step 4

Slide 141

Slide 141 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 142

Slide 142 text

No content

Slide 143

Slide 143 text

PoC

Slide 144

Slide 144 text

No content

Slide 145

Slide 145 text

Step 5

Slide 146

Slide 146 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 147

Slide 147 text

No content

Slide 148

Slide 148 text

No content

Slide 149

Slide 149 text

We made notes about all dropped solution

Slide 150

Slide 150 text

No content

Slide 151

Slide 151 text

Step 6

Slide 152

Slide 152 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 153

Slide 153 text

Blog post

Slide 154

Slide 154 text

No content

Slide 155

Slide 155 text

All meetings notes

Slide 156

Slide 156 text

No content

Slide 157

Slide 157 text

No content

Slide 158

Slide 158 text

No content

Slide 159

Slide 159 text

Researched information + PoC examples for the team who will implement communications

Slide 160

Slide 160 text

Current state

Slide 161

Slide 161 text

Everyone from toptal can read how and why we made this research

Slide 162

Slide 162 text

No content

Slide 163

Slide 163 text

I used all this information for the presentation’s example

Slide 164

Slide 164 text

Requirements Research solutions Map solutions to requirements Decision Problem Handling results

Slide 165

Slide 165 text

Next steps

Slide 166

Slide 166 text

Share research with everyone

Slide 167

Slide 167 text

Start writing context of each decision

Slide 168

Slide 168 text

# [short title of solved problem and solution] * Status: * Deciders: * Date: ## Context and Problem Statement ## Decision Drivers ## Considered Options ## Decision Outcome ### Positive Consequences ### Negative Consequences ## Pros and Cons of the Options ## Links

Slide 169

Slide 169 text

# [short title of solved problem and solution] * Status: * Deciders: * Date: ## Context and Problem Statement ## Decision Drivers ## Considered Options ## Decision Outcome ### Positive Consequences ### Negative Consequences ## Pros and Cons of the Options ## Links

Slide 170

Slide 170 text

Make special place for decisions

Slide 171

Slide 171 text

Try to use ADRs if you don’t want to spend much time for researching

Slide 172

Slide 172 text

Share your progress with colleagues and start discussion

Slide 173

Slide 173 text

Thank you ❤ twitter.com/anton_davydov github.com/davydovanton [email protected] davydovanton.com