Data Stream - Periodic Refresh

ravdeepchawla - April 28, 2009 - 01:27

Hello Folks,

So my short question is... Does any module in Drupal give an API for Periodic Refresh (http://ajaxpatterns.org/Periodic_Refresh) via AJAX?

Background: I am trying to make an auction site using Ubercart. Actually I've also tried e-commerce and trying to write an ec_auction module for which I did the first CVS commit yesterday. I am clearly desperate...

The auction site will have multiple products (upwards of 50-60) going on auction everyday and being accessed by 100,000 users. And typical to an auction site, the current winner, number of bids on a product, time left for auction to finish, etc. are variables that are changing dynamically every second. There is a website named Swoopo ( http://www.swoopo.com ) that does this job pretty well. I've given a lot of detail of how they manage it at this link http://drupal.org/node/422616#comment-1526736

Can someone help me figure out how we can implement this in Drupal? Would appreciate any help you can offer!
Ravdeep

do u have a budget to build

mm167 - April 28, 2009 - 02:10

do u have a budget to build and operate this web site?

I dont think u can run this web site on any low cost sharing hosting (say below $5 a month).

If u are plaining to run your own server, I will suggest u to consider a Drupal + Streaming Server (a non drupal, non php part) as your total solution.

U may use Drupal to manage your products and Users as Drupal is a Easy-to-use and powerful CMS.

But since Drupal is PHP dase and PHP is no good for Streaming, u will need a non-php (non drupal) based Streaming part.

A Drupal + Java Streaming may be the right choice for your case. Provided that, u will run your own server, since not so many hosting services support both PHP and Java.

Good luck.

We go the drupal way. How about you?
http://www.drupalway.com

I do have a decent budget...

ravdeepchawla - April 28, 2009 - 02:23

I do have a decent budget... I am hosting on Amazon EC3 that starts at $0.1 cents an hour. I have a virtual OS image to play around with (so I can have Java + PHP) but am not really sure I understand the integration as you put it...

Do you mean to say that I write a small Java App that just fetches the data from the mysql database and keeps felling a streaming buffer. The Drupal site loads up at the client side with a javascript that has a set_ interval method that asks data from that buffer alone and it means no recompiling any PHP

Sounds feasible but have u ever done something like this or seen someone do it? Honestly, I wouldn't want to reinvent the wheel from scratch... Still early days for me with Drupal code...

no reinvent the wheel is the

mm167 - April 28, 2009 - 05:59

no reinvent the wheel is the point why NOT using php for streaming data in your case.

The picture may be like this ..

1. user login and select a auction to join
user checking should be handled by Drupal.
production and auction information are managed by Drupal.

2. auction app
a. a java application which will stream auction data to all users in real time.
b. Remote Shared Object RSO may be used - whenever the bit price changed, all users will be notified. If u have $, u may buy a FMS from adobe. OR Red5 (free).
c. when auction finished, the result pass back to Drupal.
** You may use a Flash swf as your auction interface but not a must.

3. Drupal will take care of the payment, delivery ..etc.
a. u may use ubercart.

Do u want a prove-of-concept demo?

[updated]
Using AJAX may be a light-weight, simple and "Good Enough" solution. Say, if there are less than 5 users bitting an item in the last minute and may accept update in every 10 seconds.
There is a count down feature in Ubercart Auction which may be already good enough for your case.

Good day.

We go the drupal way. How about you?
http://www.drupalway.com

 
 

Drupal is a registered trademark of Dries Buytaert.