-
Notifications
You must be signed in to change notification settings - Fork 0
Satellite API
HViet edited this page Jun 23, 2021
·
1 revision
- Fred Node (172.26.x.1)
- Storage Node (172.26.x.2)
- HTTP Server (172.26.x.3)
Whereas x = 7 + n (n = number of the satellite)
Example for Satellite0:
- Fred Node at 172.26.7.1
- Storage Node at 172.26.7.2
- HTTP Server at 172.26.7.3
The HTTP Server of each satellite provides following end-points:
Method | Route | Body | Description |
---|---|---|---|
GET | IP:5000/getValue/<keygroup>/<key> | - | Retrieves data from a specific keygroup with a given key |
GET | IP:5000/getValue/<key> | - | Goes through all keygroups of the fred node and tries to retrieve data with a given key |
POST | IP:5000/setData/<keygroup>/<key> | value | Stores a key-value pair to the given keygroup |
POST | IP:5000/appendData/<keygroup>/<key> | value | Initializes an array with the given value if the key isn't stored yet, otherwise appends the value into the existing key-value pair of a specific keygroup |
GET | IP:5000/getLocation | - | Returns the satellite's position in "latitude longitude" format |
GET | IP:5000/currentKeygroups | - | Returns the keygroups the satellite belongs to in "keygroup1 keygroup2 keygroup3 .." format |
GET | IP:5000/* | - | Returns a lorem text depending on the route |
- The HTTP Server queries it's position by sending a GET request to the coordinator every x seconds (configurable in config.toml under position_interval)
- Joins and/or leaves keygroup(s) depending on the position