Feature Idea: HBaseSessionService for low-latency, scalable session storage #3149
vaibhav-Singh9888
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Idea: HBaseSessionService for low-latency, scalable session storage
Hello ADK Team and Community,
I'm a user of the google-adk-python framework and have been very impressed with its design, particularly the extensible SessionService architecture.
Motivation
For many real-time chat and agent applications, the latency of session storage is a critical performance factor. While the existing DatabaseSessionService is great for relational persistence and VertexAiSessionService is perfect for GCP-native deployments, there's an opportunity for a solution tailored to large-scale, self-hosted environments that demand extremely low-latency reads and writes.
Apache HBase is a distributed, non-relational database modeled after Google's Bigtable, designed for high-throughput, real-time access to massive datasets. Its architecture makes it an ideal backend for storing and retrieving conversation histories in high-traffic agent applications.
Proposal
I propose the addition of a new HBaseSessionService to the ADK. This would provide a first-class integration for developers who use or want to use an HBase cluster for managing session state and history.
I have already developed a working implementation of this for a personal project and believe it would be a valuable addition to the framework.
Here is how the new service would fit into the existing structure:
HBaseSessionService
How it works: Connects to an Apache HBase cluster using a client library like happybase. Session data (id, state, events, etc.) is stored in an HBase table, with a row key designed for efficient lookups (e.g., a composite of app_name, user_id, and session_id). This structure leverages HBase's strengths in fast key-based retrieval.
Persistence: Yes. Data is durably stored in the distributed HBase cluster and survives application restarts.
Requires:
Best for:
Example Usage
The developer experience would be consistent with the other services:
Next Steps
I am opening this discussion to gauge the team's interest and get feedback on this proposal. If this aligns with the project's vision, I would be more than happy to clean up my existing code, add the necessary tests and documentation, and submit a pull request for review.
Thank you for your time and consideration!
Beta Was this translation helpful? Give feedback.
All reactions