Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two way communication with server side objects for web-application development

Background

My background is high scale object oriented middleware and Applications development for embedded devices and desktops with C++. Now we need to create a high scale web-app for our startup.


Question

Request-response based and continuous polling based current web-development frameworks looks very primitive, inefficient.

I am looking for completely server-side object oriented and event based programming. Here is an example it,

There is a persistent object named employeeManager on server,

methods of this object,

empList getAllEmployeeList();  
empList getEmployeeOfDepartment(string strDept);  
/*Some more */

events of this object

employeeAdded(empID);  
employeeEdited(empID);  
employeeRemoved(empID);  
/*Some more */

Now, client side javascript should be able to call the methods of this (server-side) object and should be able to receive events of this object. We can have results of the method call in asynchronous mode. Framework should also provide a way so that view ( or html-js page ) can register for required server side events.

Is there any frameworks which works on this methodology. Anything like this on top of socketIO? Any framework which provides a good two way RPC between client javascript and sever side objects?

like image 461
SunnyShah Avatar asked Oct 26 '12 09:10

SunnyShah


People also ask

What are server-side web applications?

Server-side programming allows developers to make use of sessions — basically, a mechanism that allows a server to store information on the current user of a site and send different responses based on that information.

How do Web Apps communicate with each other?

The web applications are hosted on the server and the client here is the browser that displays it to the user. For server side web apps to scale while communicating with each other, a message hub or a message queue (MQ) is used.

What are the server-side web development technologies?

The term 'server-side technologies' can encompass a range of software solutions, mainly: server-side scripting languages; Database Management Systems (DBMS); web server software such as Apache; and many other technologies depending upon the application being built.


2 Answers

Try the following combo:

Node + socket.io + Backbone.Model + a bit of imagination.

I think the missing piece is a model like structure that can be used on both server side and client side. The model needs to synchronize state between server and client.

Here is an article that I find very interesting, and maybe you can use the technique described?

The article:

http://blog.andyet.com/2011/feb/15/re-using-backbonejs-models-on-the-server-with-node/

like image 110
Aaron Qian Avatar answered Nov 07 '22 06:11

Aaron Qian


NodeJS and sockets.io. These can help achieve the desired effect.

like image 40
undefined Avatar answered Nov 07 '22 05:11

undefined