Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storing sensor data locally #10

Open
KyleBenson opened this issue May 22, 2014 · 2 comments
Open

Storing sensor data locally #10

KyleBenson opened this issue May 22, 2014 · 2 comments
Assignees
Milestone

Comments

@KyleBenson
Copy link
Owner

The event reporter should store data locally (SD card?) in addition to reporting it via the Internet. This should essentially be a queue, where old data is archived and then eventually removed to make room when a certain database size is reached (configurable parameter). This should especially work when in an offline mode, and so should keep track of whether data has been reported or not for when regaining network connectivity.

@KyleBenson
Copy link
Owner Author

Andy and I were just talking and think we should also do this for the local neighbors in the mesh network in some way. Maybe only one hop away?

@bfrggit
Copy link
Collaborator

bfrggit commented May 8, 2015

Now I have a local MySQL based version in my cycle fork. We can try to merge these changes back to our repo later. Maybe some time after the June demo?

This is briefly how it works:
Event reporter only send a event to the MySQL event sink when the event is not published to any "normal" event sink (send method returns False).
There's another MySQL database maintainer class in my fork that periodically read from database for unpublished events, and publish them. If an event is from database, it will have a database tag as an attribute, which contains its table id. That table id will be used later to update the database to mark this event as published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants