Skip to content

Repository files navigation

Overview

According to task description, there should be 3 services. But the project consists of two different components. (See branch v2 for separate service implementation)

  1. Service (2 instances): A server that listens on a port and handles RPC calls.
  2. Collector (1 instance): A service that makes concurrent calls to the RPC services and gathers data from them.

How to run

Requirements

Clone the repo:

git clone https://github.com/behnambm/data-collector.git
cd data-collector

Makefile

You'll need 3 separate terminal windows or tabs to run the services.

Run service 1:

make svc1

Run service 2:

make svc2

Run service 3:

make svc3

After running Service 3, a database.sqlite file will be created to store the results.

Docker

You'll need 2 separate terminal windows or tabs to run the services.

make up
make svc3

Notes

  1. Both approaches use the default configurations found in the configs directory. You can modify these configurations as needed.
  2. There are two docker files, the reason for that is the network instability in Iran. One builds the binary during build time, the other one just copies the binary from host.
  3. The docker files and compose are only written for service 1 & 2.

Run tests

make test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages