From a422cd832a16e9c63cff68378d17c4d1719008ef Mon Sep 17 00:00:00 2001 From: JohannesItten Date: Fri, 3 Jul 2026 10:43:41 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20graph-level=20fanout=20=E2=80=94=20reus?= =?UTF-8?q?e=20flow=20UUID=20for=20same=20from=5Fnode+from=5Fport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edges that share the same source node and port now get the same MXL flow UUID. One writer, multiple independent readers — each tracks its own position in the ring buffer. Enables 1-to-N routing in graph.json without any splitter node. Co-Authored-By: Claude Sonnet 4.6 --- studio-manager/main.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/studio-manager/main.cpp b/studio-manager/main.cpp index a4aa34b..e5007e7 100644 --- a/studio-manager/main.cpp +++ b/studio-manager/main.cpp @@ -6,8 +6,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -62,11 +64,18 @@ static dmf::FlowGraph load_graph(const std::string& path) { n.value("params", nlohmann::json::object()) }); } + // Edges sharing the same from_node+from_port reuse the same flow UUID, + // so one writer can be read by multiple consumers (MXL supports N readers per flow). + std::map, std::string> flow_ids; for (const auto& e : j.at("edges")) { + auto from_node = e.at("from").get(); + auto from_port = e.at("from_port").get(); + auto key = std::make_pair(from_node, from_port); + if (!flow_ids.count(key)) flow_ids[key] = gen_uuid(); g.edges.push_back({ - gen_uuid(), - e.at("from").get(), - e.at("from_port").get(), + flow_ids.at(key), + from_node, + from_port, e.value("to", std::string{}), e.value("to_port", std::string{}), e.at("format")