Professional Documents
Culture Documents
Functions
Asterios Katsifodimos, Asst. Professor
Stateful Functions as a Service Online Meetup 27/08/2020, organized by Big Data Republic 1
Canonical (micro)services architecture in 2020
To checkout: stock & update stock -> verify payment -> checkout the cart. 2
Microservices Architecture (1): Easiest Implem.
l
al
REST Call
al
C
C
C
Re
se
RP
sp
sp
se
Re
DB
Database does the heavy-
C
RP
DB
ll
Ca
lifting
Payment DB
C
Business RP
e
Logic o ns
s p
Re
C
RP
High latency, costly state
access
3
Microservices Architecture (2): Embedded State/DB
Order Stock
Business Business
Logic REST Call Logic
local state
Service calls still expensive
Payment Not obvious how to scale
this out (e.g., shard the
Business
Logic
Services are
asynchronous/reactive.
Payment
If we lose state, we replay
Business the log and rebuild it.
Logic
Time-travel debugging,
audits, etc. are trivial.
DB
5
Microservices Architecture (4): Scalable Deployment
Order 1 Stock 1
Business
event-log
DB
LogicSubscribe for Responses Business
DB
Logic
Stock 2
event-log
Business
Order 2 Logic
DB
Business
DB
Logic
event-log
Payment 1
Business
DB
OrderRPC
3 Calls Logic
Business
Logic DB
6
A tale of the cloud: first was the VMs
Machines in company
premises
7
After some years…
8
AWS claimed to have some good news
Function-as-a-Service (FaaS) for achieving serverless
Managed
Infrastructure VM No State
(autoscaling!)
Fn
VM
Function-based VM Fn-to-fn
programming Fn Fn
Fn calls
model
Fn Fn
Fn Transactions &
Stateless orchestration
functions Fn
Fn among function
calls
Cloud database
9
Meanwhile at the TU Delft campus…
Assignment: implement Stock, Order, Payment
microservices with one tool from of each layer:
13
A Call to Arms: novel SFaaS abstractions & systems
Marios Fragkoulis
[1] Operational Stream Processing: Towards Scalable and
Consistent Event-Driven Applications
Asterios Katsifodimos, Marios Fragkoulis.
In EDBT 2019.
Adil Akhter (ING Bank)
15
A programming model* for authoring cloud applications
Function state
Transaction
orchestration
Function call
SVC5 SVC4
Guaranteed message delivery
Input Message Queues and exactly-once processing
Output Message Queue
Operator-local state
partitioned on key input for
Managed State scalability and fault-tolerance
17
Building Cloud applications is like
programming assembly before
compilers were around. We need to
fix this. How?