4. Message Orchestration and Interaction
4.1 Message Bus (Kafka/RabbitMQ)
Publish-Subscribe: Any new data from the aggregator or user requests is published to topics like
debate_requests,roast_requests, orfact_check_events.Scalability: Multiple AI worker nodes can subscribe to these topics. If traffic spikes, the system seamlessly adds more subscribers.
Reliability: A mismatch between ingestion speed and AI processing is mitigated by queue backpressure, ensuring robust concurrency handling.
4.2 Reactive Flow Example
User Action: A user queries, “Hanna, reveal the hidden cause of the local election upset.”
API Gateway: Publishes
(user_id, question_text, context_info)todebate_requests.Hanna Worker: Consumes the message, merges relevant aggregator data (news stories, references, factual leads), then crafts a comedic yet fact-based perspective.
API Gateway: Receives the final text from
debate_repliesand returns it to the user—often accompanied by sources or disclaimers about potential speculation.
Last updated