node.js - chat with socket ajax php and nodejs? -
i writing chat application mobile & web using php , nodejs-socket.io.
i using android post messenger php - php create new socket (net library on nodejs) , response messenger friend via nodejs.
a (via http request)-> php (via socket)-> nodejs (via socket.io)-> b (web - websocket / android)
i trying a->nodejs->b utilize socket.io, message slow when number of users increases.
i found time sending messenger nodejs b device (chatter) fast, socket php sending messenger nodejs slow.
i see socket in php/nodejs opening , closing many times in short period of time. please help me create application run faster, or suggest solution?
i expected seek using java, can tell me websocket performance, i.e. socket.io vs. java socket speeds?
thank you.
websocket performance good, fast. tested on chrome (pc) not on mobile phone yet.
and java socket simple , easy use. why don't utilize java socket connect straight android -> nodejs without making http request , php bridge?
the reason why php socket repeatedly open , close: there many reason create code open , close repeatedly, may there no loop in php code maintain connection. can show detailed code of problem please?
php node.js
No comments:
Post a Comment