Files

40 lines
5.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="350px" preserveAspectRatio="none" style="width:492px;height:350px;" version="1.1" viewBox="0 0 492 350" width="492px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="440" x="29.5" y="12.0669">A8 PATTERNS — choose queue payload ownership explicitly</text><!--MD5=[d7735d92f2a41b821568342a009b1039]
entity Value--><rect fill="#EDF6FA" height="65.3984" style="stroke: #2B6F8E; stroke-width: 1.5;" width="220" x="6" y="22.9328"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="16" y="44.9997">01 VALUE MESSAGE</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="16" y="60.1325">QueueMessage bytes copied</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="16" y="75.2653">producer may reuse source</text><!--MD5=[6da42ccc88702fc061c993ea5bf2f4d3]
entity Pointer--><rect fill="#EDF6FA" height="65.3984" style="stroke: #2B6F8E; stroke-width: 1.5;" width="220" x="261" y="22.9328"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="144" x="271" y="44.9997">02 POINTER MESSAGE</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="271" y="60.1325">address copied only</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="271" y="75.2653">lifetime remains external</text><!--MD5=[50931bcefbe76bf129939bc87583de63]
entity Contract--><rect fill="#EDF6FA" height="65.3984" style="stroke: #2B6F8E; stroke-width: 1.5;" width="220" x="133" y="148.3328"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="168" x="143" y="170.3997">03 OWNERSHIP CONTRACT</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="143" y="185.5325">who allocates? who frees?</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="160" x="143" y="200.6653">can producer mutate?</text><!--MD5=[df87d7b2fda1e21366f2ab2a052e296a]
entity Decision--><rect fill="#EDF6FA" height="65.3984" style="stroke: #2B6F8E; stroke-width: 1.5;" width="244" x="121" y="273.7328"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="131" y="295.7997">04 FC05 DECISION</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="224" x="131" y="310.9325">small trivially copied value</text><text fill="#000000" font-family="DejaVu Sans Mono" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="131" y="326.0653">checksum proves integrity</text><!--MD5=[eed4c6828643997c2e6f18e5f23f3fe8]
link Value to Contract--><path d="M149.04,88.7328 C166.38,105.5928 187.7,126.3028 205.64,143.7428 " fill="none" id="Value-&gt;Contract" style="stroke: #8295A0; stroke-width: 1.0;"/><polygon fill="#8295A0" points="209.04,147.0428,205.3748,137.9013,205.4548,143.5576,199.7985,143.6376,209.04,147.0428" style="stroke: #8295A0; stroke-width: 1.0;"/><!--MD5=[8a1b83c410d18f160d6a16e90925aced]
link Pointer to Contract--><path d="M337.7,88.7328 C320.22,105.5928 298.74,126.3028 280.65,143.7428 " fill="none" id="Pointer-&gt;Contract" style="stroke: #8295A0; stroke-width: 1.0;"/><polygon fill="#8295A0" points="277.22,147.0428,286.4751,143.675,280.8192,143.5721,280.9221,137.9162,277.22,147.0428" style="stroke: #8295A0; stroke-width: 1.0;"/><!--MD5=[dbe67369ebacc32143fd98003c1002ec]
link Contract to Decision--><path d="M243,214.1328 C243,230.4128 243,250.3028 243,267.3528 " fill="none" id="Contract-&gt;Decision" style="stroke: #8295A0; stroke-width: 1.0;"/><polygon fill="#8295A0" points="243,271.9828,247,262.9828,243,266.9828,239,262.9828,243,271.9828" style="stroke: #8295A0; stroke-width: 1.0;"/><!--MD5=[efb38cd3635009407a4569b7b513b9e1]
@startuml
scale max 900*520
skinparam backgroundColor transparent
skinparam shadowing false
skinparam defaultFontName "DejaVu Sans Mono"
skinparam defaultFontSize 13
skinparam rectangleBorderColor #2b6f8e
skinparam rectangleBackgroundColor #edf6fa
skinparam ArrowColor #8295a0
top to bottom direction
title A8 PATTERNS — choose queue payload ownership explicitly
rectangle "01 VALUE MESSAGE\nQueueMessage bytes copied\nproducer may reuse source" as Value
rectangle "02 POINTER MESSAGE\naddress copied only\nlifetime remains external" as Pointer
rectangle "03 OWNERSHIP CONTRACT\nwho allocates? who frees?\ncan producer mutate?" as Contract
rectangle "04 FC05 DECISION\nsmall trivially copied value\nchecksum proves integrity" as Decision
Value - -> Contract
Pointer - -> Contract
Contract - -> Decision
@enduml
PlantUML version 1.2020.02(Sun Mar 01 11:22:07 CET 2020)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 25.0.4-ea+4-1-Debian
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: null
--></g></svg>