Replies: 9 comments
-
Interesting. I haven't thought about using both WS server and RPC server with passenger. I think, from the performance point of view it would be better to use Anyway, I like the idea. |
Beta Was this translation helpful? Give feedback.
-
you could switch to uws under node if you wanted, i picked node as it had builtin support from passenger. Perf wise it wil luse the configured passenger threads/process model instead of node clustering .. i saw a blog recently, where settings the gc options and using node cluster a guy was supporting 600k clients on a ec2 instance with node ... again its an idea |
Beta Was this translation helpful? Give feedback.
-
Hello. I'm trying to use ActionCable for some of my project, and AnyCable seems like a good option when the ActionCable start to have scalability issue. I just want to let you guys know that I'm also interested on nodeJS AnyCable server. I guess Javascript is the next language most Rails developer know well after ruby, so having support for Javascript server might help AnyCable adaptation. Even though maybe Go or Erlang have better performance than JS but good enough is enough for most people. And the ability to not learning a new language could be a deal breaker when deciding to use a project for some people (In this case JS has advantage because of its popularity). |
Beta Was this translation helpful? Give feedback.
-
I ended up building a new interface all together as my use case is coupled with passenger (its just easy and you should be using passenger for a rails server having used both passenger and puma in production ill go with passenger all day. my implmentation dropped grpc all togther, and switch to zeroMQ as the transport bridge and built a HA capable zmq broker to handle action cable workers (seperate process). my first impl however was just as i said above i ran a grpc server, node ws and rails app all under passenger and it worked just fine as long as redis was used as the comm bridge. Ive had some issues with redis as the bridge as i also had sidekiq and a few other things sharing it as well.. long story short .. i no longer use redis in my stack, ive switched to zmq for the comms |
Beta Was this translation helpful? Give feedback.
-
if I may ask is Go or Nodejs better in terms of performance and scalability for anycable implementation. |
Beta Was this translation helpful? Give feedback.
-
i ended up doing it in crystal |
Beta Was this translation helpful? Give feedback.
-
is crystal a better alternative or what? to clarify my self im currently trying to build a real-time messaging and notification service so i wanna figure out the best tech for it in terms of scalability and performance, anycabe with the go implementation or Nodejs or another hole tech. |
Beta Was this translation helpful? Give feedback.
-
nodejs was simply too slow for me, i choose crystal as its an easy transition to jump from ruby, but its compiled llvm output and its resource usage is very low for volume so worked out better for me. I also switched to using mongodb 4.2 tailable cursor feature for subscriptions and broadcasts, (my app already uses mongo and crystal (my bg jobs are in crystal) so most time gain/process/management for my particular setup) if you comfortable in go |
Beta Was this translation helpful? Give feedback.
-
ty for the clarification helped me a lot, I think I will dump the idea of going with Nodejs, I will stick with anycable because I use RoR already and also it scales very well so no cons here. |
Beta Was this translation helpful? Give feedback.
-
As i use passenger in production, I setup a simple rackapp shim to run the anycable-rails grpc server, i created a nodejs anycable server that is also mounted under passenger, buth are setup as locations under the main rails app server config, and using passengers unlimited concurrency setting, botht eh shim rackapp for anycable and nodejs app can be run and managed via passenger.
If there is enough interest, i could try to build a npm package to for my anycable nodejs servers (it uses ws module to handle websocket requests)
Beta Was this translation helpful? Give feedback.
All reactions