Tyson Nero
Tyson Nero

Reputation: 2078

Node.js as a long polling client

I want to create a node.js server that is actually a relay to another server. The node.js server must be able to long poll the other server and parse an xml response that is returned.

Any recommendations on this type of implementation? What library can I use to long poll this server?

Just to explain further details, there will be client connecting to the node server via socket.io. Once the node server receives and parses the xml response from the other server, it will emit and event for the client.

Upvotes: 1

Views: 907

Answers (1)

Chandra Sekhar Walajapet
Chandra Sekhar Walajapet

Reputation: 2554

i believe you are defeating the purpose / functionality provided by node.js , node.js will help you with long polling and it doesnt ideally need to poll the other server. in this case the other server which provides the xml should also allow long polling.

why dont you implement the logic of xml response generation on node.js itself so that you atleast reduce the time getting from a different server

Upvotes: 2

Related Questions