The test consist in building a small distributed online-counter.
It is split in 3 components:
- A "client"
- A "gateway"
- A "status" service
You need to build and package all three components.
To keep things simple, all the schemas are in a single protobuf file, but you're free to split it if you want.
You need to write a gRPC client that:
- has a unique identifier
- connects to the gateway
- the gateway is going to send a
Ping
every 1s to the client. - the client must respond with a
Pong
, containing aStatus
(cfprotos/service.proto
)
You're free to write the
client
either in Go or Rust
You need to write a gRPC server that:
- allows multiple simultaneous clients to connect with persistent connections
- ping each connected client at a specific clockrate (a client must receive a
Ping
every 1s) - the gateway must notify the
status
service- You're free to choose how the
gateway
talks to thestatus
service (gRPC, event, ...)
- You're free to choose how the
- must be horizontally scalable
- Write a Dockerfile, as much production-ready as you can
- If any, point out scalability issues of your system / how you would fix them
You're free to write the
gateway
either in Go or Rust
You need to write a microservice that:
- can react to messages sent by the
gateway
- You're free to choose how the
gateway
talks to thestatus
service (gRPC, event, ...)
- You're free to choose how the
- must expose a
StatusReader
gRPC service - the service keeps track of how many unique users were online in the last 3mins
- a user is considered online if they reported a
STATUS_EVEN
orSTATUS_ODD
status.
- a user is considered online if they reported a
- must be resilient to reboots
- you're free to use any kind of database you want
- must be horizontally scalable
- Write a Dockerfile, as much production-ready as you can
- If any, point out scalability issues of your system / how you would fix them
You must write this service in Go
Finally, write a docker-compose
to run all the services and allow for easy testing.
- Write tests
- Add tracing instrumentation
- Build everything with Bazel:
- Executables
- Mutliplatform docker images
Interested in working with us? We're always looking for talents!
Shoot us an email at