25762cbae855af03d1cff4abe20107e83062ff8a
Devsim
A simple benchmarking service that checks upsert and list performance on different databases.
For now it supports only MongoDB and PostgreSQL
Plans to add the following databases:
sqlite(native go driver)duckdb(just in case, it might be bad because it's better for OLAP)cassandramysqlcouchbase
Requirements
TODO, but!
All dependencies will be covered by docker.
Architecture
This application contains just of two layers:
- External Layer that accepts http connections
- Store Layer that stores entities inside some store hidden by implementation for specific database.
During to simple logic, there is no need to add additional business-logic layer since its all about saving incoming metrics into database.
External Layer
Typically simple HTTP Server which allows to interact with application by the following handlers:
| Handler | Request | Parameters | Description |
|---|---|---|---|
| Upsert metric | POST /api/v1/stats/{id} |
{id} -- ID of the device. String. JSON-encoded body for stats (see below for model) | Upserts stats for the passed device |
| List metrics | GET /api/v1/stats |
Lists all available metrics |
Store Layer
Provides two methods to interacts with statistics:
List- list available metrics;Upsert- update metric by device id.
Description
Languages
Go
92.7%
Dockerfile
4.5%
Makefile
2.8%