Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] AAP-32854: Decouple Views from Pipelines #1498

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

manstis
Copy link
Contributor

@manstis manstis commented Jan 17, 2025

=== DRAFT ===

=== DO NOT MERGE ===

Jira Issue: https://issues.redhat.com/browse/AAP-32854

Description

This PR demonstrates basic decoupling of our View's from the LLM.

This naive implementation simply uses synchronous Django Signals to emulate an Event Bus.

The thinking is that by decoupling View's from LLM we could later deploy each pipeline as separate containers and have a real Event Broker, such as KNative, handle routing events to containers allowing us to improve scalability and fault tolerance.

That said and done.. this could end up being an academic exercise as there needs to be a level of pragmatism between our needs and realising a idealised distributed system. Hence, this PR shows a basic implementation for a single endpoint: ChatBot.

Testing

N/A. PR to aid technical discussion.

Steps to test

N/A. PR to aid technical discussion.

Scenarios tested

N/A. PR to aid technical discussion.

Production deployment

=== DO NOT MERGE ===

=== DO NOT DEPLOY TO PRODUCTION ===

=== DO NOT PASS GO, DO NOT COLLECT $200 ===

@manstis manstis requested review from goneri and jameswnl January 17, 2025 13:47
data = None
match event_type:
case "chat":
response = chat_service.send(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd send Cloud Events.. something I can refactor this PR to use... if there's any traction for it's full implementation.

@manstis manstis requested a review from ldjebran January 17, 2025 14:29
@manstis manstis force-pushed the AAP-32854 branch 2 times, most recently from 5267c49 to af82656 Compare January 23, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant