%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
User -->|Requête 1,2,3| LoadBalancer
LoadBalancer -->|Requête 1| Server1
LoadBalancer -->|Requête 2| Server2
LoadBalancer -->|Requête 3| Server3
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
%%classDef
classDef classAlert fill:red,color:white,stroke-width:2px,stroke:darkRed;
%%flowchart
User -->|Requête 1,2,3| LoadBalancer
LoadBalancer -->|Requête 1| Server1
LoadBalancer -->|Requête 2,3| Server2
LoadBalancer -->| | Server3
%%Style
class Server3 classAlert;
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
User -->|http://h1.com\nhttp://h2.com\nhttp://h2.com/api\ndddd|Reverse[Reverse Proxy]
Reverse -->|http://h1.com| SiteVi[Site Vitrine]
Reverse -->|http://h2.com| Front
Reverse -->|http://h2.com/api| BackEnd
C'est quoi la difference ?
| Avantage | Inconvenient |
| Structuré | |
| Versionnable | Recherche limité |
| Transactionnel | |
| Support | |
| Avantage | Inconvenient |
|---|---|
| Flexibilité de schéma | Peu de Support Acid/Transaction |
| Modélisation des données | Limitation dans les jointures |
| Scalabilité | Manque de support |
| Recherche avancées |
| Avantage | Inconvenient |
|---|---|
| Performance | Compliqué |
| Répartition Spatial | Peu support des transactions/ACID |
| Avantage | Inconvenient |
|---|---|
| Performance | Pas de Recherche |
| Simple à utiliser | Pas de transactions |
| Scalable | Pas de jointures |
| Stockage en memoire RAM |
| Avantage | Inconvenient |
|---|---|
| Compression | Tres specialisé |
| Scalabilité | Pas de transactions |
| Performance |
Nommé aussi bucket
Responses: 0
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
ServiceCompta --> |sql |Relationnel[(Relationnel)]
ServiceCompta --> |event | ServiceRecherche
ServiceRecherche --> |document| Document[(Document)]
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
ServiceCompta --> |sql |RelationnelCompta[(RelationnelCompta)]
ServiceClient --> |sql |RelationnelClient[(RelationnelClient)]
ServiceCompta --> |event | ServiceRecherche
ServiceFacture --> |event | ServiceRecherche
ServiceClient --> |event | ServiceRecherche
ServiceRecherche --> |document| Document[(Document)]
ServiceFacture --> |sql |RelationnelFacture[(RelationnelFacture)]
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
Producer --> |client.facture.1234| Queue
Queue --> |client.*| ClientEventConsumer
Queue --> |.*facture.*| FactureEventConsumer
Queue --> |.*1234| SseEventConsumer
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
Producer[Producer] --> |Produit 1-40/sec |Queue
Queue --> |Consume 10/sec | ClientEventConsumer
La dependence :
implementation 'org.springframework.boot:spring-boot-starter-amqp'
@Configuration
public class QueueConfiguration {
public static final String TEMPERATURE_QUEUE = "temperatureQueue";
@Bean
TopicExchange appExchange() {
return new TopicExchange("exchange", true, false);
}
@Bean
public Queue temperatureQueue() {
return QueueBuilder
.durable(TEMPERATURE_QUEUE)
.quorum()
.build();
}
@Bean
public Binding temperatureBinding(
Queue temperatureQueue,
TopicExchange appExchange
) {
return BindingBuilder.bind(temperatureQueue).to(appExchange).with("sensors.temp.#");
}
}
@Service
public class TemperatureListener {
...
@RabbitListener(queues = TEMPERATURE_QUEUE)
public void temperatureChange(String temperature) {
log.info("temperature {}", temperature);
temperatureService.receive(temperature);
}
...
}
Par defauts, les messages en erreurs sont rejoué à l'infini
Il est conseille de mettre en place un deadLetterQueue
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
graph LR
Producer[Producer] --> | |Queue
Queue --> | ERROR | Consumer
Queue --> | | DeadLetterQueue