apidays LIVE Paris - Responding to the New Normal with APIs for Business, People and Society
December 8, 9 & 10, 2020
Microservices, up and running
Irakli Nadareishvili, VP Core Innovation at Capital One
apidays LIVE Paris - Microservices, up and running by Irakli Nadareishvili
1. The SEED(s) Methodology
for Effectively, Consistently, and Iteratively Designing Microservices and APIs.
Irakli Nadareishvili, VP of Core Innovation, Capital One.
December, 2020
@inadarei
3. SEED(s)
Process
1. Identifying Actors
2. Identifying Jobs To Be Done (JTBDs)
3. Interaction Patterns
4. Actions and Queries
5. Open API Spec
6. Getting Feedback
7. Implementing Code
Seven Essential Evolutions of Design for Services - SEED(S) Method
4. Example: Actors for DigiCoins
1. DigiCoin customer – a user using digicoin apps to
purchase or exchange digital coins.
2. DigiCoin Wallet – the platform
3. DigiCoin app – mobile app
4. …
DigiCoins is a fake exchange and wallet for digital currency. This is an entirely imaginary example for demo
purposes only
inadarei
5. API Design: JTBDs
When _____ , I want to _____ , so I can _____ .
Circumstance, motivation,
goal
Using Paul Adams’ JTBD Story template https://www.intercom.com/blog/the-dribbblisation-of-design/
inadarei
6. Example: JTBDs for DigiCoins
1. When a customer wants to buy coins they want to see
current price of a coin so that they can estimate their
buying power.
2. When a customer initiates coin purchase, they need
to add or reuse a payment method, so that they can
provide funds for the purchase
3. When a customer finalizes a coin purchase, DigiCoins
needs to charge the payment method, so that it can
make money
DigiCoins is a fake exchange and wallet for digital currency. This is an entirely imaginary example for demo
purposes only
inadarei
8. Queries and Actions
1. Queries are lookups with defined inputs and outputs. It should be a well-
understood contract between the client and server: what input client
sends and what response they expect. Queries do not modify system
state (they “have no side effects”).
2. Actions, in contrast, are requests to cause a some sort of state
modification (they do have side effects). They also have well-defined
contract – for inputs, expected outcome, and expected response.
inadarei
9. Example: Queries for DigiCoins
1. Lookup of a coin “price”
1. Input: digital coin id, traditional currency code.
2. Response: conversion rate
2. Lookup of existing payment methods
1. Input: user identifier, payment type (coin, credit, bank transfer
etc.)
2. Response: uuid and details of the payment method, status of the
payment method
DigiCoins is a fake exchange and wallet for digital currency. This is an entirely imaginary example for demo
purposes only
inadarei
10. Example: Action(s) for DigiCoins
1. Charge a payment method to fund coin purchase
1. Input: payment method identifier, amount and currency.
2. Expected Outcome: Charge succeeds
3. Response: success or failure code
DigiCoins is a fake exchange and wallet for digital currency. This is an entirely imaginary example for demo
purposes only
inadarei
11. Example: OpenAPI Definition
DigiCoins is a fake exchange and wallet for digital currency. This is an entirely imaginary example for demo purposes only
inadarei
12. Seek Feedback On the Design
Alas, most teams rush into implementation before they get a chance to receive ANY external feedback on
their designs. This leads to significant amount of waste and subpar designs.
inadarei
14. SEED(s)
Process
1. Identifying Actors
2. Identifying Jobs To Be Done (JTBDs)
3. Interaction Patterns
4. Actions and Queries
5. Open API Spec
6. Getting Feedback
7. Implementing Code
Seven Essential Evolutions of Design for Services - SEED(S) Method
Editor's Notes
Hello, everybody. My name is Irakli and I am VP of Core Innovation at Capita One.Today I would like to talk to you about a design process for APIs and microservices
I have been building complex applications using microservice architecture for a number of years now. Prior to joining Capital One, I was CTO and co-founder of a successful healthcare startup that we built using microservices, and before that I did consulting, advising some really exciting organizations and a number of government agencies globally, about APIs and microservices.
<CLICK>
Main Motivator for starting modeling with the definition of actors is to aid in scoping and prioritization. A typical plague of API and service design in our industry is: over-abstraction and lack of clarity regarding user needs. Too many APIs are simply crude exposures of some database tables over HTTP or an attempt to provide direct networked access into application internals, via say gRPC. Such lazy and primitive approach to service design is seldom successful.
DigiCoins is an exchange and wallet
@startuml
actor Customer as c
participant "DigiCoin App" as app
participant "PaymentProcessor" as p
participant "Wallet" as w
c -> app: checkPrice()
c -> app: addPaymentMethod()
c -> app: buyCoins()
app -> app: usePaymentMethod()
app -> p: chargePaymentMethod()
p --> app: success
app -> w: addCoins()
@enduml
DigiCoins is an exchange and wallet
DigiCoins is an exchange and wallet
DigiCoins is an exchange and wallet
DigiCoins is an exchange and wallet
Let’s start by looking at what are some of the benefits and costs of Microservices.