Rigo started as "Redis In GO," but it has evolved into a robust and standalone queueing system designed for modern applications. This system can be used in two ways:
- As a standalone server accessed via TCP clients.
- Embedded within applications, giving developers complete control over queue management.
- Standalone Queue Server: Can be hosted as a separate service and managed via a TCP client.
- Embedded Queue: Can be installed locally into an application and fully managed by developers.
- Message Limit per Channel: Supports buffering with message limits for each channel.
- Connection Tracking: Tracks and records the number of active connections to the queue server.
To test the current queue system, you can run the example provided.
-
Clone the repository:
git clone https://github.com/midedickson/rigo.git cd rigo-server
-
Run the example:
go run cmd/main.go
This will run the basic example of the Rigo queue system in action.
To use Rigo as a standalone server, you can launch it and connect via a TCP client (like the Rigo Client CLI).
-
Start the server:
go run cmd/main.go
-
Connect to the server using a TCP client. For example, you can use the Rigo Client CLI to send and receive messages from the queue.
Rigo can also be integrated directly into your Go application as a local queue system:
-
Import the Rigo queue package in your Go application:
import "github.com/midedickson/rigo"
-
Use the queue in your application:
channel := rigo.NewChannel() channel.Produce("channel1", "message") message := queue.Consume("channel1") fmt.Println("Dequeued message:", message)
This allows you to fully manage the queue locally without needing an external server.
- Message Limit per Channel: You can set a buffer size to limit the number of messages in each queue channel.
- Connection Count Recording: The system records and tracks the number of active TCP connections to the server, providing insights into load and usage.
-
Start the server:
go run server/main.go
-
Use the Rigo Client CLI to create a channel and enqueue a message:
./rigo-client 127.0.0.1 8080 127.0.0.1:8080> CHANNEL job123 Response: OK 127.0.0.1:8080> PRODUCE job123 message Response: OK
-
Dequeue the message:
127.0.0.1:8080> CONSUME job123 Response: message
- Standalone Server: Continue developing the server as a standalone, distributed system.
- Embedded Queue: Extend the embedded queue capabilities to provide additional control and flexibility for developers.
- Enhanced Buffering: Add more control over buffering, including the ability to dynamically resize message limits per channel.
- Advanced Metrics: Track and monitor server metrics, including connection counts and message throughput.
- Rigo Client CLI: Interact with the Rigo server via a command-line interface. Rigo Client CLI