Files
zeekayandGitHub 4bc4485fda Add unified cloud binary design paper (HIP-0106) (#1)
Design paper describing the Hanzo unified Go binary architecture:
one statically linked process (hanzoai/cloud) mounting every platform
subsystem, built on the zip framework (Fiber v3) with embedded goja
for in-process JS, esbuild for TS->ES5 transpilation, and ZAP RPC
serving both the wire and the in-process dispatch seam.

Covers motivation (microservices overhead for co-located control
planes), architecture, the TS->goja->native-Go migration path
(esign tRPC->ZAP case study, 14/14 routers server-side),
multi-tenancy by configuration, the in-process-goja vs sandboxed
hanzoai/runtime code-execution boundary, a cost model anchored in
published service-mesh measurements, and performance (function call
vs network RPC, promise pipelining).

8 pages, two TikZ figures (layered architecture, cost comparison),
20 references. Compiles clean with tectonic; no missing citations.
2026-06-16 16:09:13 -07:00

64 lines
2.7 KiB
TeX

\begin{figure*}[t]
\centering
\begin{tikzpicture}[
font=\scriptsize,
svc/.style={draw=hzslate!60, fill=hzslate!10, rounded corners=1.5pt,
minimum width=10mm, minimum height=5mm, inner sep=1pt},
side/.style={draw=hzred!60, fill=hzred!12, rounded corners=1.5pt,
minimum width=10mm, minimum height=3mm, inner sep=0pt,
font=\fontsize{4.5}{5}\selectfont},
one/.style={draw=hzgreen!70, fill=hzgreen!14, rounded corners=2pt,
minimum width=44mm, minimum height=10mm, align=center},
lbl/.style={hzslate!80}
]
% --- decomposed stack (left) ---
\node[lbl, anchor=south, font=\scriptsize\bfseries] at (1.7,2.55)
{Decomposed: $N$ services $\times R$ replicas};
\foreach \x in {0,1,2,3} {
\node[svc] (s\x) at (\x*1.15, 1.9) {};
\node[side, below=0.4mm of s\x] (d\x) {sidecar};
}
\node[lbl, anchor=west, font=\fontsize{5}{6}\selectfont] at (-0.55,1.9) {};
\node[svc, fill=hzslate!4, minimum width=48mm] (mesh) at (1.72,0.85)
{\scriptsize service mesh control plane + mTLS per hop};
\draw[-{Latex[length=1.4mm]}, hzslate!70]
(s0.east) .. controls (0.9,2.3) and (1.4,2.3) .. (s1.west);
\draw[-{Latex[length=1.4mm]}, hzslate!70]
(s1.east) .. controls (2.0,2.3) and (2.6,2.3) .. (s2.west);
\draw[-{Latex[length=1.4mm]}, hzslate!70]
(s2.east) .. controls (3.2,2.3) and (3.8,2.3) .. (s3.west);
\node[lbl, anchor=north, text width=52mm, align=center,
font=\fontsize{5.5}{6.5}\selectfont] at (1.72,0.35)
{cost $\;\propto\; N\!\cdot\!R$ containers $+\; N\!\cdot\!R$ sidecars
$+\; h$ network hops $\times 2$ proxy traversals};
% --- unified binary (right) ---
\node[lbl, anchor=south, font=\scriptsize\bfseries] at (7.6,2.55)
{Unified: $R$ replicas};
\node[one] (u) at (7.6,1.75)
{one Go binary \\[1pt]
\fontsize{5}{6}\selectfont iam $\cdot$ kms $\cdot$ gateway $\cdot$ ai $\cdot$ \dots};
\node[lbl, anchor=north, text width=50mm, align=center,
font=\fontsize{5.5}{6.5}\selectfont] at (7.6,1.1)
{cost $\;\propto\; R$ containers, no sidecars, \\
$h$ function calls, zero serialization};
\draw[-{Latex[length=2mm]}, hzgreen!70, line width=0.6pt]
(4.55,1.45) -- node[above, font=\fontsize{5.5}{6}\selectfont, hzgreen!60]{collapse} (5.4,1.45);
\end{tikzpicture}
\caption{Illustrative cost comparison (shape, not measurement). The
decomposed stack pays for $N\!\cdot\!R$ containers plus an equal number of
sidecars and a mesh control plane; each user action crossing $h$ subsystems
pays $h$ network hops with two proxy traversals each. The unified binary
pays for $R$ containers and turns the $h$ hops into $h$ function calls.
Per-hop mesh overheads are taken from published service-mesh
measurements~\cite{istio_overhead}; the comparison assumes co-scaled
subsystems (\S\ref{sec:cost}).}
\label{fig:cost}
\end{figure*}