Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
MySQL can not compete with the likes of Cassandra or MongoDB for speed of writes and there might be a lot of votes... David's idea is to make the vote storage pluggable. I agree. Accidentally, the API documentation happens to contain a sneak preview of the upcoming mongodb_votingapi project ;)
Comment | File | Size | Author |
---|---|---|---|
#9 | 803812_9.patch | 7.36 KB | grendzy |
#2 | pluggable_storage.patch | 14.61 KB | chx |
votingapi_pluggable.patch | 6.09 KB | chx | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commented+1 for the concept. Code looks clean too. Ideally we have one alternate implementation at time of commit but thats not strictly needed.
Comment #2
chx CreditAttribution: chx commentedNote: tests pass w mongodb and mysql both. Just sayin'
Comment #3
chx CreditAttribution: chx commentedPs. do I get the kitten killer award of the month?
Comment #4
David Strauss+1 on this to make my Cassandra-based backend easier to integrate.
Comment #5
chx CreditAttribution: chx commentedThe test fixes should be committed separately.
http://www.math.bas.bg/bantchev/place/rpn/rpn.php.html and http://www.math.bas.bg/bantchev/place/rpn/rpn.javascript.html are implementations of a very simple RPN notation in JS and PHP. This means that we could say, supply your ranking algorithm in RPN, the default implementation will iterate over votes and run your algo in PHP and most NoSQL can take the same RPN and run it in their DB w JS. How about that?
Comment #6
chx CreditAttribution: chx commentedFor example, IMDB:
Reduce is executed for every vote, finalize at the end.
Comment #7
eaton CreditAttribution: eaton commentedThis patch has languished for a while, but with the conversations about Vote module and some of the Butler discussions, I'm cracking my knuckles and revisiting it. Just committed it to the local repo along with the test fixes (because the tests work, yo), and will be pushing it to d.o for a release soon. This pluggable storage will go into the 2.x branch and will probably be the last major feature before cracking open the 3.x branch, which may end up using the Butler project for its storage, vote types, and recalculation mechanisms.
Comment #8
eaton CreditAttribution: eaton commentedAlso, rolling a release.
Comment #9
grendzy CreditAttribution: grendzy commentedThis follow-up patch removes
tests/votingapi.test.orig
.Comment #10
chx CreditAttribution: chx commentedIf there's interest I would still be glad to code that RPN thingie.
Comment #11
chx CreditAttribution: chx commentedComment #13
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedwill this be ported to Drupal 7?
The patch in 2 doesn't seem to apply: https://www.drupal.org/node/803812#comment-2995352
Comment #14
pifagorComment #17
pifagorcurrent module version contains the given code