SlideShare a Scribd company logo
From Monolith to Microservices
with Cassandra, gRPC, and Falcor
Luke Tillman, Technical Evangelist at DataStax
2
Luke, Technical Evangelist Currently:
Cassandra
.NET
Node.js
Previously:
Web Applications
RDBMS
A reference application for users looking to learn how to use
Cassandra and DataStax Enterprise with their programming
language of choice.
4
KillrVideo was a modular
monolith written entirely in
C# using events for service
collaboration.
The modular monolith is a
SOA where all services are
in one programming
language and can be run
in-process together. But it
can be difficult to stay
disciplined and not blur
service boundaries.
omments Search
Video
Catalog
8
Mixed technology stacks
are a reality for more than
just reference applications.
How do we go from a
modular monolith in a
single programming
language to “your
programming language of
choice”?
1
Define our service contracts in a common format that
can be consumed in multiple programming
languages.
10
The ability to generate
client and server (stub)
code was a requirement.
There are a lot of choices
when it comes to selecting
an Interface Definition
Language, including some
other Apache projects like
Avro and Thrift.
11
Define your services using
Protocol Buffers as the
IDL.
service RatingsService {
rpc RateVideo(RateVideoRequest)
returns (RateVideoResponse);
}
message RateVideoRequest {
killrvideo.common.Uuid video_id = 1;
killrvideo.common.Uuid user_id = 2;
int32 rating = 3;
}
message RateVideoResponse { }
12
Pros:
• Generate client/server
code in 9 languages
• Built-in HTTP/2
transport
• Protocol Buffers as the
wire format
• Comes from Google
Cons:
• Comes from Google
READER
2005-2013
2
Create a standalone web tier that can be reused by
service implementations in multiple programming
languages.
14
Wanted a client web app
that runs in a browser and
works on multiple devices.
The number of frontend
JavaScript frameworks
out there is mind numbing,
but we eventually settled on
a setup that makes heavy
use of React and Redux.
15
How should the client fetch
data from the gRPC
microservices on the
backend?
15
How should the client fetch
data from the gRPC
microservices on the
backend?
In the browser, we have a
JavaScript library for
fetching data. On the web
server, we have the Falcor
Router component that
acts an API Gateway to the
microservices.
Falcor
More than just an awesome 80’s Luck Dragon.TM
With Falcor you think of
your data as a graph.
Clients can request one or
more paths in the graph.
GET: /model.json
videosById['12345'][
'name', 'description',
'addedDate'
]
videosById['12345']
.author[
'firstName', 'lastName',
'email'
]
CAT BURRITO
By:
Luke Tillman
19
The Falcor Router on the
server matches your paths
against a list of routes.
Each route has a handler
that can then call the
appropriate service.
19
{
"videosById": {
"12345": {
"name": "Burrito Cat",
"description": "A cat ...",
"addedDate": "2016-06-29",
"author": {
"$type": "ref",
"value": [ "usersById", "99" ]
}
}
}
}
The Falcor Router on the
server matches your paths
against a list of routes.
Each route has a handler
that can then call the
appropriate service.
19
{
"videosById": {
"12345": {
"name": "Burrito Cat",
"description": "A cat ...",
"addedDate": "2016-06-29",
"author": {
"$type": "ref",
"value": [ "usersById", "99" ]
}
}
}
}
The Falcor Router on the
server matches your paths
against a list of routes.
Each route has a handler
that can then call the
appropriate service.
22
Route handlers return data
in JSON Graph format
which can reference other
parts of the graph. The
Router automatically
follows references.
"author": {
"$type": "ref",
"value": [ "usersById", "99" ]
}
{
"usersById": {
"99": {
"firstName": "Luke",
"lastName": "Tillman",
"email": "luke@luketillman.com",
}
}
}
Can this architecture and
these technologies help us
with some of the
challenges users have with
Cassandra?
24
Users coming from a
RDBMS background are
often frustrated by the lack
of JOIN support in CQL.
SELECT
v.name,
v.description,
v.addedDate,
u.firstName,
u.lastName,
u.email
FROM videos v
JOIN users u
ON v.userId = u.userId
WHERE v.videoId = 12345;
CAT BURRITO
By:
Luke Tillman
25
In a microservices
architecture, data that we
might have previously
used a JOIN to retrieve is
probably owned by
different services now.
Using references to other
parts of the graph in Falcor
makes stitching together
data from multiple
microservices easy.
26
Using denormalization is a
key part of successful
Cassandra data modeling,
but maintaining data
integrity can seem
daunting to new users.
users users_by_email
videos_by_date videos
videos_by_user videos_by_tag
27
The concept of data
ownership in microservices
makes the surface area of
impacting operations
much smaller.
Having service APIs and
events defined in an IDL like
Protocol Buffers in gRPC
makes it easy to get an
immediate conceptual
overview of what
operations could impact
denormalized data.
28
Sizing a cluster, stress
testing, and tuning for
optimum performance is
hard with Cassandra.
29
With a microservices
architecture, we ideally
have different clusters
backing different services.
It's a lot easier to size, test,
and tune a cluster for one
service's workload than it
is to tune a cluster for
multiple services'
workloads.
https://killrvideo.github.io/
Questions?
@LukeTillman

More Related Content

PDF
Kubernetes Apache Kafka
PPTX
Streaming with Structure | Kate Stanley and Salma Saeed, IBM
PPTX
Bee brief-intro-q42016
PDF
Serving models using KFServing
PDF
Enabling Data Scientists to easily create and own Kafka Consumers | Stefan Kr...
PDF
Cloud Native Patterns Meetup 2019-11-20
PPTX
He is, the Most Paranoid Developer in the World
PDF
Introduction to Apache Cassandra
Kubernetes Apache Kafka
Streaming with Structure | Kate Stanley and Salma Saeed, IBM
Bee brief-intro-q42016
Serving models using KFServing
Enabling Data Scientists to easily create and own Kafka Consumers | Stefan Kr...
Cloud Native Patterns Meetup 2019-11-20
He is, the Most Paranoid Developer in the World
Introduction to Apache Cassandra

Viewers also liked (18)

PDF
Relational Scaling and the Temple of Gloom (from Cassandra Summit 2015)
PPTX
Performance is not an Option - gRPC and Cassandra
PDF
Introduction to Data Modeling with Apache Cassandra
PPTX
MILLIONS EVENT DELIVERY WITH CLOUD PUB / SUB
PDF
Building your First Application with Cassandra
PDF
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
PDF
Getting started with DataStax .NET Driver for Cassandra
PDF
Avoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
PDF
A Deep Dive into Apache Cassandra for .NET Developers
PDF
L'automatisation dans les reseaux d'entrerprise
PPTX
HTTP2 and gRPC
PDF
The adventure of enabling API management in a large enterprise (Josh Wang)
PDF
Building High Performance APIs In Go Using gRPC And Protocol Buffers
PDF
gRPC: The Story of Microservices at Square
PDF
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
PDF
NextGen Server/Client Architecture - gRPC + Unity + C#
PDF
GRPC 101 - DevFest Belgium 2016
PDF
Scale a Swagger based Web API (Guillaume Laforge)
Relational Scaling and the Temple of Gloom (from Cassandra Summit 2015)
Performance is not an Option - gRPC and Cassandra
Introduction to Data Modeling with Apache Cassandra
MILLIONS EVENT DELIVERY WITH CLOUD PUB / SUB
Building your First Application with Cassandra
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
Getting started with DataStax .NET Driver for Cassandra
Avoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
A Deep Dive into Apache Cassandra for .NET Developers
L'automatisation dans les reseaux d'entrerprise
HTTP2 and gRPC
The adventure of enabling API management in a large enterprise (Josh Wang)
Building High Performance APIs In Go Using gRPC And Protocol Buffers
gRPC: The Story of Microservices at Square
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
NextGen Server/Client Architecture - gRPC + Unity + C#
GRPC 101 - DevFest Belgium 2016
Scale a Swagger based Web API (Guillaume Laforge)
Ad

Similar to From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassandra Summit 2016) (20)

PPTX
From Monolith to Microservices with Cassandra, Grpc, and Falcor (Luke Tillman...
PDF
Divide and Conquer – Microservices with Node.js
PDF
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
PDF
apidays LIVE Paris 2021 - Stargate.io, An OSS Api Layer for your Cassandra by...
PDF
gRPC Microservices in Go (MEAP V08) Hüseyin Babal
PPTX
Microservices with Node.js and Apache Cassandra
PDF
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
PDF
Microservices, the lean way
PDF
Microservices, the lean way - Bruno Bossola - Codemotion Amsterdam 2016
PDF
Microservices - opportunities, dilemmas and problems
PPTX
Ratpack and Grails 3 GR8Conf US 2014
PPTX
Microservices: The Right Way
PDF
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
PDF
Ratpack and Grails 3
PDF
Ratpack and Grails 3
PDF
Microservices Interview Questions and Answers PDF By ScholarHat
PDF
Implementing OpenAPI and GraphQL services with gRPC
ODP
Microservices - the lean way
PPTX
Over view of software artitecture
PPTX
Enterprise Microservices
From Monolith to Microservices with Cassandra, Grpc, and Falcor (Luke Tillman...
Divide and Conquer – Microservices with Node.js
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
apidays LIVE Paris 2021 - Stargate.io, An OSS Api Layer for your Cassandra by...
gRPC Microservices in Go (MEAP V08) Hüseyin Babal
Microservices with Node.js and Apache Cassandra
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Microservices, the lean way
Microservices, the lean way - Bruno Bossola - Codemotion Amsterdam 2016
Microservices - opportunities, dilemmas and problems
Ratpack and Grails 3 GR8Conf US 2014
Microservices: The Right Way
Microservices in GO - Massimiliano Dessì - Codemotion Rome 2017
Ratpack and Grails 3
Ratpack and Grails 3
Microservices Interview Questions and Answers PDF By ScholarHat
Implementing OpenAPI and GraphQL services with gRPC
Microservices - the lean way
Over view of software artitecture
Enterprise Microservices
Ad

Recently uploaded (20)

PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Essential Infomation Tech presentation.pptx
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
System and Network Administration Chapter 2
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Introduction to Artificial Intelligence
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Digital Strategies for Manufacturing Companies
PPTX
Odoo POS Development Services by CandidRoot Solutions
How to Choose the Right IT Partner for Your Business in Malaysia
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Operating system designcfffgfgggggggvggggggggg
Essential Infomation Tech presentation.pptx
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
System and Network Administration Chapter 2
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
VVF-Customer-Presentation2025-Ver1.9.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Reimagine Home Health with the Power of Agentic AI​
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Introduction to Artificial Intelligence
PTS Company Brochure 2025 (1).pdf.......
Navsoft: AI-Powered Business Solutions & Custom Software Development
Digital Strategies for Manufacturing Companies
Odoo POS Development Services by CandidRoot Solutions

From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassandra Summit 2016)

  • 1. From Monolith to Microservices with Cassandra, gRPC, and Falcor Luke Tillman, Technical Evangelist at DataStax
  • 2. 2 Luke, Technical Evangelist Currently: Cassandra .NET Node.js Previously: Web Applications RDBMS
  • 3. A reference application for users looking to learn how to use Cassandra and DataStax Enterprise with their programming language of choice.
  • 4. 4 KillrVideo was a modular monolith written entirely in C# using events for service collaboration. The modular monolith is a SOA where all services are in one programming language and can be run in-process together. But it can be difficult to stay disciplined and not blur service boundaries. omments Search Video Catalog
  • 5. 8 Mixed technology stacks are a reality for more than just reference applications. How do we go from a modular monolith in a single programming language to “your programming language of choice”?
  • 6. 1 Define our service contracts in a common format that can be consumed in multiple programming languages.
  • 7. 10 The ability to generate client and server (stub) code was a requirement. There are a lot of choices when it comes to selecting an Interface Definition Language, including some other Apache projects like Avro and Thrift.
  • 8. 11 Define your services using Protocol Buffers as the IDL. service RatingsService { rpc RateVideo(RateVideoRequest) returns (RateVideoResponse); } message RateVideoRequest { killrvideo.common.Uuid video_id = 1; killrvideo.common.Uuid user_id = 2; int32 rating = 3; } message RateVideoResponse { }
  • 9. 12 Pros: • Generate client/server code in 9 languages • Built-in HTTP/2 transport • Protocol Buffers as the wire format • Comes from Google Cons: • Comes from Google READER 2005-2013
  • 10. 2 Create a standalone web tier that can be reused by service implementations in multiple programming languages.
  • 11. 14 Wanted a client web app that runs in a browser and works on multiple devices. The number of frontend JavaScript frameworks out there is mind numbing, but we eventually settled on a setup that makes heavy use of React and Redux.
  • 12. 15 How should the client fetch data from the gRPC microservices on the backend?
  • 13. 15 How should the client fetch data from the gRPC microservices on the backend? In the browser, we have a JavaScript library for fetching data. On the web server, we have the Falcor Router component that acts an API Gateway to the microservices.
  • 14. Falcor More than just an awesome 80’s Luck Dragon.TM
  • 15. With Falcor you think of your data as a graph. Clients can request one or more paths in the graph. GET: /model.json videosById['12345'][ 'name', 'description', 'addedDate' ] videosById['12345'] .author[ 'firstName', 'lastName', 'email' ] CAT BURRITO By: Luke Tillman
  • 16. 19 The Falcor Router on the server matches your paths against a list of routes. Each route has a handler that can then call the appropriate service.
  • 17. 19 { "videosById": { "12345": { "name": "Burrito Cat", "description": "A cat ...", "addedDate": "2016-06-29", "author": { "$type": "ref", "value": [ "usersById", "99" ] } } } } The Falcor Router on the server matches your paths against a list of routes. Each route has a handler that can then call the appropriate service.
  • 18. 19 { "videosById": { "12345": { "name": "Burrito Cat", "description": "A cat ...", "addedDate": "2016-06-29", "author": { "$type": "ref", "value": [ "usersById", "99" ] } } } } The Falcor Router on the server matches your paths against a list of routes. Each route has a handler that can then call the appropriate service.
  • 19. 22 Route handlers return data in JSON Graph format which can reference other parts of the graph. The Router automatically follows references. "author": { "$type": "ref", "value": [ "usersById", "99" ] } { "usersById": { "99": { "firstName": "Luke", "lastName": "Tillman", "email": "luke@luketillman.com", } } }
  • 20. Can this architecture and these technologies help us with some of the challenges users have with Cassandra?
  • 21. 24 Users coming from a RDBMS background are often frustrated by the lack of JOIN support in CQL. SELECT v.name, v.description, v.addedDate, u.firstName, u.lastName, u.email FROM videos v JOIN users u ON v.userId = u.userId WHERE v.videoId = 12345; CAT BURRITO By: Luke Tillman
  • 22. 25 In a microservices architecture, data that we might have previously used a JOIN to retrieve is probably owned by different services now. Using references to other parts of the graph in Falcor makes stitching together data from multiple microservices easy.
  • 23. 26 Using denormalization is a key part of successful Cassandra data modeling, but maintaining data integrity can seem daunting to new users. users users_by_email videos_by_date videos videos_by_user videos_by_tag
  • 24. 27 The concept of data ownership in microservices makes the surface area of impacting operations much smaller. Having service APIs and events defined in an IDL like Protocol Buffers in gRPC makes it easy to get an immediate conceptual overview of what operations could impact denormalized data.
  • 25. 28 Sizing a cluster, stress testing, and tuning for optimum performance is hard with Cassandra.
  • 26. 29 With a microservices architecture, we ideally have different clusters backing different services. It's a lot easier to size, test, and tune a cluster for one service's workload than it is to tune a cluster for multiple services' workloads.