Data Flow
The main path
Section titled “The main path”- The native frontend takes the keystrokes or speech and sends them to the Gateway through
protocol/client/. - The Gateway finds the engine that declared the matching capability (pinyin or voice) and sends the request through
protocol/engine/. - The engine returns candidates or recognition results. The Gateway puts them in order and hands them back, and the frontend shows the candidates.
Connecting, capability discovery, health checks and every request have a timeout. A timeout counts as a failure and nothing waits forever. When an engine becomes unavailable, the Gateway marks its capability unavailable, reconnects in the background with backoff, rediscovers the capabilities and recovers. None of these failures makes the Gateway exit or hang.
Every pinyin keystroke makes a round trip to the Gateway. With the pinyin engine on the same machine the latency is acceptable; a remote engine is noticeably slower.
The outbound exit
Section titled “The outbound exit”The Gateway sends data to a future Reducer asynchronously and one way, without waiting for a reply. A slow or offline downstream must not delay the candidates or affect typing.
In this phase only the exit on the Gateway is reserved, and protocol/ingest/ holds notes only. The Reducer would then publish to record centres such as message history, AI learning and statistics. None of them is in the product repository.
Privacy
Section titled “Privacy”Logs and error messages contain only states, addresses, capability names, error codes and engine ids. They do not contain recognised text or pinyin content. The text of gRPC messages from an engine is not logged; only the status code is kept.