Topic: Building a youtube-like web app using activemessaging and amazon s3

Hi, everyone:

I have made a demo web app and a screencast on how to build a video sharing web application using activemessaging plugin and backup and file to amazon s3.  You can get the file from :
http://blog.snowonrails.com/resources/5
I also write a short blog about it :
http://blog.snowonrails.com/articles/20 … -amazon-s3

This is my first time recording a screencast.Feel free to leave me comments.
And I am really sorry that at the end of the screencast my phone rang. :->

Zhang Xue

Re: Building a youtube-like web app using activemessaging and amazon s3

Thanks Zhang Xue!  This is one of the most useful and informative Rails screencasts I have encountered.  I am going to try this as my next project.  Excellent job!!!

Dondi.

Re: Building a youtube-like web app using activemessaging and amazon s3

Very cool, thank you Zhang!

Question though, why use activemessaging when all it is, is essentially a callback to convert the video through ffmpeg? Can't you do an "after_create" callback in the model?

http://danielfischer.com - Personal Web-Technology-Blog, Los Angeles.

Re: Building a youtube-like web app using activemessaging and amazon s3

Thank you very much!

I think you did a great job and would love to see more.

Keep up the great work.

cbmeeks
http://www.signaldev.com

Re: Building a youtube-like web app using activemessaging and amazon s3

Great screencast Zhang Xue, thanks!


DFischer wrote:

Question though, why use activemessaging when all it is, is essentially a callback to convert the video through ffmpeg? Can't you do an "after_create" callback in the model?

I'm not the author of this screencast but I think that reason is very simple. Suppose we use "after_create" callback. After uploading, file is coverted (ffmpeg) and send to s3 service. It could take a few minutes so in this case browser will be still waiting. Good solution should be asynchronous and activemessaging will give you it. Another reason will be possibility to reduce number of simultaneous threads converting files (but I don't know if activemessaging can this, but I think it should). Imagine that 10-20 people upload file simultaneous. It could kill the server smile.

Re: Building a youtube-like web app using activemessaging and amazon s3

I am having trouble veiwing the .mov file in QuickTime 6.5.2? Did you use some special compressor?

Re: Building a youtube-like web app using activemessaging and amazon s3

@Radarek - sorry for the late reply, just found your post.

"Good solution should be asynchronous and activemessaging will give you it. Another reason will be possibility to reduce number of simultaneous threads converting files (but I don't know if activemessaging can this, but I think it should). Imagine that 10-20 people upload file simultaneous. It could kill the server."

Activemessaging won't help with simultaneous upload - that depends on the http serving set-up, but it will help with the conversion.  Messages to convert the uploaded files will be queued, and will be processed only by the number of processes you choose to start.  Messages are received by a ruby process running the 'poller' script - each is  single process, and only use multi-threading for message broker polling, not for processing.

So, for example, if you start up 4 poller processes, that is the most that will run simultaneously - the other 16 messages wait in the queue until a processor finishes and picks up the next message for processing.  You control the number of poller processes much as you would the number of mongrel instances in your cluster - it depends on how many you spin up.  Wo do exactly this set-up for audio processing - sometimes we end up with a few files waiting in the queue, but it never hoses the server.

Cheers,
-Andrew Kuklewicz

Re: Building a youtube-like web app using activemessaging and amazon s3

thank you for this great tutorial!!

Re: Building a youtube-like web app using activemessaging and amazon s3

When i click the link it displays a 404 error page... is there any alterante for this tutorial ?

Re: Building a youtube-like web app using activemessaging and amazon s3

your website
404 =.=

Re: Building a youtube-like web app using activemessaging and amazon s3

nice zhang!! really cool! its  my first time a very awesome video like this... thanks for sharing!
___________________________
search engine optimization | -kevin chipper-

Re: Building a youtube-like web app using activemessaging and amazon s3

kevin85 wrote:

nice zhang!! really cool! its  my first time a very awesome video like this... thanks for sharing!
___________________________
search engine optimization | -kevin chipper-


From where you download it ?

Re: Building a youtube-like web app using activemessaging and amazon s3

Thanks for your demo Snow18.. It's a very helpful information for me.. Nice!

Re: Building a youtube-like web app using activemessaging and amazon s3

Great job! Nice!

Re: Building a youtube-like web app using activemessaging and amazon s3

Could someone help me out. Where can i download the screen-cast please?

Re: Building a youtube-like web app using activemessaging and amazon s3

great ideas... it is something that must read for the others to know ...~iphone apps~

Re: Building a youtube-like web app using activemessaging and amazon s3

the links are all ko'ed