go-microserv

command module
v0.0.0-...-879c038 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

README

Very Simple Microservices architecture in Go

Go Report Card

Simple microservices project in GO for M7024E @ LTU

Basic architecture

The microservices are:

  • API Gateway
  • Collector
  • Datastore

For simplicity the API Gateway also serves the static main-page with the Javascript embedded to call the API GW endpoints.

The API GW

It uses port 7000 and handles the below endpoints

* /index.html                [GET]
* /api/sensors               [GET]
* /api/sensors/{sensor-id}   [GET]

An optional ?number=X URL parameter can be passsed to limit the number of datapoints returned.

The DataStore

It uses port 7001 and handles the below endpoints

* /api/sensors               [GET/POST]
* /api/sensors/{sensor-id}   [GET]

The data for now is stored in a simple SQLite3 lcoal database.

The Collector

It does not need a port because it is simply implementing a functionality as described on the architecture. It has two hard-coded timers defined. One defines how often to refresh the SSiO auth token and another defines how often to poll and store new Data from SSiO.

Plans for improvement:
  • migrate away from SQLite3 to PostgreSQL
  • fully implement it via docker containers
  • deploy in a docker swarm

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL