Poller Server
The purpose of this application is to poll time-series data from our serialreader-server application which is connected to the sparkfunweathershield-arduino hardware device and save it to the tstorage-server application. The interval of time is every one minute.
Prerequisites
You must have the following installed before proceeding. If you are missing any one of these then you cannot begin.
Go 1.16.3
Installation
-
Please visit the sparkfunweathershield-arduino repository and setup the external device and connect it to your development machine.
-
Please visit the serialreader-server repository and setup that application on your device.
-
Please visit the tstorage-server repository and setup that application on your device.
-
Get our latest code.
go get -u github.com/bartmika/poller-server
-
Setup our environment variable before running our server.
export POLLER_SERVER_SERIAL_READER_SERVER_ADDRESS=127.0.0.1 export POLLER_SERVER_SERIAL_READER_SERVER_PORT=50052 export POLLER_SERVER_TSTORAGE_SERVER_ADDRESS=127.0.0.1 export POLLER_SERVER_TSTORAGE_SERVER_PORT=50051
Usage
Run our application.
go run main.go serve
If the server successfully starts you should see a message in your termnal:
2021/07/10 15:40:36 Synching with local time...
2021/07/10 15:41:00 Synchronized with local time.
2021/07/10 15:41:00 Poller is now running.
License
This application is licensed under the BSD 3-Clause License. See LICENSE for more information.