DEV Community

Cover image for A hybrid AI collaboration platform
libradito
libradito Subscriber

Posted on

A hybrid AI collaboration platform

Redis AI Challenge: Real-Time AI Innovators

This is a submission for the Redis AI Challenge: Real-Time AI Innovators.

What I Built

I built AI Chat Collaboration Platform, a hybrid AI workspace designed for organizations that need the privacy of local models and the scaling power of cloud AI — all in one seamless, real-time collaboration tool.

Demo

video: https://youtu.be/TEDHneyQJ5M

https://demo-app.automatmx.cloud/

How I Used Redis 8

Redis 8 is the heart of the application — not just a cache, but a real-time state server that enables hybrid AI collaboration with both local and cloud models.

1. Field-Level Expiration for Intelligent Caching

  • Used HSETEX, HGETEX, and HGETDEL to set **per-field

2. Real-Time Collaboration Infrastructure

  • Pub/Sub Channels:
    • chat:messages → Messages, edits, deletions
    • chat:typing → Typing indicators
    • chat:presence → Join/leave events
  • Redis Streams for event sourcing (typing events, cursor tracking, and audit logs) with automatic trimming.
  • Presence Tracking with hash-based activity logs (5-min expiration).

3. Distributed Locking & Race Condition Prevention

  • PX-millisecond locks ensure only one user can edit a resource at a time.
  • Ownership validation to avoid overwriting others’ changes.

4. Performance & Security Optimizations

  • Message Deduplication → 60-second dedup window to avoid double-processing.
  • Rate Limiting → IP-based throttling for share link access (10/hour/IP).
  • Cache Warming → Frequently accessed files are preloaded in cache for instant retrieval.

5. Future-Ready Vector Search

  • Embedding storage structure is ready for Redis 8 vector similarity search.
  • Will enable semantic retrieval over uploaded documents once feature is stable.

Why Redis 8 Was Essential

  • Granular control → Different TTLs for different file components.
  • Atomic operations → Safe one-step reads/deletes and distributed lock handling.
  • Scalable real-time updates → Pub/Sub enables horizontal scaling across multiple app servers.
  • Future-proof → Same Redis 8 data layer will power AI semantic search later without a redesign.
  • Privacy + Power → Secure local AI for sensitive data, cloud AI for on-demand scaling.

Top comments (0)