π¨π¨π¨This Heroku button uses the paid Kafka add-on π¨π¨π¨
This app simulates the tracking of a fleet of drones performing air-drop deliveries in a specified region.
- As the drones fly to their destinations they send location updates as GPS coordinates once per second.
- Drones travel about 5 meters per second.
- The "base" writes all the updates to a Kafka stream for processing.
To deploy this app outside of Heroku please refer to the initVariables()
function and provide the necessary env vars.
The main configuration to consider is the json string defined in the FRYAN_AIRPORTS
env var. Each one of these JSON objects (notice it's an array) represents a drone port where drones will take-off from. Drones will choose a number of delivery destinations at random between MinDel
and MaxDel
and the addresses for each delivery are completely random within the boundaries defined by the NE
and SW
coordinates.
Name
= Every drone flying from this droneport will be emit an event identifying itself as drone number N from airport X. So ifname="air1"
then drone2 is calledair1-2
.NE
= This is the top left boundary of the location in the world of where the drones are allowed to fly, expressed as Lat and Lon. For example-33.8561, 151.2153
roughly the Sydney Opera House.SW
= Conversely this is the bottom right boundary. For example33.8949, 151.2743
roughly Bondi Icebergs. Drones will fly within this quadrant or square.Drones
= How many drones to fly and therefore track. The larger the number the more messages to Kafka, the more to process, the more load, etc.MinDel
= Minimum amount of deliveries each drone will perform, this adds some randomness to the simulation.MaxDel
= Maximum amount of deliveries each drone will perform, this adds some randomness to the simulation.
[{
"name":"air1",
"NE":{"lat":-33.8073, "lon":151.1606},
"SW":{"lat":-33.8972, "lon":151.2738},
"drones": 10,
"minDel": 5,
"maxDel":20
}]
{"CurrentPosition":{"Lat":3,"Lon":3},"Destinations":[{"Lat":9,"Lon":5}],"NextDestination":0,"Speed":5,"Name":"drone-1"}
- Replace trigo implementation with linearInterpolation. π
- Re-architecture so each dyno takes care of a different group of airports. π
- Come up with a visualisation of what is going on. π³
- Check this repo for an update: https://github.com/feliperyan/react-redux-websocket-live-map