0

I want to record a whole lot of Vimeo events, by using their JS API, and AJAX posts. The data will be saved in Postgres via a Rails app. I want to record events like 'play', 'pause', seek', '1% played', '50% played' along with where in the video they are, all in chronological order. This is so that I can then piece together exactly what is happening in each video (e.g. does the user keep rewinding, then the video is not explaining concepts properly, are they skipping to the end - is the video boring them etc.).

I would like the system to be able to scale to handle 5 000 customers, not all obviously watching the videos at once. Will Postgres and Rails be able to handle this barrage of http posts, without bringing the site to a standstill and use no more than a few gigs ram?

Is there an alternative way of saving this data?

Lee
  • 7,216
  • 13
  • 48
  • 82
  • PostgreSQL shouldn't need any significant RAM for that - what you need is fast disk flushes. Go read http://stackoverflow.com/questions/12206600/how-to-speed-up-insertion-performance-in-postgresql for advice. Rails ... well, it's not exactly lightweight. Consider doing simple, direct inserts if possible. – Craig Ringer Mar 27 '14 at 12:29
  • @CraigRinger so would you recommend mounting a Sinatra app (like http://inductor.induktiv.at/blog/2010/05/23/mount-rack-apps-in-rails-3/), and using that with plain SQL to save the data? – Lee Mar 27 '14 at 12:38

0 Answers0