The Bridge: Severing the Protocol from the Medium
Decoupling the abstract routing logic from its physical transmission vectors.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Transmutation // Spatial
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
BRIDGE_HEX: MODULE
GRANT SEND_MESSAGE;
NEWMODE MEDIUM_TYPE = SET (FIBER, COPPER, AETHER);
/* The Implementation Interface */
TRANSMIT: PROCEDURE (msg CHAR(255), medium MEDIUM_TYPE);
CASE medium OF
(FIBER):
/* Flash pulses of light */
(COPPER):
/* Modulate electrical currents */
(AETHER):
/* Ripple the astral plane */
ESAC;
END TRANSMIT;
/* The Abstraction Interface */
SEND_MESSAGE: PROCEDURE (msg CHAR(255), priority INT, m MEDIUM_TYPE);
DCL formatted_msg CHAR(255);
IF priority > 5 THEN
formatted_msg := 'URGENT: ' // msg;
ELSE
formatted_msg := 'NORMAL: ' // msg;
FI;
/* Delegate to the physical medium */
TRANSMIT(formatted_msg, m);
END SEND_MESSAGE;
END BRIDGE_HEX;
The Bridge hex separates an abstraction from its implementation, allowing both to evolve independently. In the grand telecom exchanges, the logic of message prioritization and formatting is kept distinct from the physical realities of fiber, copper, or aetheric transmission. This decoupling ensures that when a new astral plane is discovered, the high-level routing logic requires no alterations.
Runic Tags:
#telecom
#chill
#bridge
#transmutation
#switching-hexes