SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Using Cassandra for event logging
Presentation

Using Cassandra for event logging
Ivan Burmistrov
SKB Kontur

December 9th, 2013
Using Cassandra for event logging
EDI

We develop EDI (Electronic data interchange) system.
Using Cassandra for event logging
EDI

We develop EDI (Electronic data interchange) system.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
EventLogger

interface IEventLogger
{
void Write ( Event [] events ) ;
Event [] Read ( Event exclusiveEvent , int count ) ;
}

Availability for Read and Write.
Fast Write.
Read with minimal time lag.
No events in past while we making Read.
Same events chronology in any thread.
For any thread events orders for write and read are equals.
Using Cassandra for event logging
Obvious solution

Event
string EventId;
long Timestamp;
byte[] Content;
Using Cassandra for event logging
Obvious solution

Write(Event[] events)
Write columns for each event e:
e.Timestamp = NowTicks;
RowKey = e.Timestamp / Partition;
ColumnName = e.Timestamp + ":" + e.EventId;
ColumnValue = e.Content;
Read(Event exclusiveEvent, int count)
Execute get_slice from exclusive column;
Skip events with Timestamp > NowTicks - TimeLag.
Using Cassandra for event logging
Obvious solution

Write(Event[] events)
Write columns for each event e:
e.Timestamp = NowTicks;
RowKey = e.Timestamp / Partition;
ColumnName = e.Timestamp + ":" + e.EventId;
ColumnValue = e.Content;
Read(Event exclusiveEvent, int count)
Execute get_slice from exclusive column;
Skip events with Timestamp > NowTicks - TimeLag.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Easy implementation.
Write action is very fast.
Disadvantages
TimeLag =
TimeLag >
TimeLag >
TimeLag >

?
WriteTimeout + SyncDiff;
ReadTimeout + SyncDiff;
Cassandra worst write time;

We can’t cache events in unstable zone, if we want to read
events from it. I.e. more requests −→ more CPU for cassandra.
Using Cassandra for event logging
Our algorithm

Event
string EventId;
long Timestamp;
byte[] Content;
State State (Good or Bad);
Using Cassandra for event logging
Our algorithm

Write(Event event)
Timestamp = NowTicks, State = Bad, write event.
Are there Good events with bigger Timestamp?
No? State = Good, rewrite event.
Yes? Delete event and try again.
Using Cassandra for event logging
Our algorithm

Write(Event event)
Timestamp = NowTicks, State = Bad, write event.
Are there Good events with bigger Timestamp?
No? State = Good, rewrite event.
Yes? Delete event and try again.
Using Cassandra for event logging
Our algorithm

Write(Event event)
Timestamp = NowTicks, State = Bad, write event.
Are there Good events with bigger Timestamp?
No? State = Good, rewrite event.
Yes? Delete event and try again.
Using Cassandra for event logging
Our algorithm

Write(Event event)
Timestamp = NowTicks, State = Bad, write event.
Are there Good events with bigger Timestamp?
No? State = Good, rewrite event.
Yes? Delete event and try again.
Using Cassandra for event logging
Our algorithm

Read
We can read events (same as obvious solution) while it’s Good.
Using Cassandra for event logging
Our algorithm

Read
We can read events (same as obvious solution) while it’s Good.
Using Cassandra for event logging
Our algorithm

TimeLag = ?
TimeLag do not depends on timeouts.
Less write intensity −→ less TimeLag.
Less cassandra write time −→ less TimeLag.
Using Cassandra for event logging
Our algorithm

TimeLag = ?
TimeLag do not depends on timeouts.
Less write intensity −→ less TimeLag.
Less cassandra write time −→ less TimeLag.
Using Cassandra for event logging
Our algorithm

TimeLag = ?
TimeLag do not depends on timeouts.
Less write intensity −→ less TimeLag.
Less cassandra write time −→ less TimeLag.
Using Cassandra for event logging
Improvements

Improvements
"Are there Good events with bigger Timestamp?" for O(1).
Queue write requests and process its by batches.
We could remove the dependency from time sync, if NowTicks
will be monotonous.
Using Cassandra for event logging
Improvements

Improvements
"Are there Good events with bigger Timestamp?" for O(1).
Queue write requests and process its by batches.
We could remove the dependency from time sync, if NowTicks
will be monotonous.
Using Cassandra for event logging
Improvements

Improvements
"Are there Good events with bigger Timestamp?" for O(1).
Queue write requests and process its by batches.
We could remove the dependency from time sync, if NowTicks
will be monotonous.
Using Cassandra for event logging
Sharding

Simple sharding
We can divide all entities by independent parts.
For each part we can use separate eventLogger.
Using Cassandra for event logging
Sharding

Simple sharding
We can divide all entities by independent parts.
For each part we can use separate eventLogger.
Using Cassandra for event logging
Sharding

Sharding for reading
Timestamp = NowTicks, State = Bad, write events in
different rows.
Are there Good events with bigger Timestamp in any row?
No? State = Good, rewrite events.
Yes? Delete event and try again.
Using Cassandra for event logging
Sharding

Sharding for reading
Timestamp = NowTicks, State = Bad, write events in
different rows.
Are there Good events with bigger Timestamp in any row?
No? State = Good, rewrite events.
Yes? Delete event and try again.
Using Cassandra for event logging
Sharding

Sharding for reading
Timestamp = NowTicks, State = Bad, write events in
different rows.
Are there Good events with bigger Timestamp in any row?
No? State = Good, rewrite events.
Yes? Delete event and try again.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Small size of time lag. For 3500 writes per sec worst time lag
is 50ms and 10 events.
More cacheable.
Easy sharding.
Can be independed from time sync.
Disadvantages
More slow writes. But still enough fast.
Limit for writing threads.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Small size of time lag. For 3500 writes per sec worst time lag
is 50ms and 10 events.
More cacheable.
Easy sharding.
Can be independed from time sync.
Disadvantages
More slow writes. But still enough fast.
Limit for writing threads.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Small size of time lag. For 3500 writes per sec worst time lag
is 50ms and 10 events.
More cacheable.
Easy sharding.
Can be independed from time sync.
Disadvantages
More slow writes. But still enough fast.
Limit for writing threads.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Small size of time lag. For 3500 writes per sec worst time lag
is 50ms and 10 events.
More cacheable.
Easy sharding.
Can be independed from time sync.
Disadvantages
More slow writes. But still enough fast.
Limit for writing threads.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Small size of time lag. For 3500 writes per sec worst time lag
is 50ms and 10 events.
More cacheable.
Easy sharding.
Can be independed from time sync.
Disadvantages
More slow writes. But still enough fast.
Limit for writing threads.
Using Cassandra for event logging
Advantages and disadvantages

Advantages
Small size of time lag. For 3500 writes per sec worst time lag
is 50ms and 10 events.
More cacheable.
Easy sharding.
Can be independed from time sync.
Disadvantages
More slow writes. But still enough fast.
Limit for writing threads.
Using Cassandra for event logging
Another applications

Another applications
Indexing. We can use event log as notification about change
state of some objects −→ indexing. Cacheable is very useful
here!
Message queues.
Using Cassandra for event logging
Another applications

Another applications
Indexing. We can use event log as notification about change
state of some objects −→ indexing. Cacheable is very useful
here!
Message queues.

Weitere ähnliche Inhalte

Was ist angesagt?

Scalable Anomaly Detection (with Zero Machine Learning)
Scalable Anomaly Detection (with Zero Machine Learning)Scalable Anomaly Detection (with Zero Machine Learning)
Scalable Anomaly Detection (with Zero Machine Learning)
Arthur Gonigberg
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
takezoe
 

Was ist angesagt? (20)

Intro to AWS Lambda
Intro to AWS LambdaIntro to AWS Lambda
Intro to AWS Lambda
 
Mario on spark
Mario on sparkMario on spark
Mario on spark
 
Fun421 stephens
Fun421 stephensFun421 stephens
Fun421 stephens
 
distributed tracing in 5 minutes
distributed tracing in 5 minutesdistributed tracing in 5 minutes
distributed tracing in 5 minutes
 
Scalable Anomaly Detection (with Zero Machine Learning)
Scalable Anomaly Detection (with Zero Machine Learning)Scalable Anomaly Detection (with Zero Machine Learning)
Scalable Anomaly Detection (with Zero Machine Learning)
 
Spark streaming: Best Practices
Spark streaming: Best PracticesSpark streaming: Best Practices
Spark streaming: Best Practices
 
Building a fully-automated Fast Data Platform
Building a fully-automated Fast Data PlatformBuilding a fully-automated Fast Data Platform
Building a fully-automated Fast Data Platform
 
Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28Openstack meetup lyon_2017-09-28
Openstack meetup lyon_2017-09-28
 
Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary Tale
 
Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com
 
Blueflood: Open Source Metrics Processing at CassandraEU 2013
Blueflood: Open Source Metrics Processing at CassandraEU 2013Blueflood: Open Source Metrics Processing at CassandraEU 2013
Blueflood: Open Source Metrics Processing at CassandraEU 2013
 
Node withoutservers aws-lambda
Node withoutservers aws-lambdaNode withoutservers aws-lambda
Node withoutservers aws-lambda
 
Anatomy of an action
Anatomy of an actionAnatomy of an action
Anatomy of an action
 
About time
About timeAbout time
About time
 
Reactor, Reactive streams and MicroServices
Reactor, Reactive streams and MicroServicesReactor, Reactive streams and MicroServices
Reactor, Reactive streams and MicroServices
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
 
Ingesting data streams with a serverless infrastructure
Ingesting data streams with a serverless infrastructureIngesting data streams with a serverless infrastructure
Ingesting data streams with a serverless infrastructure
 
Openstack on Fedora, Fedora on Openstack: An Introduction to cloud IaaS
Openstack on Fedora, Fedora on Openstack: An Introduction to cloud IaaSOpenstack on Fedora, Fedora on Openstack: An Introduction to cloud IaaS
Openstack on Fedora, Fedora on Openstack: An Introduction to cloud IaaS
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
 
Spark Streaming into context
Spark Streaming into contextSpark Streaming into context
Spark Streaming into context
 

Andere mochten auch

Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013
 Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013 Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013
Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013
it-people
 
Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013
Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013
Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013
it-people
 
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
it-people
 
Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...
Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...
Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...
it-people
 
Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...
Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...
Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...
it-people
 
Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...
Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...
Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...
it-people
 
CodeFest 2013. Анастасьев О. — Класс!ная Cassandra
CodeFest 2013. Анастасьев О. — Класс!ная CassandraCodeFest 2013. Анастасьев О. — Класс!ная Cassandra
CodeFest 2013. Анастасьев О. — Класс!ная Cassandra
CodeFest
 
Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...
Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...
Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...
it-people
 
Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...
Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...
Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...
it-people
 
Александр Сабинин "Организация динамической циклической очереди задач для ска...
Александр Сабинин "Организация динамической циклической очереди задач для ска...Александр Сабинин "Организация динамической циклической очереди задач для ска...
Александр Сабинин "Организация динамической циклической очереди задач для ска...
it-people
 
Платформа для видео сроком в квартал. Александр Тоболь.
Платформа для видео сроком в квартал. Александр Тоболь.Платформа для видео сроком в квартал. Александр Тоболь.
Платформа для видео сроком в квартал. Александр Тоболь.
odnoklassniki.ru
 
Introduction in CUDA (1-3)
Introduction in CUDA (1-3)Introduction in CUDA (1-3)
Introduction in CUDA (1-3)
Alexander Mezhov
 
За гранью NoSQL: NewSQL на Cassandra
За гранью NoSQL: NewSQL на CassandraЗа гранью NoSQL: NewSQL на Cassandra
За гранью NoSQL: NewSQL на Cassandra
odnoklassniki.ru
 

Andere mochten auch (20)

Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013
 Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013 Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013
Евгений Тихонов "Введение в Cassandra". Выступление на Cassandrd conf 2013
 
Javantura v2 - Data modeling with Apapche Cassandra - Marko Švaljek
Javantura v2 - Data modeling with Apapche Cassandra - Marko ŠvaljekJavantura v2 - Data modeling with Apapche Cassandra - Marko Švaljek
Javantura v2 - Data modeling with Apapche Cassandra - Marko Švaljek
 
Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013
Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013
Олег Анастасьев "Ближе к Cassandra". Выступление на Cassandra Conf 2013
 
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
 
Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...
Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...
Aleksey Yeschenko "Моделирование данных с помощью CQL3". Выступление на Cassa...
 
Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...
Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...
Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуника...
 
Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...
Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...
Евгений Курпилянский "Индексирование поверх Cassandra". Выступление на Cassan...
 
CodeFest 2013. Анастасьев О. — Класс!ная Cassandra
CodeFest 2013. Анастасьев О. — Класс!ная CassandraCodeFest 2013. Анастасьев О. — Класс!ная Cassandra
CodeFest 2013. Анастасьев О. — Класс!ная Cassandra
 
Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...
Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...
Jonathan Ellis "Apache Cassandra 2.0 and 2.1". Выступление на Cassandra conf ...
 
Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...
Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...
Максим Сычев и Александр Коковин "Как мы переезжали на Cassandra". Выступлени...
 
CQL3 and Data Modeling 101 with Apache Cassandra
CQL3 and Data Modeling 101 with Apache CassandraCQL3 and Data Modeling 101 with Apache Cassandra
CQL3 and Data Modeling 101 with Apache Cassandra
 
Александр Сабинин "Организация динамической циклической очереди задач для ска...
Александр Сабинин "Организация динамической циклической очереди задач для ска...Александр Сабинин "Организация динамической циклической очереди задач для ска...
Александр Сабинин "Организация динамической циклической очереди задач для ска...
 
Java Runtime: повседневные обязанности JVM
Java Runtime: повседневные обязанности JVMJava Runtime: повседневные обязанности JVM
Java Runtime: повседневные обязанности JVM
 
Apache Cassandra, part 2 – data model example, machinery
Apache Cassandra, part 2 – data model example, machineryApache Cassandra, part 2 – data model example, machinery
Apache Cassandra, part 2 – data model example, machinery
 
Класс!ная Cassandra
Класс!ная CassandraКласс!ная Cassandra
Класс!ная Cassandra
 
C*ollege Credit: Data Modeling for Apache Cassandra
C*ollege Credit: Data Modeling for Apache CassandraC*ollege Credit: Data Modeling for Apache Cassandra
C*ollege Credit: Data Modeling for Apache Cassandra
 
Платформа для видео сроком в квартал. Александр Тоболь.
Платформа для видео сроком в квартал. Александр Тоболь.Платформа для видео сроком в квартал. Александр Тоболь.
Платформа для видео сроком в квартал. Александр Тоболь.
 
Introduction in CUDA (1-3)
Introduction in CUDA (1-3)Introduction in CUDA (1-3)
Introduction in CUDA (1-3)
 
Cassandra 101
Cassandra 101Cassandra 101
Cassandra 101
 
За гранью NoSQL: NewSQL на Cassandra
За гранью NoSQL: NewSQL на CassandraЗа гранью NoSQL: NewSQL на Cassandra
За гранью NoSQL: NewSQL на Cassandra
 

Ähnlich wie Иван Бурмистров "Строго ориентированная последовательность временных событий". Выступление на Cassandra Сonf 2013

Ähnlich wie Иван Бурмистров "Строго ориентированная последовательность временных событий". Выступление на Cassandra Сonf 2013 (20)

AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Beam me up, Samza!
Beam me up, Samza!Beam me up, Samza!
Beam me up, Samza!
 
Building a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkBuilding a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless framework
 
Persistent Read-Side in Lagom
Persistent Read-Side in LagomPersistent Read-Side in Lagom
Persistent Read-Side in Lagom
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
 
Native cloud security monitoring
Native cloud security monitoringNative cloud security monitoring
Native cloud security monitoring
 
Event sourcing - what could possibly go wrong ? Devoxx PL 2021
Event sourcing  - what could possibly go wrong ? Devoxx PL 2021Event sourcing  - what could possibly go wrong ? Devoxx PL 2021
Event sourcing - what could possibly go wrong ? Devoxx PL 2021
 
GFS
GFSGFS
GFS
 
Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?
 
Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...
Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...
Data processing platforms architectures with Spark, Mesos, Akka, Cassandra an...
 
Event Sourcing - what could go wrong - Jfokus 2022
Event Sourcing - what could go wrong - Jfokus 2022Event Sourcing - what could go wrong - Jfokus 2022
Event Sourcing - what could go wrong - Jfokus 2022
 
Low latency stream processing with jet
Low latency stream processing with jetLow latency stream processing with jet
Low latency stream processing with jet
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
Fun With Reactive Extensions
Fun With Reactive ExtensionsFun With Reactive Extensions
Fun With Reactive Extensions
 
Andrii Dembitskyi "Events in our applications Event bus and distributed systems"
Andrii Dembitskyi "Events in our applications Event bus and distributed systems"Andrii Dembitskyi "Events in our applications Event bus and distributed systems"
Andrii Dembitskyi "Events in our applications Event bus and distributed systems"
 
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBER
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
Event Stream Processing with Kafka and Samza
Event Stream Processing with Kafka and SamzaEvent Stream Processing with Kafka and Samza
Event Stream Processing with Kafka and Samza
 

Mehr von it-people

«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co
«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co
«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co
it-people
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
it-people
 
«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...
«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...
«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...
it-people
 
«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr
«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr
«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr
it-people
 
«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...
«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...
«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...
it-people
 
«Тотальный контроль производительности» Михаил Юматов, ЦИАН
«Тотальный контроль производительности» Михаил Юматов, ЦИАН«Тотальный контроль производительности» Михаил Юматов, ЦИАН
«Тотальный контроль производительности» Михаил Юматов, ЦИАН
it-people
 
«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк
«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк
«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк
it-people
 
«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co
«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co
«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co
it-people
 
«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС
«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС
«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС
it-people
 
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
it-people
 
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
it-people
 
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
it-people
 
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
it-people
 

Mehr von it-people (20)

«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co
«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co
«Про аналитику и серебряные пули» Александр Подсобляев, Rambler&Co
 
«Scrapy internals» Александр Сибиряков, Scrapinghub
«Scrapy internals» Александр Сибиряков, Scrapinghub«Scrapy internals» Александр Сибиряков, Scrapinghub
«Scrapy internals» Александр Сибиряков, Scrapinghub
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
 
«Gevent — быть или не быть?» Александр Мокров, Positive Technologies
«Gevent — быть или не быть?» Александр Мокров, Positive Technologies«Gevent — быть или не быть?» Александр Мокров, Positive Technologies
«Gevent — быть или не быть?» Александр Мокров, Positive Technologies
 
«Ещё один Поиск Яндекса» Александр Кошелев, Яндекс
«Ещё один Поиск Яндекса» Александр Кошелев, Яндекс«Ещё один Поиск Яндекса» Александр Кошелев, Яндекс
«Ещё один Поиск Яндекса» Александр Кошелев, Яндекс
 
«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...
«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...
«How I Learned to Stop Worrying and Love the BFG: нагрузочное тестирование со...
 
«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr
«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr
«Write once run anywhere — почём опиум для народа?» Игорь Новиков, Scalr
 
«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...
«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...
«Gensim — тематическое моделирование для людей» Иван Меньших, Лев Константино...
 
«Тотальный контроль производительности» Михаил Юматов, ЦИАН
«Тотальный контроль производительности» Михаил Юматов, ЦИАН«Тотальный контроль производительности» Михаил Юматов, ЦИАН
«Тотальный контроль производительности» Михаил Юматов, ЦИАН
 
«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк
«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк
«Детские болезни live-чата» Ольга Сентемова, Тинькофф Банк
 
«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co
«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co
«Микросервисы наносят ответный удар!» Олег Чуркин, Rambler&Co
 
«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС
«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС
«Память и Python. Что надо знать для счастья?» Алексей Кузьмин, ЦНС
 
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
 
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
 
«PyWat. А хорошо ли вы знаете Python?» Александр Швец, Marilyn System
«PyWat. А хорошо ли вы знаете Python?» Александр Швец, Marilyn System«PyWat. А хорошо ли вы знаете Python?» Александр Швец, Marilyn System
«PyWat. А хорошо ли вы знаете Python?» Александр Швец, Marilyn System
 
«(Без)опасный Python», Иван Цыганов, Positive Technologies
«(Без)опасный Python», Иван Цыганов, Positive Technologies«(Без)опасный Python», Иван Цыганов, Positive Technologies
«(Без)опасный Python», Иван Цыганов, Positive Technologies
 
«Python of Things», Кирилл Борисов, Яндекс
«Python of Things», Кирилл Борисов, Яндекс«Python of Things», Кирилл Борисов, Яндекс
«Python of Things», Кирилл Борисов, Яндекс
 
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
«Как сделать так, чтобы тесты на Swift не причиняли боль» Сычев Александр, Ra...
 
«Клиенту и серверу нужно поговорить» Прокопов Никита, Cognician
«Клиенту и серверу нужно поговорить» Прокопов Никита, Cognician«Клиенту и серверу нужно поговорить» Прокопов Никита, Cognician
«Клиенту и серверу нужно поговорить» Прокопов Никита, Cognician
 
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Иван Бурмистров "Строго ориентированная последовательность временных событий". Выступление на Cassandra Сonf 2013

  • 1. Using Cassandra for event logging Presentation Using Cassandra for event logging Ivan Burmistrov SKB Kontur December 9th, 2013
  • 2. Using Cassandra for event logging EDI We develop EDI (Electronic data interchange) system.
  • 3. Using Cassandra for event logging EDI We develop EDI (Electronic data interchange) system.
  • 4. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 5. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 6. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 7. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 8. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 9. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 10. Using Cassandra for event logging EventLogger interface IEventLogger { void Write ( Event [] events ) ; Event [] Read ( Event exclusiveEvent , int count ) ; } Availability for Read and Write. Fast Write. Read with minimal time lag. No events in past while we making Read. Same events chronology in any thread. For any thread events orders for write and read are equals.
  • 11. Using Cassandra for event logging Obvious solution Event string EventId; long Timestamp; byte[] Content;
  • 12. Using Cassandra for event logging Obvious solution Write(Event[] events) Write columns for each event e: e.Timestamp = NowTicks; RowKey = e.Timestamp / Partition; ColumnName = e.Timestamp + ":" + e.EventId; ColumnValue = e.Content; Read(Event exclusiveEvent, int count) Execute get_slice from exclusive column; Skip events with Timestamp > NowTicks - TimeLag.
  • 13. Using Cassandra for event logging Obvious solution Write(Event[] events) Write columns for each event e: e.Timestamp = NowTicks; RowKey = e.Timestamp / Partition; ColumnName = e.Timestamp + ":" + e.EventId; ColumnValue = e.Content; Read(Event exclusiveEvent, int count) Execute get_slice from exclusive column; Skip events with Timestamp > NowTicks - TimeLag.
  • 14. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 15. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 16. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 17. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 18. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 19. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 20. Using Cassandra for event logging Advantages and disadvantages Advantages Easy implementation. Write action is very fast. Disadvantages TimeLag = TimeLag > TimeLag > TimeLag > ? WriteTimeout + SyncDiff; ReadTimeout + SyncDiff; Cassandra worst write time; We can’t cache events in unstable zone, if we want to read events from it. I.e. more requests −→ more CPU for cassandra.
  • 21. Using Cassandra for event logging Our algorithm Event string EventId; long Timestamp; byte[] Content; State State (Good or Bad);
  • 22. Using Cassandra for event logging Our algorithm Write(Event event) Timestamp = NowTicks, State = Bad, write event. Are there Good events with bigger Timestamp? No? State = Good, rewrite event. Yes? Delete event and try again.
  • 23. Using Cassandra for event logging Our algorithm Write(Event event) Timestamp = NowTicks, State = Bad, write event. Are there Good events with bigger Timestamp? No? State = Good, rewrite event. Yes? Delete event and try again.
  • 24. Using Cassandra for event logging Our algorithm Write(Event event) Timestamp = NowTicks, State = Bad, write event. Are there Good events with bigger Timestamp? No? State = Good, rewrite event. Yes? Delete event and try again.
  • 25. Using Cassandra for event logging Our algorithm Write(Event event) Timestamp = NowTicks, State = Bad, write event. Are there Good events with bigger Timestamp? No? State = Good, rewrite event. Yes? Delete event and try again.
  • 26. Using Cassandra for event logging Our algorithm Read We can read events (same as obvious solution) while it’s Good.
  • 27. Using Cassandra for event logging Our algorithm Read We can read events (same as obvious solution) while it’s Good.
  • 28. Using Cassandra for event logging Our algorithm TimeLag = ? TimeLag do not depends on timeouts. Less write intensity −→ less TimeLag. Less cassandra write time −→ less TimeLag.
  • 29. Using Cassandra for event logging Our algorithm TimeLag = ? TimeLag do not depends on timeouts. Less write intensity −→ less TimeLag. Less cassandra write time −→ less TimeLag.
  • 30. Using Cassandra for event logging Our algorithm TimeLag = ? TimeLag do not depends on timeouts. Less write intensity −→ less TimeLag. Less cassandra write time −→ less TimeLag.
  • 31. Using Cassandra for event logging Improvements Improvements "Are there Good events with bigger Timestamp?" for O(1). Queue write requests and process its by batches. We could remove the dependency from time sync, if NowTicks will be monotonous.
  • 32. Using Cassandra for event logging Improvements Improvements "Are there Good events with bigger Timestamp?" for O(1). Queue write requests and process its by batches. We could remove the dependency from time sync, if NowTicks will be monotonous.
  • 33. Using Cassandra for event logging Improvements Improvements "Are there Good events with bigger Timestamp?" for O(1). Queue write requests and process its by batches. We could remove the dependency from time sync, if NowTicks will be monotonous.
  • 34. Using Cassandra for event logging Sharding Simple sharding We can divide all entities by independent parts. For each part we can use separate eventLogger.
  • 35. Using Cassandra for event logging Sharding Simple sharding We can divide all entities by independent parts. For each part we can use separate eventLogger.
  • 36. Using Cassandra for event logging Sharding Sharding for reading Timestamp = NowTicks, State = Bad, write events in different rows. Are there Good events with bigger Timestamp in any row? No? State = Good, rewrite events. Yes? Delete event and try again.
  • 37. Using Cassandra for event logging Sharding Sharding for reading Timestamp = NowTicks, State = Bad, write events in different rows. Are there Good events with bigger Timestamp in any row? No? State = Good, rewrite events. Yes? Delete event and try again.
  • 38. Using Cassandra for event logging Sharding Sharding for reading Timestamp = NowTicks, State = Bad, write events in different rows. Are there Good events with bigger Timestamp in any row? No? State = Good, rewrite events. Yes? Delete event and try again.
  • 39. Using Cassandra for event logging Advantages and disadvantages Advantages Small size of time lag. For 3500 writes per sec worst time lag is 50ms and 10 events. More cacheable. Easy sharding. Can be independed from time sync. Disadvantages More slow writes. But still enough fast. Limit for writing threads.
  • 40. Using Cassandra for event logging Advantages and disadvantages Advantages Small size of time lag. For 3500 writes per sec worst time lag is 50ms and 10 events. More cacheable. Easy sharding. Can be independed from time sync. Disadvantages More slow writes. But still enough fast. Limit for writing threads.
  • 41. Using Cassandra for event logging Advantages and disadvantages Advantages Small size of time lag. For 3500 writes per sec worst time lag is 50ms and 10 events. More cacheable. Easy sharding. Can be independed from time sync. Disadvantages More slow writes. But still enough fast. Limit for writing threads.
  • 42. Using Cassandra for event logging Advantages and disadvantages Advantages Small size of time lag. For 3500 writes per sec worst time lag is 50ms and 10 events. More cacheable. Easy sharding. Can be independed from time sync. Disadvantages More slow writes. But still enough fast. Limit for writing threads.
  • 43. Using Cassandra for event logging Advantages and disadvantages Advantages Small size of time lag. For 3500 writes per sec worst time lag is 50ms and 10 events. More cacheable. Easy sharding. Can be independed from time sync. Disadvantages More slow writes. But still enough fast. Limit for writing threads.
  • 44. Using Cassandra for event logging Advantages and disadvantages Advantages Small size of time lag. For 3500 writes per sec worst time lag is 50ms and 10 events. More cacheable. Easy sharding. Can be independed from time sync. Disadvantages More slow writes. But still enough fast. Limit for writing threads.
  • 45. Using Cassandra for event logging Another applications Another applications Indexing. We can use event log as notification about change state of some objects −→ indexing. Cacheable is very useful here! Message queues.
  • 46. Using Cassandra for event logging Another applications Another applications Indexing. We can use event log as notification about change state of some objects −→ indexing. Cacheable is very useful here! Message queues.