El pasado 17 de mayo se celebró en las oficinas de Paradigma Digital el meetup mensual del grupo Python Madrid. Nuestro compañero Álvaro León nos habló de Kafka y Python.
Vídeo de la presentación: https://www.youtube.com/watch?v=HPfNDL-jIGM
5. Kafka y Python
Python Madrid · Python y Kafka
Kafka ¿Qué es?
“
”
If you think of Hadoop as long-term
memory, the question then is how you
get the memories in there to begin with
Apache Kafka is like the central nervous
system, which collects all of these
messages from the underlying systems
and transmits them into the memory
vault, or storage.
- Eric Vishria
6. Kafka y Python
Python Madrid · Python y Kafka
Kafka Motivation
To be able to act as a unified
platform for handling all the
real-time data feeds a large
company might have.
…
…
…
…
…
…
Event
Tracking
Application
Logs
Application
Messages
Application
Monitoring
data
7. Kafka y Python
Python Madrid · Python y Kafka
Kafka How to ?
● Distributed, the essence
● Scalable
● Efficient
● Durable, fault tolerance
8. Kafka y Python
Python Madrid · Python y Kafka
Kafka Básicos
P PP
C C C C
…
…
…
Kafka Cluster
● Producers
● Brokers
● Consumers
12. Kafka y Python
Python Madrid · Python y Kafka
Kafka Consumers
● “Subscribe” to a feed
● Consumer groups Kafka Cluster
Partition 0
Broker1Broker2
Partition 1
○ Queue
○ Publish-subscribe
C
C
C
● Order
guarantees
C
C
13. Kafka y Python
Python Madrid · Python y Kafka
Kafka Efficiency
● Small I/O problem
○ Message sets
● Message set compression
○ policies
● Standard binary message format
○ Transfer without modifications