arithmatic calculator that implements producer consumer pattern
this project is done as an interview task for CodeScalers Egypt
this is a simple producer consumer implementation that uses Go Language and Redis
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
1- Go
2- Redis Server
3- Go-Redis (a redis client for go)
you need to build both Producer and Agent but first make sure that you have Go-Redis in your GOPATH Run the following commands:
go build -o agent/agent agent/*.go
go build -o producer/producer producer/*.go
then run these binary files in different terminal windows
to run the agent
agent/agent [-queue {queue name}:{number of workers}] [-addr {redis server address}] [-pass {redi server password}]
to run the producer
producer/producer [-queue {queue name}] [-addr {redis server address}] [-pass {redi server password}]
now in producer screen you can enter an arithmatic operation and it will be sent to the calulator then to the result queue example : 1+2+3*4/5
this task still considered incomplete
- write unit tests
- allow multi-queues