News for hackers. Stuff that matters.
Re:Realtime encoding - over 150x faster by felixge on Monday December 20, 2010 @04:24PM (#2025823)
Because most stacks don't have a single threaded, non-blocking I/O event loop.

Sure you can do this with threads, but it's gonna get very tricky to pump data between a socket, file and process using threaded programming.

Re:Realtime encoding - over 150x faster by jey on Monday December 20, 2010 @06:13PM (#2026162)
First, I agree that it'd be silly not to use thread-per-CPU non-blocking I/O.

However, I don't see why it'd be tricky in a threaded server. The thread gets an fd to recv() the incoming data from, and it popen()s an ffmpeg process then loops to recv() and write() the data until done.

Re:Realtime encoding - over 150x faster by felixge on Tuesday December 21, 2010 @10:49AM (#2028112)
I'm not saying it can't be done. In fact the multipart parser we have build for transloadit has already been ported to C++ [1] and I imagine Java has decent libraries as well.

But most people just sit on a request/response oriented Python/Ruby/PHP stack with possibly stupid buffering load balancing in between (nginx buffers uploads).

If you build this from ground up, it is certainly possible with a lot of technologies.

[1] https://github.com/FooBarWidget/multipart-parser