5 ms·
Looks great! I'm mostly intrigued by the ad-hoc Group By query functionality. Traditionally that's an indicator of some sort of relational database on the backe
by vyrotek 14y ago
Looks great! I'm mostly intrigued by the ad-hoc Group By query functionality. Traditionally that's an indicator of some sort of relational database on the backend, but is that the case here?
On the other hand, the dynamic nature of the data makes me inclined to think that they're using MongoDB or something similar. In the past I've had to create similar systems but we denormalized the data coming in based on pre-defined Group By settings.
I'd love to learn more about the stack and database used for HeapAnalytics and any other similar services.
- matm 14y agoWe initially tried to build this on Mongo, and it was a huge pain. I'll need to elaborate on why at some point, but the very ad-hoc nature of all our querying precludes any non-relational database from being our store (at least any that I'm aware of).
- vyrotek 14y agoIt sounds like you and I had very similar experience. :) Please do share and elaborate some time. For my past implementation of a similar data-store we had some different requirements that let us cut a few corners. But, if I were to take another stab at it with your requirements then I would try a new approach. I think I would use a single table to represent the 'event' itself and have that table be essentially owned by the customer. This table could be put on a specific shard set aside for each customer or you could just name it "{customerId}_{eventName}" and have a lot of tables. Then each event coming in would potentially perform an 'alter' on the table in order to make sure all custom properties have a column. Are there any downsides to this approach I'm not considering?