DAVFoundation / missioncontrol

πŸ›° Controls and orchestrates missions between vehicles and DAV users
MIT License
181 stars 156 forks source link

Do not store simulated drones in memory indefinitely #88

Closed TalAter closed 6 years ago

TalAter commented 7 years ago

Knowabunga! 🐒🐒🐒🐒

This issue is tagged Knowabunga. It is only open for participants of the Knowabunga/DAV hackathon!

Thank you for your help :heart:

What is this project?

DAV (Decentralized Autonomous Vehicles) is a new foundation working to build an open-source infrastructure for autonomous vehicles (cars, drones, trucks, robots, and all the service providers around them) to communicate and transact with each other over blockchain.

The specific project you are looking at is Mission Control. It is the brain in charge of orchestrating missions between DAV users and autonomous vehicles.

How you can help

Mission Control comes with a built in simulation environment which generates and controls simulated vehicles, allowing developers to start developing without investing in costly hardware first.

If a use is looking at any point on the map inside the missions app, and there are no vehicles around, the server will generate a few simulated vehicles on demand around that point.

Once we have many developers from around the world experimenting with the simulation environment, more and more vehicles will be kept in memory and never deleted.

What you can do

We need to add a TTL (Time To Live) expiration to the vehicles stored in Redis so that they are deleted automatically after 24 hours. And we need to reset that TTL, setting it to 24 hours again when those vehicles are accessed.

These vehicles are created in /server/store/vehicles.js, and the EXPIRE needs to be set when calling addNewVehicle() and getVehicle()

Contributing to Mission Control

griffobeid commented 6 years ago

I think I figured this one out, @TalAter