SlideShare a Scribd company logo
1 of 16
Download to read offline
COMPANY CONFIDENTIAL. DO NOT REDISTRIBUTE
How a startup Prime Broker uses Kafka
About Me
2
Sachin Kumar
skumar@clearstreet.io
- Co-founder, CTO @ Clear Street
- ex-HFT entrepreneur
https://github.com/clear-street
Agenda
3
1. What is a Prime Broker?
2. Change data capture
3. Trade management
4. Order management
5. Interoperability
What is a Prime Broker, anyway?
4
Manage all aspects of trading, both pre-trade and post-trade
Execution
Venue
buy 100 AAPL
@ $103.48
Prime
Broker
Central
Clearinghouse
order
trade trade
Change data capture
5
Biz Logic
API CDC
UI
Kafka
ETL
Microservice
Postgres Redis
ElasticSearch
Snowflake
Primary Store Cache
Secondary Stores
App
Job 0 Job 1
BI
CRUD
Change data capture (cont)
6
Transaction Outbox
Avro schema ID
Avro encoded bytes
Trade lifecycle [simplified]
7
new
trade
open
trade
settled
trade
canceled
trade
trade_date > settle_date
trade_date <= settle_date
trade canceled
trade_date <= settle_date
trade canceled
On trade transition, emit event
8
new
trade
open
trade
{
“event”: "opened”,
“trade”: {
“account”: “foo”,
“price”: “1.23”,
“quantity”: “100”,
“symbol”: “AAPL”
...
},
“position”: “100”,
“balance”: “-123”
...
}
Trade processing v1
trade
processor
A
P
I
C
D
C
POST /trade
{
“event”: "opened”,
“trade”: {
“account”: “foo”,
“price”: “1.23”,
“quantity”: “100”,
“symbol”: “AAPL”
...
},
“position”: “100”,
“balance”: “-123”
...
}
St#e%&
t#a)s%+,-on0
postgres
Trade processing v2
10
What about orders?
11
buy 1000 AAPL
@ 109.23
order
ack
100 shares
executed
150 shares
executed
cancel
order
order
cancelled
t
client
exchange
Order event sourcing
12
order 3
sent
order 4
sent
order 3
acked
order 3
executed
snapshot
offset 0
order 3
canceled
Client scans backwards to
first available snapshot
offset N
order 3, order 4 are open
pointer to persistent
storage
Interoperability
13
The Financial Information eXchange (FIX)
protocol is an electronic communications
protocol initiated in 1992 for international
real-time exchange of information related
to securities transactions and markets. [1]
[1] https://bit.ly/3rRN3uB
Interoperability (cont)
14
session
manager
FIX Client
session
parser
Service Mesh
topic:
sender_id.input
topic:
sender_id.output
blog: https://bit.ly/3s8bXq1
We ❤ kafka
15
The kafka patterns we’ve used at Clear Street have unlocked massive value
1. CDC allows separation of online data vs. offline data -- materialized view in
secondary stores allows data analytics that don’t touch critical paths
2. Event sourcing is a fundamental pattern to model core constructs, like orders and
trades.
3. Kafka features like atomic publish allow for novel architectures that otherwise would
be difficult
4. Kafka allows us to normalize disparate streaming protocols within our stack
Thank you

More Related Content

What's hot

Why Flow with Salesforce Flow
Why Flow with Salesforce FlowWhy Flow with Salesforce Flow
Why Flow with Salesforce Flow
Ajeet Singh
 
Integration Success with AWS and Boomi
Integration Success with AWS and BoomiIntegration Success with AWS and Boomi
Integration Success with AWS and Boomi
AaronLieberman5
 
Salesforce com-architecture
Salesforce com-architectureSalesforce com-architecture
Salesforce com-architecture
drewz lin
 

What's hot (20)

Why Flow with Salesforce Flow
Why Flow with Salesforce FlowWhy Flow with Salesforce Flow
Why Flow with Salesforce Flow
 
Agile strategy execution framework, part 1
Agile strategy execution framework, part 1Agile strategy execution framework, part 1
Agile strategy execution framework, part 1
 
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Boomi Molecule Migration to the Cloud: Top 5 Strategies RevealedBoomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
 
Never Upgrade Again With Siebel Innovation Packs
Never Upgrade Again With Siebel Innovation PacksNever Upgrade Again With Siebel Innovation Packs
Never Upgrade Again With Siebel Innovation Packs
 
Core Banking Sharing: Finacle on AWS
Core Banking Sharing: Finacle on AWS Core Banking Sharing: Finacle on AWS
Core Banking Sharing: Finacle on AWS
 
Flow in Salesforce
Flow in SalesforceFlow in Salesforce
Flow in Salesforce
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
 
Intro to Delta Lake
Intro to Delta LakeIntro to Delta Lake
Intro to Delta Lake
 
Demystify Salesforce Bulk API
Demystify Salesforce Bulk APIDemystify Salesforce Bulk API
Demystify Salesforce Bulk API
 
Discover BigQuery ML, build your own CREATE MODEL statement
Discover BigQuery ML, build your own CREATE MODEL statementDiscover BigQuery ML, build your own CREATE MODEL statement
Discover BigQuery ML, build your own CREATE MODEL statement
 
Integration Success with AWS and Boomi
Integration Success with AWS and BoomiIntegration Success with AWS and Boomi
Integration Success with AWS and Boomi
 
Implementing Cloud Financials
Implementing Cloud FinancialsImplementing Cloud Financials
Implementing Cloud Financials
 
Servicenow connector
Servicenow connectorServicenow connector
Servicenow connector
 
Business Process Automation PowerPoint Presentation Slides
Business Process Automation PowerPoint Presentation SlidesBusiness Process Automation PowerPoint Presentation Slides
Business Process Automation PowerPoint Presentation Slides
 
Salesforce com-architecture
Salesforce com-architectureSalesforce com-architecture
Salesforce com-architecture
 
MuleSoft Online meetup - An expert's guide to Runtime fabric - August 2020
MuleSoft Online meetup -  An expert's guide to Runtime fabric - August 2020MuleSoft Online meetup -  An expert's guide to Runtime fabric - August 2020
MuleSoft Online meetup - An expert's guide to Runtime fabric - August 2020
 
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse ArchitectureServerless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
 
Business Process Management Software
Business Process Management SoftwareBusiness Process Management Software
Business Process Management Software
 
A comprehensive guide to Salesforce Org Strategy
A comprehensive guide to Salesforce Org StrategyA comprehensive guide to Salesforce Org Strategy
A comprehensive guide to Salesforce Org Strategy
 
Apache Kafka in Financial Services - Use Cases and Architectures
Apache Kafka in Financial Services - Use Cases and ArchitecturesApache Kafka in Financial Services - Use Cases and Architectures
Apache Kafka in Financial Services - Use Cases and Architectures
 

Similar to How a Startup Prime Broker Uses Kafka | Jad Abi-Samra and Sachin Kumar, Clear Street

Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
QuantInsti
 
CQRS & Queue unlimited
CQRS & Queue unlimitedCQRS & Queue unlimited
CQRS & Queue unlimited
Tim Mahy
 

Similar to How a Startup Prime Broker Uses Kafka | Jad Abi-Samra and Sachin Kumar, Clear Street (20)

Supporting Enterprise System Rollouts with Splunk
Supporting Enterprise System Rollouts with SplunkSupporting Enterprise System Rollouts with Splunk
Supporting Enterprise System Rollouts with Splunk
 
Paxful Clone Script
Paxful Clone ScriptPaxful Clone Script
Paxful Clone Script
 
MongoDB.local Sydney: How and When to Use Multi-Document Distributed Transact...
MongoDB.local Sydney: How and When to Use Multi-Document Distributed Transact...MongoDB.local Sydney: How and When to Use Multi-Document Distributed Transact...
MongoDB.local Sydney: How and When to Use Multi-Document Distributed Transact...
 
Specifications of White Label Crypto Exchange Software​ - Antier.pptx
Specifications of White Label Crypto Exchange Software​ - Antier.pptxSpecifications of White Label Crypto Exchange Software​ - Antier.pptx
Specifications of White Label Crypto Exchange Software​ - Antier.pptx
 
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
 
Interledger DvP Settlement on Amazon Managed Blockchain
Interledger DvP Settlement on Amazon Managed BlockchainInterledger DvP Settlement on Amazon Managed Blockchain
Interledger DvP Settlement on Amazon Managed Blockchain
 
How to write your database: the story about Event Store
How to write your database: the story about Event StoreHow to write your database: the story about Event Store
How to write your database: the story about Event Store
 
MLflow at Company Scale
MLflow at Company ScaleMLflow at Company Scale
MLflow at Company Scale
 
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
 
How Adobe uses Structured Streaming at Scale
How Adobe uses Structured Streaming at ScaleHow Adobe uses Structured Streaming at Scale
How Adobe uses Structured Streaming at Scale
 
Malleability and SegWit
Malleability and SegWitMalleability and SegWit
Malleability and SegWit
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...
Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...
Hedera Hashgraph San Francisco Meetup - A Complete Guide on Onboarding to the...
 
CQRS & Queue unlimited
CQRS & Queue unlimitedCQRS & Queue unlimited
CQRS & Queue unlimited
 
Microservices on a budget meetup
Microservices on a budget   meetupMicroservices on a budget   meetup
Microservices on a budget meetup
 
TallyPrime Certification.pdf
TallyPrime Certification.pdfTallyPrime Certification.pdf
TallyPrime Certification.pdf
 
Manish final report
Manish final reportManish final report
Manish final report
 
Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge
 
Tally Certification
Tally CertificationTally Certification
Tally Certification
 
Steps to develop Crypto Exchange.pptx
Steps to develop Crypto Exchange.pptxSteps to develop Crypto Exchange.pptx
Steps to develop Crypto Exchange.pptx
 

More from HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 

More from HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 

Recently uploaded (20)

Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 

How a Startup Prime Broker Uses Kafka | Jad Abi-Samra and Sachin Kumar, Clear Street

  • 1. COMPANY CONFIDENTIAL. DO NOT REDISTRIBUTE How a startup Prime Broker uses Kafka
  • 2. About Me 2 Sachin Kumar skumar@clearstreet.io - Co-founder, CTO @ Clear Street - ex-HFT entrepreneur https://github.com/clear-street
  • 3. Agenda 3 1. What is a Prime Broker? 2. Change data capture 3. Trade management 4. Order management 5. Interoperability
  • 4. What is a Prime Broker, anyway? 4 Manage all aspects of trading, both pre-trade and post-trade Execution Venue buy 100 AAPL @ $103.48 Prime Broker Central Clearinghouse order trade trade
  • 5. Change data capture 5 Biz Logic API CDC UI Kafka ETL Microservice Postgres Redis ElasticSearch Snowflake Primary Store Cache Secondary Stores App Job 0 Job 1 BI CRUD
  • 6. Change data capture (cont) 6 Transaction Outbox Avro schema ID Avro encoded bytes
  • 7. Trade lifecycle [simplified] 7 new trade open trade settled trade canceled trade trade_date > settle_date trade_date <= settle_date trade canceled trade_date <= settle_date trade canceled
  • 8. On trade transition, emit event 8 new trade open trade { “event”: "opened”, “trade”: { “account”: “foo”, “price”: “1.23”, “quantity”: “100”, “symbol”: “AAPL” ... }, “position”: “100”, “balance”: “-123” ... }
  • 9. Trade processing v1 trade processor A P I C D C POST /trade { “event”: "opened”, “trade”: { “account”: “foo”, “price”: “1.23”, “quantity”: “100”, “symbol”: “AAPL” ... }, “position”: “100”, “balance”: “-123” ... } St#e%& t#a)s%+,-on0 postgres
  • 11. What about orders? 11 buy 1000 AAPL @ 109.23 order ack 100 shares executed 150 shares executed cancel order order cancelled t client exchange
  • 12. Order event sourcing 12 order 3 sent order 4 sent order 3 acked order 3 executed snapshot offset 0 order 3 canceled Client scans backwards to first available snapshot offset N order 3, order 4 are open pointer to persistent storage
  • 13. Interoperability 13 The Financial Information eXchange (FIX) protocol is an electronic communications protocol initiated in 1992 for international real-time exchange of information related to securities transactions and markets. [1] [1] https://bit.ly/3rRN3uB
  • 14. Interoperability (cont) 14 session manager FIX Client session parser Service Mesh topic: sender_id.input topic: sender_id.output blog: https://bit.ly/3s8bXq1
  • 15. We ❤ kafka 15 The kafka patterns we’ve used at Clear Street have unlocked massive value 1. CDC allows separation of online data vs. offline data -- materialized view in secondary stores allows data analytics that don’t touch critical paths 2. Event sourcing is a fundamental pattern to model core constructs, like orders and trades. 3. Kafka features like atomic publish allow for novel architectures that otherwise would be difficult 4. Kafka allows us to normalize disparate streaming protocols within our stack