I have started using uc_auction only since the past 2 days but I feel a big handicap in concurrency for my needs. Maybe this is already being explored in the dev roadmap. Please let me know if that is the case

In my auction, 100s of users(for now) will bid for a particular product and its not feasible to expect them to refresh the page to check what the current highest bid / number of bids placed / the antisnipe timer is... The best way would be to use AJAX to display these fields

I am willing to contribute upto $100 to a bounty for helping to develop this feature as well. I am sure there will be others with the same need as mine

Comments

ravdeepchawla’s picture

Sorry for the bump but is there any work planned on this?
Would love to know
Ravdeep

Garrett Albright’s picture

Status: Active » Closed (duplicate)

Oh, sorry. I must have missed your post the first time around.

I'm going to mark it as a duplicate, though: #375452: Auto Refresh High Bid. There's some inherent problems with the idea that I'm not sure how to work around accurately without taxing web servers. If some bright idea hits me, I'll work on it, but please don't hold your breath.

ravdeepchawla’s picture

Perfectly understandable Garrett! I've been struggling with this for a couple of weeks now and waiting for that flash of lightning to hit...

I implemented a workaround for myself by refreshing an entire view via AJAX after a fixed interval of say 5 seconds. The issue with that approach is that even the pictures related to products are downloaded again which is extremely bad design! Secondly, the same approach doesn't work on the node page (on which people actually make the bid) so its pretty useless.

I know of atleast one way the fellows at swoopo have done this and I am describing that below. It seems intuitive but maybe architecturally a very tuf problem to crack. I assume you are much better than me at this so here goes ;-)

I used firebug to observe what was happening and what I noticed was that a certain javascript function call is made every second which looks something like this...

<script language="javascript" defer="">

auction_index_js('172648,172651,172230,169360,170914,173182,172943,172190,173598,173332,172167,172251,172710,172602,170778,170733,171886,172116,173062,173115', '0', '7d90c5d2ac08b28738fa57503091910e');

</script>

The six digit numbers are all unique identifiers for currently running auctions (replacable by nids) in our case. The last huge one seems like a session identifier

What this function returns is this:

Taken from link (( http://www.swoopo.com/telebid-us/counter/1.html?aids=172648,172651,17223... ))

_ev_index('172648:ct=17|cs=1|cw=Maths|cp=281#172651:ct=36|cs=1|cw=Scorge|cp=2276#172230:ct=196|cs=1|cw=0815bottom|cp=10185#169360:ct=1354|cs=1|cw=Ugfun71|cp=105#170914:ct=1028|cs=1|cw=Center1|cp=708#173182:ct=873|cs=1|cw=Tolmetar|cp=328#172943:ct=128|cs=1|cw=Gwsbuster|cp=19770#172190:ct=15|cs=1|cw=Blue1gnu|cp=795#173598:ct=156|cs=1|cw=Gabrielsee|cp=369#173332:ct=189|cs=1|cw=Jchidro|cp=45#172167:ct=301|cs=1|cw=334062|cp=4580#172251:ct=337|cs=1|cw=Ugfun71|cp=885#172710:ct=351|cs=1|cw=Jetztdoch|cp=4106#172602:ct=523|cs=1|cw=Balcan|cp=6#170778:ct=579|cs=1|cw=Martinw114|cp=5276#170733:ct=623|cs=1|cw=Raini0703|cp=825#171886:ct=653|cs=1|cw=Kalinez|cp=5396#172116:ct=654|cs=1|cw=86krissi|cp=462#173062:ct=720|cs=1|cw=Scorge|cp=413#173115:ct=735|cs=1|cw=Andreashauck|cp=34875', '1', '324');

So essentially, 4 variable values, ct, cs, cw and cp are returned for every object. I would assume that some sort of caching would be happening at the back-end to ensure that the database query doesn't take an awfully long time.

Net-net, I'd love to implement this but my lack of drupal knowledge is terribly restricting. If you can give me a few pointers on how this can be done, I'll take a crack at it!

Garrett Albright’s picture

Changing thread title back from the spammer's change.