This directory contains client examples demonstrating how to connect to and use Ignix with various programming languages.
Basic Rust client using raw TCP sockets and RESP protocol.
cargo run --example clientPython client using the redis-py library.
# Install dependencies
pip install -r examples/requirements.txt
# Run example
python3 examples/python_client.pyNode.js client using the redis npm package.
# Install dependencies
cd examples && npm install
# Run example
node nodejs_client.js-
Start Ignix Server
cargo run --release
The server will start on
localhost:7379. If you start it with--requirepass PASSWORD, run the Python and Node.js examples withIGNIX_PASSWORD=PASSWORDso they authenticate. -
Install Client Dependencies (for Python/Node.js examples, see above)
All examples demonstrate these Redis-compatible operations:
PING- Test server connectivitySET key value- Set a key-value pairGET key- Retrieve a value by keyEXISTS key [key ...]- Count how many keys existINCR key- Increment a numeric value (redis-py sendsINCRBY key 1)DEL key [key ...]- Delete keysRENAME oldkey newkey- Rename a keyMSET key1 value1 key2 value2- Set multiple keysMGET key1 key2 key3- Get multiple values
The Python and Node.js examples also show expiries (SET key value EX 60, TTL, PERSIST,
SET key value PX 100) and list their keys with SCAN MATCH *:* and DBSIZE.
When running successfully, you should see output similar to:
🔥 Ignix Python Client Example
========================================
Connecting to Ignix server at localhost:7379...
Testing connection...
PING response: True
📝 Basic Operations:
--------------------
Setting key 'hello' to 'world'...
✅ SET hello world
✅ GET hello: world
✅ EXISTS hello: 1
🔢 Counter Operations:
-------------------------
✅ INCR counter: 1
✅ INCR counter: 2
✅ INCR counter: 3
✅ INCR counter: 4
✅ INCR counter: 5
✅ All operations completed successfully!
❌ Connection Error: Could not connect to Ignix server
Solution: Make sure the Ignix server is running:
cargo run --release❌ Redis Error: unknown command 'HSET', with args beginning with: 'user' 'name' 'ada'
Solution: The command is not implemented in Ignix yet. Check the supported commands list.
If you get import errors:
pip install "redis>=5.0.0"If you get module not found errors:
cd examples
npm install redisIgnix implements the Redis Serialization Protocol (RESP), so any Redis client library should work. Here's a minimal example:
import redis
client = redis.Redis(host='localhost', port=7379, decode_responses=True)
client.set('key', 'value')
print(client.get('key'))const redis = require('redis');
const client = redis.createClient({ socket: { host: 'localhost', port: 7379 } });
await client.connect();
await client.set('key', 'value');
console.log(await client.get('key'));Any Redis tool can talk to Ignix, for example redis-cli:
redis-cli -p 7379 SET key value
redis-cli -p 7379 GET keyMicro-benchmarks and the Redis comparison live in benches/ and benchmarks/:
cargo bench --bench exec --bench resp
bash benchmarks/run_benchmarks.sh