N
N
nepster-web2014-01-05 01:39:27
PHP
nepster-web, 2014-01-05 01:39:27

Can Node.js be used as a router?

Actually, the question is this, I'm interested in the opinion of specialists regarding how to use Node.js as a router that updates data in real time.
That is:
For example, there is a situation when you need to update data in real time and the idea is this:
We open a socket and transfer data,
for example, php accesses node.js over the socket and says give me data from the database of this user,
node.js accesses another php the script (since the node driver for mysql) receives the data
and sends it back.
How will such a method behave with a large number of requests?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex Gray, 2014-01-05
@wordwild

Creepy.

D
Dmitry, 2014-01-05
@omun

1. Why do you need a middle node in the form of node.js? Why can't two php scripts work with each other?
2. Join @dizballanze - what's wrong with the mysql driver in the node? Why do you need to connect somewhere else?
3. As I understand it, this is realtime on the side of the backend. And what is the trigger for the update in this case? And the trigger can work immediately in node.js, and not pull this whole chain?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question