-
Notifications
You must be signed in to change notification settings - Fork 654
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
Implement new public map page #3120
Comments
@lbosque, would it be possible to get the total of mapviews in a visualization? |
It is, but current visualization models make this task a PITA. Now the code that gets the map views stats is buried in more or less 4 or 5 steps away from the visualization collection stuff and it's hardcoded to get last 30 days. It's possible to do it, but maybe the refactor that @rafatower and @Kartones are doing to the visualization model makes this easier. Am I right? |
If it requires changes to the backend, then the answer is "after the backend refactor" I guess, but let's summon the final boss: @javisantana |
this is a bigger problem actually, we are saving stats for all the days since the visualization was created and I don't know how killer would be to fetch 2 years of stats for some visualizations. https://github.com/CartoDB/cartodb/blob/master/app/models/visualization/stats.rb#L15 Could we use the last 30 days map views for the moment? (you can sum them in frontend) |
That is a problem also with the /explore API then. No way to see the most popular maps ever :( |
We should have a "stats" table or DB, updated maybe daily or each 6h with the "total stats". Directly loading all real data and summing is absolutely overkill indeed. Even if we had a Hadoop or similar system good at aggregating lots of data I'd keep counters, no need for them to be realtime (especially for the Explore API...). |
Four suggestions (for the future):
On Tue, Apr 14, 2015 at 4:30 PM, javi santana notifications@github.com
Luis Bosque www.cartodb.com |
Point one I see too many redis hits for something so unimportant. And point 2 similar... coolest way of handling counters but overkill for a simple stat that wouldn't "bring money in" itself, no? Why point 3 doesn't scales? Strictly speaking is the only one that scales ad-infinitum: We can always add more machines to update values, change the logic of when or how frequently they update... it is the simplest and "crappiest" method but it will work if we don't need realtime stats. Point 4 is cool but only applies for user dashboard, not explore API. Plus first uncached hit would always hurt and delay page load. I'd go for either 3 or 4, storing maybe at Redis instead of PG as data can be volatile: If is not there, next "sweep" of stats update can just recreate it. Mixed-option 5 (that we did at my last job): We stored at ElasticSearch the stats, etc.: For each game, a very simple list: id is the item id (vis id in thys case), value is the stat (total visits) |
@piensaenpixel and @saleiva, we can't customize deeply disqus. We should review the design having this issue into account :( |
@piensaenpixel or/and @saleiva, it would be great if we show the option to edit the map/visualization if current user is the owner. |
It was designed but pending to be reviewed by @piensaenpixel |
cc @piensaenpixel @saleiva
The text was updated successfully, but these errors were encountered: