How is this different from Enigma, https://enigma.co, which originated at MIT a few years back and did an ICO last year? Enigma already has TEE (they have Intel partnership for that) and sMPC is coming up.
As someone who's done the bulk of the work for Action Cable, I wanted to clear the confusion re: cable and eventmachine. Cable is currently using EventMachine because it uses faye-websocket for dealing with websockets. And Faye is one of the very few well maintained ruby library dealing with websockets.
And in fact, Action Cable uses Celluloid threadpool to run all the application code in threads. So the model is a combination of EventMachine + Threads.
There's absolutely no reason it can't use Threads + Celluloid all the way. But building on top of Faye was the simplest way to get things up and running.
As someone who's tried to use Faye and EventMachine (separately) back in the Ruby 1.9.3 days: Have they stabilized enough to be used for anything?
My memory of them is rather horrible.
Memory leaks, segmentation faults(!) and obscure deadlocks eventually made me scratch EventMachine from the list of things I'd ever want to touch again.
And Faye, well, I don't think I even got it fully running at the time. I still re-call my astonishment when I realized that neither of their two different server-impls at the time would pass even most basic tests (e.g. browser connect/disconnect, redis start/stop) without crashing, locking up or losing messages.
Admittedly it's been a while... Is anyone running Faye in production and can comment?
Edit: Thanks for the feedback. I guess it's time to give Faye a second chance.
I wrote http://firehose.io/ that runs on a separate fleet of servers to handle pub/sub that uses Faye. For the most part it runs without putting up a fuss.
Lost messages aren't a concern because it's assumed the protocol won't handle lost or dropped messages, so Firehose messages have a sequence that counts up per channel that the client keeps track of.
You can't use Faye without eventmachine. Cable only uses faye-websocket though - https://github.com/faye/faye-websocket-ruby . Do let me know if you had any negative experiences with that. I don't know about the state of the things in the 1.9.3 days, but faye-websocket has always "just worked" for me.
When I was building live relation system faye server has problem to accept more that 1k simultaneous connections. For nodejs it can accept about 30k simultaneous connections. Did you do some stress test with more that 1k connections?
Personally, I think Cramp's interface is a lot better than Goliath when it comes to streaming, because everything is streaming in Cramp. YMMV. https://github.com/lifo/cramp/blob/master/examples/sse/serve... in case you want to compare. Also, goliath websockets branch looks outdated.
FWIW, I do like Goliath. More async solutions in Ruby the better!
I'd love to see it too! However, I do think the comparisons should be about the ability handle the number of open connections seamlessly and not req/sec. And relevant memory/cpu usages.
Ha! I didn't realize about '/'. I asked in #startups about giving my old thread a bump but no one responded. So I tried making a new post and it worked!
It's unfortunate but there should be better ways for people to repost URLs over time like this one. This seems an appropriate repost in any case considering the first didn't get its due props. It's the links that do crazy well and then somehow get reposted days later that are really annoying ;-)
I didn't know about the / approach but have used the "?" suffix "trick" a couple of times over the years when submitting things that other people put boring/inappropriate titles on that didn't catch on. I believe # will also work since AJAXified URLs need to be supported.
Cramp is a fully asynchronous web framework that's very good at dealing with thousands of open connections. It supports WebSockets (latest protocol) and Server-sent Events out of the box. Optionally, supports using Ruby 1.9 fibers to prevent spaghetti evented code - which means seamless Active Record integration.