-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add support for batched point writing and fixed README error #10
Conversation
And I think you should definitely get that feature :) But there are some things we should probably sort out before merging this. (After proofreading what nice wall of text will appear I split it up a bit. The first block stands on itself, the other ones are somewhat connected but addressable and debatable on their own. The final one after the thick line is a way to solve this mess.) The line encoder was broken even before your fix when passing multiple points to it. Not having a real way to write multiple points just made it irrelevant. Your fix is a nice start, but still would fail when not passing a timestamp. To really fix that problem we should probably store the created lines in a list and afterwards create the raw data using For the changes to the query construction part it is purely some stylistic nitpicking. You probably removed the That definition should also be the only one with an Then you could simply use the guard clauses Having a list should make the rest more obvious and clean. The call to The test data for batch writing should use two different timestamps. Having both write at And for the last: Line 14 should prepend to the list for "performance reasons". AFAIK appending is If you are batch writing I assume you are not talking about five but more like fifty points. Each recursion would increase the cost of appending to the list. And if one reaches a three digit count of points it might actually have a negative effect. To still maintain the order of points a final As the line encoder was broken before I would go ahead and fix that on master with a test attached to it. For the other changes I could also take your commit and modify it a bit to reflect the wall of text above. I'd leave both choices up to you and prepare a hex release in the meantime so you could use a stable release instead of some uncachable git dependency 👍 |
Thanks for the very constructive and excellent feedback. Do you want me to fix up the changes and resubmit the PR? Or you going to do the work completely? BTW - I forgot to say, this library really helped in getting me up and running in evaluating Influxdb from Elixir to assess whether we could use it in our software, so thank-you. What are you using Influxdb for? We are taking data (high-speed pressure logging in water networks) and performing analysis upon it and wanted a simple first step at a timeseries db before perhaps jumping into say, Cassandra, which I've made heavy use of before. |
From a short glance it looks nice 👍 Will take a proper look later and then probably simply merge it. Any other changes (like adding a linebreak here and there) is nothing to hold it back. I am using it for some web analytics pet project. The way you can aggregate data structured by tags just seemed right and having it only depend on go makes it easily compilable/deployable. And once the cluster features are all in it should also be able to ingest enough data for most use cases. |
Great thanks for the feedback - I really appreciated it and fired me up to try to sort it out on the train in to work this AM! |
Add support for batched point writing and fixed README error
I wanted to use the library to test batch writing so I have attempted to add this capability.
I also spotted a minor error in the README.