Node.js and Socket.io - how far can they work with real-time web applications?

I'm going to create a note management web application (think of something like Evernote). I decided to use the client side of Backbone.js + jQuery. On the server side, I have not decided yet: either pure PHP (which I know very well), or Node.js + Socket.io (completely new to me).

I am considering Node.js + Socket.io because I want my web application to be in real time (for example: if a user updates a note, this note is instantly updated for the employee who shares this note without reloading the page).

I also considered using Node.js and Socket.io for UI and PHP for the REST API as a third alternative (it was more convenient for me to create an API with PHP). PHP and Javascript code will share the MongoDB database.

My question is this: if I develop a REST API for my web application with PHP, and a new note for the user is created through the API (i.e., the Android application will send an API request to create this note), there will be Node.js, Socket .it and Backbone.js will be able to instantly update the user interface and show a new note on their screen? I think this can be called a push notification.

I hope I was clear enough.

Also, is there any alternative outstanding technology for building real-time web applications?

+5
2

Node.js + Socket.IO . Node , , . Node . - "Thread-per-request", .

Node , , , ... , , PHP-. Node . , , , .

, CPU, , Node.js .

, (Node), PHP . , Node.js, , -, REST API Notes.

, WebSockets, , , . , Node, PHP. , Socket.IO Node.js.

Node.js/Socket.io

  socket.on('new-note', function (data) {
    placeNewNote(data);
  });

socket.emit('new-note', data);

Node: Node.js

, Android, WebSockets... : Java socket.io client p >

+9

Node.js -, push- - , , . , Node.js , , , -, ( Express framework).

PHP - Node.js push-. , , , Redis . Redis , PHP Node.js push ( ). push- .

, , Twisted server. , Python, . , WebSockets. , Node.js + socket.io.

+2

All Articles