https://github.com/maia14/bp-backend
A Non Blocking Producer/Consumer stream processing service. Backend is developed in Node.js, express and child process.
https://github.com/maia14/bp-backend
backend hashmap javascript nodejs rest-api stream
Last synced: about 2 months ago
JSON representation
A Non Blocking Producer/Consumer stream processing service. Backend is developed in Node.js, express and child process.
- Host: GitHub
- URL: https://github.com/maia14/bp-backend
- Owner: MaiA14
- Created: 2020-12-05T12:38:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-07T09:26:54.000Z (over 5 years ago)
- Last Synced: 2025-06-04T22:26:53.612Z (about 1 year ago)
- Topics: backend, hashmap, javascript, nodejs, rest-api, stream
- Language: JavaScript
- Homepage:
- Size: 841 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bp-backend
Your exercise is to implement a Non Blocking Producer/Consumer stream processing service.
You are provided with a blackbox executable that spits out an infinite stream of lines of event data encoded in JSON. You can download it here:
* Linux - https://s3-us-west-1.amazonaws.com/bp-interview-artifacts/generator-linux-amd64
* Mac OS X - https://s3-us-west-1.amazonaws.com/bp-interview-artifacts/generator-macosx-amd64
* Windows - https://s3-us-west-1.amazonaws.com/bp-interview-artifacts/generator-windows-amd64.exe
**Service Requirements:**\
It should consume the output of the generator and gather the following stats:\
A count of events by event type.\
A count of words encountered in the data field of the events. (e.g. “the” → 32, “me” → 5)\
Bonus: support the ability to receive the stats above in the last 60 seconds.\
It should expose these stats in an HTTP interface.\
Stream may encounter corrupt JSON lines and should handle these.
**Important Notes:**\
We are looking for simple readable code which is not over-engineered.\
The architecture of your service should obviously decouple the data processing, HTTP handling, be testable, etc.\
You can implement this exercise in any high level language you choose (Java, Scala, C#, python, Node.JS etc.). Please let us know in advance which language you choose.
## Installation
Before running this project install node modules with this command:
```
npm install or npm i
```
## Run project:
```
node server or nodemon server
```
## Run tests:
```
npm test
```