A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rikulauttia/gRPC-Redis-Postgres-Engine below:

rikulauttia/gRPC-Redis-Postgres-Engine: High-Performance Rust Backend using Rust, gRPC, Redis, and PostgreSQL. This project focuses on creating a scalable backend system capable of handling millions of requests per second, ideal for applications like messaging services or social network feeds.

A high-performance backend service built with Rust, gRPC, Redis, and PostgreSQL.

  1. Install dependencies:
# For macOS
brew install postgresql redis protobuf
  1. Clone the repository:
git clone https://github.com/rikulauttia/gRPC-Redis-Postgres-Engine.git
cd gRPC-Redis-Postgres-Engine
  1. Set up environment variables:
# Create .env file
cp .env.example .env
# Edit .env with your configuration
  1. Run the database migrations:
cargo install sqlx-cli
sqlx migrate run
  1. Build and run the service:
  1. Build and start the containers:
docker compose up --build
  1. Stop the containers:

Sends a message to a specific user. Request (MessageRequest):

-user_id: string - Unique identifier of the user

-message: string - Content of the message

Response (MessageResponse):

-status: string - Status of the operation

Example using grpcurl:

grpcurl -d '{"user_id": "123", "message": "Hello"}' \
  -plaintext localhost:50051 \
  messaging.MessagingService/SendMessage

Run performance tests using ghz:

ghz --insecure \
  --proto ./proto/service.proto \
  --call messaging.MessagingService.SendMessage \
  -d '{"user_id": "123", "message": "test"}' \
  -n 1000 \
  -c 50 \
  '[::1]:50051'

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4