Skip to content

Latest commit

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..

README.md

Build StatusStatic BadgeDiscord

Skye

Vector similarity search platform for BharatML Stack.

Skye enables fast semantic retrieval by representing data as vectors and querying nearest matches in high-dimensional space. It is composed of three runnable components: skye-admin, skye-consumers, and skye-serving.

✨ Features

  • 🔌 Pluggable Vector Databases — Support for multiple vector DB backends (Qdrant, NGT, Eigenix) via a generic abstraction layer
  • 🏗️ Shared Embeddings, Isolated Indexes — Models are stored once but serve multiple tenants (variants), reducing data redundancy
  • Event-Driven Administration — Model lifecycle management through Kafka-based event flows for resilience and fault tolerance
  • 💾 Multi-Layer Caching — In-memory (FreeCache) + distributed (Redis) caching for ultra-low-latency serving
  • 🔍 Similarity Search APIs — gRPC APIs for similar-candidate search, bulk embedding retrieval, and dot-product computation
  • 🔄 Real-Time + Batch Ingestion — Kafka consumers for both reset/delta batch jobs and real-time embedding updates
  • 🎯 Configurable Distance Functions — DOT, Cosine, and Euclidean distance support
  • 🛡️ Resilience — Circuit breakers, retry topics, and snapshot-based recovery

🏗️ Architecture

Skye is built around three components:

ComponentRole
skye-servingHandles real-time similarity search queries with in-memory caching and vector DB lookups (gRPC, port 9090)
skye-consumersProcesses embedding ingestion (reset/delta jobs) and real-time aggregation events from Kafka (HTTP, port 8080)
skye-adminManages model lifecycle, onboarding, variant registration, and coordinates jobs (HTTP, port 8080)

For detailed architecture and data flow diagrams, see the Skye documentation.

External Dependencies

DependencyPurpose
etcdDynamic model/variant configuration
KafkaEmbedding ingestion events, model state machine
QdrantVector database (pluggable)
ScyllaDBEmbedding storage + aggregator data
RedisDistributed caching

📡 gRPC APIs (skye-serving)

Similar Candidate Service

RPCDescription
GetSimilarCandidates(SkyeRequest)Find similar candidates using embeddings or candidate IDs

Embedding Service

RPCDescription
GetEmbeddingsForCandidates(SkyeBulkEmbeddingRequest)Bulk embedding retrieval for candidate IDs
GetDotProductOfCandidatesForEmbedding(EmbeddingDotProductRequest)Compute dot products between an embedding and candidates

HTTP Endpoints

EndpointDescription
GET /healthHealth check

🔧 Admin HTTP APIs (skye-admin)

Model Management

EndpointDescription
POST /api/v1/model/register-modelRegister a new model
POST /api/v1/model/register-variantRegister a variant for a model
POST /api/v1/model/register-storeRegister a storage store
POST /api/v1/model/register-frequencyRegister job frequency
POST /api/v1/model/register-entityRegister an entity type

Qdrant Operations

EndpointDescription
POST /api/v1/qdrant/create-collectionCreate a Qdrant collection
POST /api/v1/qdrant/process-modelProcess a model (reset)
POST /api/v1/qdrant/process-multi-variantProcess multiple variants
POST /api/v1/qdrant/promote-variantPromote variant to scale-up cluster
POST /api/v1/qdrant/trigger-indexingTrigger indexing pipeline

🧰 SDKs

  • Go SDK — Client library for backend services

🚀 Quick Start

Prerequisites

  • Go 1.24 or later
  • Docker and Docker Compose (for local development)
  • librdkafka-dev (CGO dependency for Kafka client)
  • A running BharatML Stack environment (etcd, Kafka, Qdrant, ScyllaDB, Redis)

Using Docker Compose (Recommended)

The easiest way to run Skye with all its dependencies is via the BharatML Stack quick-start:

cd quick-start
./start.sh

This starts Skye alongside all required services. See the Quick Start Guide for details.

Standalone

cd skye
# Build all components
go build -o bin/skye-admin ./cmd/admin
go build -o bin/skye-consumers ./cmd/consumers
go build -o bin/skye-serving ./cmd/serving
# Run (example: serving)
./bin/skye-serving

⚙️ Configuration

Skye is configured via environment variables (loaded through Viper). Dynamic model/variant configuration is managed via etcd.

Application

VariableDescription
app_nameApplication name
app_envEnvironment (staging/production)
portHTTP/gRPC server port
auth_tokensAuthentication tokens

etcd

VariableDescription
etcd_serveretcd server address
etcd_usernameetcd username
etcd_passwordetcd password
etcd_watcher_enabledEnable config hot-reload

Kafka

VariableDescription
kafka_brokerKafka broker address
kafka_group_idKafka consumer group ID
kafka_topicKafka topic
embedding_consumer_kafka_idsComma-separated embedding consumer IDs
realtime_consumer_kafka_idsComma-separated real-time consumer IDs
realtime_producer_kafka_idReal-time producer ID

Redis

VariableDescription
redis_addrRedis server address
redis_passwordRedis password
redis_dbRedis database number

Storage

VariableDescription
storage_aggregator_db_countNumber of aggregator database connections
storage_embedding_store_countNumber of embedding store connections

🐳 Docker

cd skye
# Build images
docker build -f cmd/admin/Dockerfile -t skye-admin:latest .
docker build -f cmd/consumers/Dockerfile -t skye-consumers:latest .
docker build -f cmd/serving/Dockerfile -t skye-serving:latest .# Run (example: serving)
docker run -p 9090:9090 --env-file .env skye-serving:latest
# Run (example: admin)
docker run -p 8080:8080 --env-file .env skye-admin:latest

📚 Documentation

VersionLink
v1.0.0Skye Documentation

🤝 Contributing

Contributions are welcome! Please check our Contribution Guide for details on how to get started.

We encourage you to:

  • Join our Discord community to discuss features, ideas, and questions
  • Check existing issues before opening a new one
  • Follow our coding guidelines and pull request process
  • Participate in code reviews and discussions

Community & Support

License

BharatMLStack is open-source software licensed under the BharatMLStack Business Source License 1.1.


Built with ❤️ for the ML community from Meesho
If you find this useful, ⭐️ the repo — your support means the world to us!