This commit is contained in:
JMARyA 2024-02-07 18:32:56 +01:00
parent 7f732c5b19
commit cecfe1baf5
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 86 additions and 3 deletions

View file

@ -1,6 +1,45 @@
---
obj: meta/collection
obj: concept
wiki: https://en.wikipedia.org/wiki/International_System_of_Units
---
#wip #🐇 #notnow
# SI Units
The International System of Units (SI) is a modern metric system that is widely used in [science](../Science.md), technology, and engineering. It was developed to provide a consistent and coherent framework for measuring physical quantities, and it includes seven base units and several derived units.
## Base Units:
The seven base units of the SI system are:
- [Meter](units/Meter.md) (m) - length
- [Kilogram](units/Kilogram.md) (kg) - mass
- [Second](units/Second.md) (s) - time
- [Ampere](units/Ampere.md) (A) - electric current
- [Kelvin](units/Kelvin.md) (K) - thermodynamic temperature
- [Mole](units/Mole.md) (mol) - amount of substance
- [Candela](units/Candela.md) (cd) - luminous intensity
## Prefixes
The SI system uses prefixes to represent multiples and submultiples of the base units. Here are some common prefixes used in the SI system:
| Prefix | Symbol | Multiple |
| ------ | ------ | -------------- |
| atto | `a` | $$ 10^{-18} $$ |
| femto | `f` | $$ 10^{-15} $$ |
| pico | `p` | $$ 10^{-12} $$ |
| nano | `n` | $$ 10^{-9} $$ |
| micro | `μ` | $$ 10^{-6} $$ |
| milli | `m` | $$ 10^{-3} $$ |
| centi | `c` | $$ 10^{-2} $$ |
| deci | `d` | $$ 10^{-1} $$ |
| Base | - | $$ 10^{0} $$ |
| deca | `da` | $$ 10^{1} $$ |
| hecto | `h` | $$ 10^{2} $$ |
| kilo | `k` | $$ 10^{3} $$ |
| mega | `M` | $$ 10^{6} $$ |
| giga | `G` | $$ 10^{9} $$ |
| tera | `T` | $$ 10^{12} $$ |
| peta | `P` | $$ 10^{15} $$ |
| exa | `E` | $$ 10^{18} $$ |
| zetta | `Z` | $$ 10^{21} $$ |
## Derived Units
### Electricity
- [Volt](units/Volt.md)

View file

@ -2,7 +2,50 @@
obj: application
website: https://rabbitmq.com
repo: https://github.com/rabbitmq/rabbitmq-server
wiki: https://en.wikipedia.org/wiki/RabbitMQ
---
# RabbitMQ
#wip
RabbitMQ is a widely-used open-source message broker that implements the Advanced Message Queuing Protocol (AMQP). It serves as a mediator between different components of distributed systems, allowing them to communicate asynchronously via messages.
## Concepts
### Message Broker
RabbitMQ acts as a message broker, facilitating communication between producers and consumers. Producers send messages to RabbitMQ, which stores and routes them to the appropriate consumers based on specified criteria.
### Exchange
Messages are sent to RabbitMQ through exchanges, which act as message routing mechanisms. RabbitMQ provides different types of exchanges, including direct, fanout, topic, and headers exchanges, allowing for various routing strategies.
### Queue
Queues are storage buffers within RabbitMQ where messages are held until they are consumed by consumers. Multiple queues can be bound to an exchange, and messages are delivered to queues based on routing rules defined by the exchange.
### Consumer
Consumers retrieve messages from queues and process them according to the application's logic. RabbitMQ supports multiple consumer processes or threads, allowing for concurrent message processing.
### Publisher-Subscriber Model
RabbitMQ enables the implementation of the publisher-subscriber model, where publishers (producers) publish messages to exchanges, and subscribers (consumers) receive messages from queues.
## How RabbitMQ Works
- **Message Production**: Producers publish messages to exchanges, specifying the exchange type and routing key.
- **Message Routing**: Exchanges receive messages from producers and route them to queues based on routing rules. Queues store messages until they are consumed by consumers.
- **Message Consumption**: Consumers retrieve messages from queues and process them according to application logic.
- **Acknowledgment**: After processing a message, consumers send acknowledgments to RabbitMQ to confirm message delivery and processing. RabbitMQ removes acknowledged messages from queues.
- **Error Handling**: RabbitMQ provides features for handling message delivery failures, such as dead-letter exchanges and message requeuing.
## Use Cases
- **Microservices Communication**: RabbitMQ facilitates communication between microservices in distributed systems, ensuring reliable message delivery and decoupling services.
- **Task Queues**: RabbitMQ is used for distributing tasks across multiple workers in task queue systems, enabling parallel processing and workload balancing.
- **Event-Driven Architectures**: RabbitMQ supports event-driven architectures, allowing components to react to events and messages asynchronously.
## Docker-Compose
```yml
version: "3.2"
services:
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: 'rabbitmq'
ports:
- 5672:5672 # RabbitMQ
- 15672:15672 # Management Console
volumes:
- ./data/:/var/lib/rabbitmq/
- ./log/:/var/log/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: myuser
RABBITMQ_DEFAULT_PASS: mypassword
```

View file

@ -1,6 +1,7 @@
---
obj: concept
website: https://raft.github.io
wiki: https://en.wikipedia.org/wiki/Raft_(algorithm)
---
# Raft Consensus Algorithm <img src="data:image/avif;base64,AAAAHGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZgAAAPJtZXRhAAAAAAAAAChoZGxyAAAAAAAAAABwaWN0AAAAAAAAAAAAAAAAbGliYXZpZgAAAAAOcGl0bQAAAAAAAQAAAB5pbG9jAAAAAEQAAAEAAQAAAAEAAAEWAAAKeQAAAChpaW5mAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFDb2xvcgAAAABqaXBycAAAAEtpcGNvAAAAFGlzcGUAAAAAAAAAyAAAAMgAAAAQcGl4aQAAAAADDAwMAAAADGF2MUOBQGAAAAAAE2NvbHJuY2x4AAEAAgAGgAAAABdpcG1hAAAAAAAAAAEAAQQBAoMEAAAKgW1kYXQSAAoKWB3x8djQECBogDLoFBGQAkkkkUC0XrzYrNDsdi6ZtRqjzbMBUY3dKgPudKFya5aFnPVyAWaiMzdt1DPxRZJW5ck6rQfFdOKEK5nXOPURbQL8np9UQYyXioZsEEwkn4SjiPXZPBRX2X+l6MFYqVl2+9hq4vSHmpGAXfQGYzM5AOHpgUs+YBQdisxRolXzAN2inX5vwUtdXfk+Y1nnDWu697ovAWYI0Vmutx0zlhEZW7gyusQf58hCykGFN1PtYvRCyQ8VsELPI/tU0GP8rVj9YEGXqELZl5O6npqBiygssm9Z19Wxtz2ta0PpR1Osc0fZq88uxDMQ9tTVinPnpkzsJSbHQm+3O/YAazSQw7DeoYgKImenDLIuYK/YJW5PtyhKFT4kvGRlHJlMrxMZBMesMkHTiH4bmvxf14xW54B55pvxwnGsO7NwtF10rE5j2snEi5+/pf6sNjHHikGS6UhjNp6xt+6xI99RTzTB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