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

Adds support for MySQL publisher. #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RatkoR
Copy link

@RatkoR RatkoR commented Sep 16, 2024

If you think that MySQL publisher would be a good thing to have..

I know we can use MQTT to get values and than insert those values into MySQL. Still, this would require users to create this "small" script and it's so much easier to just have this as an option in mbmd.

I can fix / correct this commit if anyone finds it is missing something or if anything is done in a wrong way.

I've been running mbmd with mysql for couple of days and it seems stable.

MySQL publisher stores measurements into `readings` table.
Each value received is stored as a new record. Value description and
unit name is also stored with each record. This means that table is
denormalised but it's also faster and easier to use.

Publisher waits for all readings and inserts all values with one
multiple INSERTs statement. This is way faster than saving each
value separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant