Repository Public MIT Research preview
1% MA02-F03 — Bus de messages et files bornées : le chemin d'un travail, de sa création à sa publication.2% Idée : chaque file a une capacité ; quand elle est pleine, celui qui dépose ATTEND, et le ralentissement3% remonte jusqu'à la source (contre-pression). Deux étranglements voulus : les places devant le service, et le débit.4% Le bus découple ceux qui produisent un fait de ceux qui s'y abonnent. Schéma conceptuel, sans quantité mesurée.5\begin{tikzpicture}[x=1mm, y=1mm]6 \path (0,0) rectangle (142,56);7 % Chaîne du haut : producteur -> file bornée -> agents -> places -> service8 \node[atlas block, minimum width=19mm, minimum height=9mm] (prod) at (10.5,40) {producteur};9 \MaFile{file}{(27,37.4)}{6}{6}10 \node[atlas note, anchor=south, text=maTexte] at (40.2,43.2) {file de travaux, bornée};11 \node[atlas note, anchor=north] at (40.2,36.6) {6 places, toutes prises};12 \draw[atlas arrow] (prod.east) -- (file-w);13 \foreach \k in {1,...,5}{\node[ma sous agent, minimum width=15mm, minimum height=4.7mm, inner ysep=.6pt, font=\AtlasSizeTiny\bfseries] (a\k) at (70,57-5.6*\k) {agent-\k};}14 \draw[atlas arrow] (file-e) -- (61.5,40) node[atlas note, pos=.5, above, inner sep=1pt] {retire};15 \foreach \k in {0,1,2}{\draw[maDecision, line width=.9pt, fill=maPanneau] (88,36.4+4.4*\k-2.2) rectangle ++(5.4,3.8);}16 \fill[maDecision] (90.7,36.1) circle[radius=.9mm] (90.7,40.5) circle[radius=.9mm];17 \node[atlas note, anchor=south, text=maDecision, align=center] at (90.7,47.2) {sémaphore\\ 3 places};18 \draw[atlas arrow] (78.2,40) -- (87.4,40);19 \node[atlas block strong, minimum width=24mm, minimum height=13mm, align=center] (svc) at (122,40) {service\\ {\AtlasSizeTiny modèle simulé}};20 \draw[atlas arrow] (94,40) -- (svc.west) node[atlas note, pos=.5, above, inner sep=1pt] {appel};21 \node[atlas tag=maDecision, anchor=north] at (122,32.6) {DÉBIT BORNÉ : SEAU À JETONS};22 % Contre-pression23 \draw[atlas arrow hazard, line width=1.4pt, dash pattern=on 3pt off 2pt] (40.2,48) .. controls (32,52.6) and (16,52.6) .. (10.5,45.2);24 \node[atlas note, anchor=west, text=maRisque] at (14,54.4) {file pleine : le producteur attend};25 % Bus d'événements26 \MaBus{bus}{(6,21)}{130mm}27 \node[atlas note, anchor=south west, text=maTexte] at (6,22.1) {bus d'événements};28 \node[ma message] at (108,25.4) {travail.terminé · schéma v2};29 \draw[atlas arrow valid] (70,26.6) -- (70,21.6);30 \node[atlas note, anchor=west, text=maValide] at (71.2,24.3) {publie};31 % Abonnés, chacun derrière sa file bornée32 \foreach \x/\nom/\occ in {22/{journal (ajout seul)}/1, 62/{tableau de bord}/2, 102/{agrégateur (dédoublonne)}/3}{33 \MaFile{f\x}{(\x-6.6,12.2)}{3}{\occ}34 \draw[atlas arrow, line width=.9pt] (\x,20.6) -- (\x,17.6);35 \draw[atlas arrow, line width=.9pt] (\x,12) -- (\x,8.4);36 \node[atlas block, minimum width=34mm, minimum height=6.4mm, inner ysep=1.5pt, font=\AtlasSizeTiny\bfseries] at (\x,5) {\nom};}37 \node[atlas note, anchor=west] at (29,14.8) {file de l'abonné};38 \draw[maRisque, line width=.9pt, fill=maPanneau] (126.4,12.2) rectangle ++(4.4,5.2) (130.8,12.2) rectangle ++(4.4,5.2);39 \fill[maRisque] (128.6,14.8) circle[radius=.8mm];40 \draw[atlas arrow hazard, line width=.9pt] (119.2,5) -- (130.8,5) -- (130.8,11.6);41 \node[atlas note, anchor=south, text=maRisque] at (130.8,17.8) {lettres mortes};42\end{tikzpicture}43