Answer the question
In order to leave comments, you need to log in
What to choose Node.js or Ruby on Rails for this functionality?
Recently I asked the question Is it possible to implement the functionality of a desktop program in the WEB?
I settled on two: Node.js and Ruby on Rails
I describe the whole judge in more detail:
- The client enters the site
- Enters the HTTP/HTTPS/Socks4(a)/Socks5 Proxy list (100 pieces) and the list of accounts from social networks ( 100 pcs.)
- Presses the "Start" button
What the service should do:
- 1 account = 1 proxy, a request is sent from each account to various social networks. networks
- Parse responses, write data and resend requests... (approximately one request to the social network from 1 account comes with a delay of 1-5 seconds)
- Make requests immediately (multi-threaded) from all accounts
- Perform all this when the site is tab open
- Run
all of this when the site tab is closed
. if 100 clients load 100 accounts each, then it will be 10,000 hits every 1-5 seconds to the server
- It must be implemented in such a way that when the site tab is open, all the load is on the client , and when the site tab is closed, all the load is transferred to the server
What is better for this implementing Node.js or Ruby on Rails features?
Answer the question
In order to leave comments, you need to log in
There is clearly an advantage in the direction of js in the sense that you can use one js code both on the server and on the client, but in the case of Ruby, you will have to write code in two languages. And the fact that you have a large number of parallel processes at the same time speaks in the direction of Node.js.
read this, I think it will answer your question,
but you need a strong piece of iron if the load is large
No difference.
More importantly, you need to use the message queue for processing, then the application server will accept commands for processing, but it will not spend time on processing itself.
And the workers will receive tasks from the queue and process as quickly as they can, and of course, how many workers can you manage to run on your resources.
Well, you can not send 10,000 thousand messages from the server, but a pack: 100 messages consisting of 100 messages for each client.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question