Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I've just started to write a core statistics replacements, already working for node_counters, with an optional synchro based on cron for sql tables (for views). Still have a few things to do inside, I'll post it somewhere when finished.
So if anyone can test I'll be happy to get some feedbacks. I made a core statistics replacement using mongodb.
Lots of betters things to do than a simple replacement, see the TODO.txt for examples.
For boost I don't know. It may be ok, as the node_counter stat is incremented on hook_exit() which is there for example with the full page cache.
For varnish it won't work as is. I'm having a look at the 'ajax statistics' module. Look at the TODO.txt, we'll need an ajax counter, something really fast, and we'll need to push ajax queries on each page for tracking (and an img fallback maybe). Then we'll have to stop counting on hook_exit (this is why I created new 'generated' counters, to track difference between drupal generation and real user view).
Interesting module, but I think this is usefull to generate a lot of request fast, this won't help the server to handle the requests fast. The bigest problem with ajax tracking requests is that if you use a varnish proxy cache it's to avoid 99% of incoming requests on a slow php dynamic website. With ajax requests you'll get in return these 99% of requests directly on the php-dynamic (drupal) website, to track what's the user have really seen. So this traffic should'nt load a full drupal stack, else you'll ruin the varnish things and have a nice Deny of Service. I was much thinking of something like http://drupal.org/project/js (not available for D7).
Nice project, the JS module...
A pity it's not available for D7.
You could use node.js, but unfortunately it wouldn't be so practical for most users.
But that's debatable, as most people using mongodb probably have control of their servers, and are very tech savvy.
Comments
Comment #1
Fidelix commentedSubscribing... this would be awesome!
Comment #2
Donaldd commentedsubscribing
Comment #3
regilero commentedsubscribing, would be happy to test that.
Comment #4
regilero commentedI've just started to write a core statistics replacements, already working for node_counters, with an optional synchro based on cron for sql tables (for views). Still have a few things to do inside, I'll post it somewhere when finished.
Comment #5
regilero commentedOK.
So if anyone can test I'll be happy to get some feedbacks. I made a core statistics replacement using mongodb.
Lots of betters things to do than a simple replacement, see the TODO.txt for examples.
Code is available on github :
https://github.com/regilero/drupal_mongodb_statistics
Comment #6
Fidelix commentedregilero, awesome work! Thanks for sharing...
I assume this module wouldn't work for a site using boost or varnish?
Any instructions on how to increase counters in sites using these?
Thank you!
Comment #7
regilero commentedFor boost I don't know. It may be ok, as the node_counter stat is incremented on hook_exit() which is there for example with the full page cache.
For varnish it won't work as is. I'm having a look at the 'ajax statistics' module. Look at the TODO.txt, we'll need an ajax counter, something really fast, and we'll need to push ajax queries on each page for tracking (and an img fallback maybe). Then we'll have to stop counting on hook_exit (this is why I created new 'generated' counters, to track difference between drupal generation and real user view).
Comment #8
Fidelix commentedMaybe this could help?
http://drupal.org/project/httprl
Comment #9
regilero commentedInteresting module, but I think this is usefull to generate a lot of request fast, this won't help the server to handle the requests fast. The bigest problem with ajax tracking requests is that if you use a varnish proxy cache it's to avoid 99% of incoming requests on a slow php dynamic website. With ajax requests you'll get in return these 99% of requests directly on the php-dynamic (drupal) website, to track what's the user have really seen. So this traffic should'nt load a full drupal stack, else you'll ruin the varnish things and have a nice Deny of Service. I was much thinking of something like http://drupal.org/project/js (not available for D7).
Comment #10
Fidelix commentedNice project, the JS module...
A pity it's not available for D7.
You could use node.js, but unfortunately it wouldn't be so practical for most users.
But that's debatable, as most people using mongodb probably have control of their servers, and are very tech savvy.
Comment #11
Donaldd commentedThis is very cool.
Great work regilero and thanks for sharing!
Comment #12
mgifford@regilero any thought of moving it here:
http://drupal.org/project/drupal_mongodb_statistics
Easier to track security issues and what not.
Comment #13
marcingy commentedModule exists
Comment #14
mgiffordNot on Drupal.org I don't think. Although maybe through:
https://drupal.org/project/mongodb_statistics
Either way, I'm not sure they are viable projects yet.
Comment #15
marcingy commentedSomeone has created a module, this project is not going to support it so lets just mark this as won't fix for this project!