Skip to content

Commit

Permalink
Updated slids
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Feb 7, 2024
1 parent afcfba5 commit 7974a12
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 65 deletions.
Binary file added docs/images/apache_camel_pipeline_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mirror_maker_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mirror_maker_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 41 additions & 65 deletions docs/kafka_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,6 @@

---

### Request reply

![com-1](images/com-01-request_reply.png)

---

### Surveyor

![com-2](images/com-02-surveyor.png)

---

### Pub-sub

![com-3](images/com-03-pub-sub.png)
Expand All @@ -121,15 +109,9 @@

---

### Push-pull with reply to producer
### Kafka communication strategy

![com-6](images/com-06-push-pull-reply.png)

---

### Other strategies (NATS etc.)

![com-7](images/com-07-req-pull.png)
* allows all three strategies

---

Expand All @@ -140,31 +122,11 @@

---

### Classic architecture

* Front-end
* Back-end
- business logic
- data layer
* Storage

![Microservices1](images/microservices1.png)

---

### Stateless and stateful microservices

* Services w/o state
- super easy to test
- usually very easy to scale up
- restarts are usually not a big deal
* Stateful service
- the opposite is true
![Microservices1](images/apache_camel_pipeline.png)

---

[Full image](images/microservices2.png)
![Microservices2](images/microservices2.png)
![Microservices1](images/apache_camel_pipeline_2.png)

---

Expand Down Expand Up @@ -232,6 +194,19 @@

---

## Topic with one partition only

```
+---+---+---+---+---+---+---+---+---+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ...
+---+---+---+---+---+---+---+---+---+
^ ^
| |
read write
```

---

## Topic is NOT a queue

* Topic is basically stateless
Expand Down Expand Up @@ -266,19 +241,6 @@

---

## Topic with one partition only

```
+---+---+---+---+---+---+---+---+---+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ...
+---+---+---+---+---+---+---+---+---+
^ ^
| |
read write
```

---

## Kafka technology is much more difficult though

* Partitions
Expand Down Expand Up @@ -405,6 +367,15 @@ partition #3 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ...

---

## Kafka Cluster

* Multiple brokers
* Multiple Zookeepers

[Structure](https://www.codeproject.com/KB/IP/5275411/Kafka-Internals-1.png)

---

### Retention

* Retention policy
Expand All @@ -422,17 +393,19 @@ log.roll.hours

---

## Kafkacat (kcat)
## Mirror Maker

```
kafkacat -L -b localhost:9092
kafkacat -P -b localhost:9092 -t "upload"
kafkacat -P -b localhost:9092 -t filedrop -p 0 file1.bin file2.txt /etc/motd dalsi_soubor.tgz
kafkacat -C -b localhost:9092 -t "upload"
kafkacat -C -b localhost:9092 -t topic1 -p 0 -o -1000 -e
kafkacat -b localhost:9092 -G skupina_konzumentů topic1
kafkacat -b localhost:9092 -G skupina_konzumentů téma1 téma2
```
* Replication over multiple data centers

![MirrorMaker1](images/mirror_maker_1.png)

---

## Mirror Maker

* Internally bunch of producers+consumers

![MirrorMaker2](images/mirror_maker_2.png)

---

Expand Down Expand Up @@ -536,3 +509,6 @@ kafkacat -b localhost:9092 -G skupina_konzumentů téma1 téma2
* Sometimes defined by one simple property file

---

## Thank you!

0 comments on commit 7974a12

Please sign in to comment.