Files
HealthAppRepositoryB/ArchitectureSuggestions/diagrams/service-topology-options.drawio
T

133 lines
13 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<mxfile host="app.diagrams.net" type="device" compressed="false">
<diagram id="A" name="A — five independent processes, colocated deployment">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="1700" pageHeight="1250">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" value="A — preserve processes, routing and separately owned databases" style="text;html=0;fontSize=25;align=left;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="20" width="1600" height="60" />
</mxCell>
<mxCell id="client" value="External client&#10;HTTPS login / authorized APIs" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="630" y="100" width="390" height="100" />
</mxCell>
<mxCell id="host" value="One suitably sized Linux host&#10;Independent systemd units/configuration; same remote-capable HTTPS interfaces" style="rounded=0;whiteSpace=wrap;html=0;fontSize=14;fillColor=#fff6df;strokeColor=#b28725;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="240" width="1600" height="100" />
</mxCell>
<mxCell id="gateway" value="Gateway process&#10;Authentication + authorization&#10;Original internal routing retained" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="630" y="390" width="390" height="145" />
</mxCell>
<mxCell id="profile" value="Profile process&#10;Own Profile DB credentials&#10;Atomic profile/account association" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="600" width="370" height="155" />
</mxCell>
<mxCell id="obs" value="Observation process&#10;Own Observation DB credentials&#10;Context / current source data" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="450" y="600" width="370" height="155" />
</mxCell>
<mxCell id="insights" value="Insights process&#10;Current numerical insights/trends&#10;No database or stored results" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="860" y="600" width="370" height="155" />
</mxCell>
<mxCell id="overview" value="Overview process&#10;Profile + latest + selected insight&#10;No database or stored results" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1270" y="600" width="370" height="155" />
</mxCell>
<mxCell id="pg" value="One PostgreSQL server&#10;Two independent databases and identities&#10;No shared clinical repository" style="shape=cylinder3;whiteSpace=wrap;html=0;fontSize=14;fillColor=#f1e8fa;strokeColor=#76558d;spacing=14;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="830" width="580" height="140" />
</mxCell>
<mxCell id="rules" value="Placement changes only: all five processes remain independent.&#10;Gateway-routed calls and separate DB ownership remain.&#10;Colocation may release physical capacity only if that capacity was actually duplicated.&#10;Bounded pools and safe request-local GET reuse are optional resource/call refinements." style="rounded=0;whiteSpace=wrap;html=0;fontSize=14;fillColor=#fff6df;strokeColor=#b28725;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="700" y="830" width="940" height="140" />
</mxCell>
<mxCell id="e0" value="HTTPS" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="client" target="gateway">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e1" value="HTTPS / service credentials" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="profile">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e2" value="HTTPS / service credentials" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e3" value="HTTPS / service credentials" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="insights">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e4" value="HTTPS / service credentials" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="overview">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e5" value="Profile DB only" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="profile" target="pg">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="e6" value="Observation DB only" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="obs" target="pg">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="foot" value="Internal callbacks still use Gateway: Observation → Profile; Insights → Observation; Overview → Profile/latest/insight. These callback routes are retained, not direct arrows between application services. One PostgreSQL server is already permitted by US-16. Five VMs sharing a host may have little additional physical consolidation benefit." style="rounded=0;whiteSpace=wrap;html=0;fontSize=14;fillColor=#fff6df;strokeColor=#b28725;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="1040" width="1600" height="130" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="B" name="B — five independent processes, optional direct private calls">
<mxGraphModel grid="1" gridSize="10" page="1" pageWidth="1700" pageHeight="1250">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" value="B — retain service processes; revise internal routing and trust" style="text;html=0;fontSize=25;align=left;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="20" width="1600" height="60" />
</mxCell>
<mxCell id="client" value="External client&#10;Only public Gateway is reachable" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="680" y="110" width="340" height="100" />
</mxCell>
<mxCell id="gateway" value="Gateway process&#10;Login / current authorization&#10;Issue request-scoped trusted delegation&#10;Never trust client identity headers" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="680" y="285" width="340" height="160" />
</mxCell>
<mxCell id="profile" value="Profile process&#10;Private authenticated HTTPS API&#10;Own Profile DB" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="50" y="570" width="340" height="155" />
</mxCell>
<mxCell id="obs" value="Observation process&#10;Private authenticated HTTPS API&#10;Own Observation DB&#10;Current period/context selection" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="460" y="570" width="340" height="155" />
</mxCell>
<mxCell id="insights" value="Insights process&#10;Private authenticated HTTPS API&#10;Current calculation / no result DB" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="870" y="570" width="340" height="155" />
</mxCell>
<mxCell id="overview" value="Overview process&#10;Private authenticated HTTPS API&#10;Compose available parts / no DB" style="rounded=0;whiteSpace=wrap;html=0;fontSize=15;fillColor=#e8f0fe;strokeColor=#355070;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="1280" y="570" width="340" height="155" />
</mxCell>
<mxCell id="e0" value="HTTPS client request" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="client" target="gateway">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="public0" value="Authorized dispatch" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="profile">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="public1" value="Authorized dispatch" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="public2" value="Authorized dispatch" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="insights">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="public3" value="Authorized dispatch" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="gateway" target="overview">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="dep1" value="Private patient-existence read" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="obs" target="profile">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="dep2" value="Private selected-series read" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="insights" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="dep3" value="Private profile read" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="overview" target="profile">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="dep4" value="Private latest overall read" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="overview" target="obs">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="dep5" value="Private selected insight" style="edgeStyle=orthogonalEdgeStyle;html=0;endArrow=open;fontSize=13;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="overview" target="insights">
<mxGeometry as="geometry" relative="1" />
</mxCell>
<mxCell id="security" value="Required trust boundary&#10;Verified HTTPS + generated service identity/credential&#10;Operation allowlist + Gateway-issued request-scoped patient/action/audience delegation&#10;Receiver validates scope and actual resource owner; no client bypass&#10;No custom cryptography; no new service mesh required" style="rounded=0;whiteSpace=wrap;html=0;fontSize=14;fillColor=#fff6df;strokeColor=#b28725;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="840" width="790" height="180" />
</mxCell>
<mxCell id="compat" value="Design status&#10;All five processes and two DB owners remain independent.&#10;Private endpoints support colocated or separate-host placement.&#10;Original gateway-routed communication changes; record AC-16-H/trust revisions.&#10;Additional authentication/delegation work can offset the saved hop." style="rounded=0;whiteSpace=wrap;html=0;fontSize=14;fillColor=#fff6df;strokeColor=#b28725;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="890" y="840" width="750" height="180" />
</mxCell>
<mxCell id="foot" value="This is an exploratory topology, not an approved implementation/trust specification or a measured energy improvement. Scope authentication remains per current external request. Independent service reads do not automatically provide a cross-service snapshot. No result cache, broker, cross-service SQL access or extra database is implied." style="rounded=0;whiteSpace=wrap;html=0;fontSize=14;fillColor=#fff6df;strokeColor=#b28725;spacing=12;" vertex="1" parent="1">
<mxGeometry as="geometry" x="40" y="1070" width="1600" height="130" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>