The C language is used as the producer and the Python language is used as the consumer, and the data is transmitted in one direction through the Redis message queue. For transfer performance, use ProtoBuf for serialization and deserialization of data.
protoc --python_out=. incident.proto
protoc --c_out=. incident.proto
gcc -I/usr/local/include/hiredis producer4redis.c -lhiredis -o producer4redis
gcc producer4redis.c incident.pb-c.c -o producer4redis -lprotobuf-c -lhiredis -I/usr/local/include/hiredis
- [1] GitHub hiredis
- [2] Hiredis 基本使用
- [3] protobuf-c wiki
- [4] Redis 的 C 语言客户端
- [5] C 语言操作 Redis
- [6] protobuf-c的学习总结
- [7] 范桂飓 CSDN 博客