Skip to content

ADVERIE/gyandoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gyandoot Service

The Gyandoot Service is a gRPC service that processes images from Chitragupt, gets predictions from Valmiki, and serves UI recommendations.

Setup

Running Redis with Docker Compose

To start the Redis service:

# Navigate to the gyandoot-svc directory
cd gyandoot-svc

# Start Redis using Docker Compose
docker-compose up -d redis

This will start a Redis instance available at localhost:6379.

Testing and Verification

The following utilities are available to test and verify the service:

1. Initialize Redis with Test Data

Before running tests, populate Redis with test recommendation data:

# Build the Redis initialization utility
go build -o init_redis cmd/init_redis/main.go

# Run the utility (default Redis address is localhost:6379)
./init_redis

# Or specify a custom Redis address
./init_redis --redis_addr=redis:6379

2. Testing Image Processing

To test image processing from Chitragupt to Gyandoot to Valmiki:

# Create a directory for test images
mkdir -p test_images

# Copy some test images to the directory
# (JPG/JPEG files are supported)

# Build the test utility
go build -o test_util cmd/test_util/main.go

# Run the test (default server address is localhost:50051)
./test_util

# Or with custom parameters
./test_util --server_addr=localhost:50051 --image_dir=./test_images --device_id=test-device-001 --frame_interval=500ms

3. Verifying Image Reception

When the Gyandoot service runs with image verification enabled, it:

  1. Logs details about each received image
  2. Saves the first 10 images to the ./debug_images directory for inspection
  3. Logs image headers and data transfer to Valmiki

To check if images are being received correctly:

  1. Run the Gyandoot service
  2. Send test images using the test utility
  3. Check the logs for image reception details
  4. Inspect saved images in the ./debug_images directory

Troubleshooting

Redis Connection Issues

If you're having trouble connecting to Redis:

# Check if Redis container is running
docker ps | grep redis

# Check Redis logs
docker logs gyandoot-redis

# Connect to Redis CLI for manual testing
docker exec -it gyandoot-redis redis-cli

Image Processing Issues

If images aren't being processed correctly:

  1. Check the logs for any errors during image reception
  2. Verify that the debug images in ./debug_images contain valid image data
  3. Ensure Redis contains the necessary recommendation data
  4. Check the Valmiki service is running and accessible

Configuring the Service

The Gyandoot service accepts the following command-line flags:

  • --port: Port for Gyandoot gRPC service (default: :50051)
  • --valmiki_addr: Address for Valmiki gRPC service (default: localhost:50052)
  • --ui_addr: Address for UI gRPC service (default: localhost:50053)
  • --redis_addr: Address for Redis server (default: localhost:6379)
  • --process_timeout: Timeout for processing a single frame (default: 500ms)

About

A true powerhouse, with more threads than your hair. Built on gRPC for unmatched speed. The fastest implementation for image transmission—dropping frames when necessary for efficiency

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors