I'm storing GPS position data in Firebase, with the intention of logging a user's path over an extended period of time (think "running app").
Everything is working, but I'm questioning how to store the large amount of data.
The GPS device outputs data every 5 seconds or so. A user might be tracking their position for 3+ hours, implying 2,000+ data entries, per run. Many users, many runs, I want to make sure I get the data structure right...
I'm currently pushing each unique position (an object with lat/long/speed/etc) to the database, so each data point receives a unique key. I then pull these from the database, and convert them to an array client-side (for visualisation purposes). This feels inefficient, and I'm wondering whether it's worth appending these new entries to a single array, for each run being logged in Firebase.
However, this Firebase Blog entry suggests that the unique key method per entry is actually appropriate, as it's in line with how the database stores array data anyway.
Any recommendations from those experienced in Firebase? Am I signing myself up for trouble by having so many unique keys in the database, or should I stick with the technique?
Thanks!