WebSocket is an API and a protocol for bi-directional, full-duplex communication that is closely associated with HTML5 and implemented in recent versions of most web browsers.

learn more… | top users | synonyms

2
votes
1answer
15 views

Scaling websocket client connections (not server) to multiple servers

I wrote a Slack bot which must connect to Slack teams through websocket connections. Since the bot might be used by thousands of team, I will eventually need to distribute the teams across multiple ...
3
votes
1answer
21 views

Asynchronous socket.io for lots of concurrent messages

We have a web application which currently operates like this on a typical view/page: the front has to display 100+ "previews" (in the form of base64 images) each of this preview is built on-demand ...
-3
votes
0answers
28 views

Which database to use for real time data update for trading and analysis? [closed]

I am thinking about a website for trading and analytics. I am thinking which technologies can be used for this kind of website and so I have doubt with database. Which database is suitable for a ...
1
vote
0answers
22 views

Does RaceDataFacade violate the single responsibility principle?

I have heard, that each class should always just be responsible for a single purpose, otherwise you should rethink your design. So here are the concerned classes: WebSocketController: provides ...
1
vote
0answers
33 views

Exact definition of Sec-Websocket-Key in Websocket Protocol

I'm wondering what the exact definition of the header-field Sec-Websocket-Key is. The field is used for Websocket connections. The client asks the server to upgrade from HTML to Websocket. The ...
1
vote
3answers
64 views

Best approach for realtime sync + shared todo?

I'm implementing an app that has among other things shared todo lists. I want it to sync in real time. This has to work for "normal" single user items (e.g. user has app opened in 2 devices, doing an ...
4
votes
2answers
74 views

Using websockets for server “broadcasting”?

I want to make it possible to edit shared todo lists in real time. There's already a REST interface, and it's possible to send updates to the server - add items, mark items as done, etc. For the ...
0
votes
0answers
51 views

Broadcasting events asynchronously in a high frequency application to prevent hangs?

I'm doing a bit of socket.io work in an application that demands high frequency updates with minimal wait times (imagine a commentator annotating a video livestream, with viewers both watching the ...
6
votes
5answers
381 views

How do I balance 100 clients checking the same database table in a loop?

What I have This is a prototype. I have a pool of 100 clients connected to the server via websockets reporting things and awaiting for commands. The server polls the commands database table of type ...
3
votes
1answer
116 views

Does push via web sockets increases server load if I have too many write requests?

I have too many write requests to database. Currently my app implementation is such that it makes pull call to server every 5 seconds to update the changed data. If I implement push through web ...
1
vote
0answers
85 views

how to store online status

I'm developing realtime web chat using pubsub pattern. To be concrete I'm using python and tornado-redis on back end and websockets (WS) (tornado) on front end. I have WS connection open and close ...
1
vote
0answers
177 views

Design pattern for socket.io and Express

I have a Node.js Express RESTful HTTP server I will call server A and an Express socket.io server I will call server B. Server A responds to all HTTP requests by clients and server B listens to the ...
3
votes
1answer
77 views

Is web sockets the best solution for my problem?

I have created a Slackbot that integrates with Submittable.com. For example, I can trigger a response that displays all current submissions in Slack. I now need my Slackbot to post in Slack whenever ...
1
vote
0answers
55 views

How can I improve my websocket server's structure/flow?

I'm building a websocket server in python and I've hit a block regarding my program's flow and structure. Here's what I'm doing at the moment. The program creates a instance of 'server' and listens ...
0
votes
1answer
267 views

Does the issue of battery life for constant polling warrant the extra logic/time to implement a solution with websockets?

I am in the process of designing a chat application with cordova for android devices. I have been researching and have come to the conclusion that there are two ways to go about this that could work. ...
1
vote
0answers
363 views

Proper usages of rooms/namespaces when making a News Feed with socket.io

I am working on making a News Feed for a piece of software that will have data posted to different hierarchical levels within the software. For example, the software will support multiple ...
2
votes
1answer
275 views

Using Websocket for a multiple-page website

Is using Websocket (in particular, in a Java, SpringMVC webapp, with the Spring Websocket support libs, but the question probably applies to any language) for a multiple-page website a bad idea ? ...
-3
votes
1answer
284 views

using node.js server with mysql-module and PHP for a penny-auction website? [closed]

I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic. I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
1
vote
1answer
124 views

How does StackExchange load data from the server without making an XHR request?

When viewing the questions for a tag on SE networks, every now and then you will get a message at the top: n questions with new activity. However the weird thing (to me) is that I don't see any ...
2
votes
1answer
168 views

Are web sockets a browser feature or supplied by a specific OS version?

Are web sockets a web browser feature, developed and evolving as the browser developers want, or this feature dependent on the OS version? For example, can I use this feature in JavaScript in IE and ...
5
votes
1answer
1k views

Mixing REST and websocket in the same API

A bit of background first, I'm working on an application that manages a piece of physical equipment with motors, stuff like that. When I started on the project, there was an existing application, ...
1
vote
0answers
92 views

Need to add websocket support to a single page that's running a wsgi service

Current setup. I have a legacy ERP system (Thoroughbred) and i then have several in house applications (CRM, WMS) and a website that interact with it via an xml server and straight ODBC connections. ...
2
votes
1answer
617 views

Is having a bi directional message queue a design smell?

I have an architecture with 1 backend server and multiple frontend servers. The frontend servers are connected in a bi-directional (web sockets) connection to clients so they can send messages to ...
1
vote
1answer
80 views

Best way to keep consistent data in model across devices?

I have a model for an app that is fairly large, all of which needs to be on a users' device at the same time. For example, a spreadsheet. If a user makes a change to the model on one device, I want ...
4
votes
1answer
487 views

Are there any design pattern to data binding in event driven architecture?

I develop a browser based game with node.js in back and HTML5 canvas in front-end. It use WebSockets for communication. My plan is to generate business events in client side, e.g.: "finishJob". ...
2
votes
1answer
7k views

Two way Communication between Server and Clients

Situation: We have a web application running on a server. This application needs to fetch data from some other PC(Clients), which are on a different network. On the clients' pc there are WCF hosted ...
0
votes
2answers
93 views

Should the async update-server be on the same physical server as the website?

I want to setup a comet/web-socket server for a forum sitting in front of a message queue i.e. rabbitmq, that will maintain client connections and update them about relevant events (i.e. new posts, ...
16
votes
2answers
12k views

Is performance the only reason not to use SignalR (websockets) entirely in lieu of a traditional REST API?

I have used SignalR to achieve real-time messaging functionality in several of my projects. It seems to work reliably and is very easy to learn to use. The temptation, at least for me, is to abandon ...
1
vote
2answers
419 views

Strategy for creating a websocket relay? [closed]

I own a Raspberry Pi and would like to use it as some sort of websocket relay, so that all people who visit a specific webpage would be able to communicate with each other. The key thing about this is ...
3
votes
1answer
293 views

Is my websocket session idea practical?

In a situation where all communication (including logging in) between a client (web browser) and server is done over a persistent TLS encrypted websocket, would there be anything inadvisable about ...
2
votes
1answer
292 views

JavaScript Compression and Caching of Assets

I'm working on an idea that i can't seem to find a good answer though hours and hours of searching, I'm planning a small Canvas/WebGL Application this application will be using WebSockets to talk to ...
0
votes
1answer
374 views

Socket connection to external IP through server

I am working on an application using sockets. Essentially I want to stream data between two clients. Since I can't connect the two clients together directly (they aren't on the same network), I will ...
1
vote
1answer
895 views

AJAX or web sockets for client-server communication?

I recently took a course on AngularJS, and quite frankly I loved the concepts of a website that fetches json to handle subsequent requests, however I still feel like Javascript is far too slow for ...
1
vote
0answers
97 views

Synchronizing web ui and third party async services

I'm looking for concepts, approaches or even Framework/libraries to help me synchronize state reliably from web UI to a third Party Service. For example: creating a JavaScript irc Client ui you need ...
-2
votes
1answer
534 views

Is pywebsocket a production tool? [closed]

Is it a good idea to use pywebsocket in a production environment, since it is so widely used, but their google developer page states "pywebsocket is intended for testing or experimental purposes". ...
1
vote
2answers
2k views

Should I ditch AJAX in client side web development when I've got a web-socket open?

I was thinking that maybe I should forget AJAX (HTTP) requests when I've got a web-socket open between client and server, but I decided I should ask here to check if this could be a bad practice for ...
2
votes
0answers
229 views

Websockets VS SSE

Suppose I have a service which requires to seek the database for different data once and in a while. For this I have 2 or 3 SSE, each one with a different retry basetime (20000 miliseconds, 1000 ...
0
votes
1answer
275 views

Serve content from server to remote embed HTML

The title is very bad so let me explain what I need to know. I have a server with let's say different images. What I want to achieve is be able to embed a frame, into any HTML site, and be the server ...
3
votes
2answers
182 views

messaging class and global state

This is a front end project that is using socket.io for all communication with the server. This allows for push which is good, but recently we have been asked to provide a pause button. The pause ...
3
votes
1answer
829 views

Is masking really necessary when sending from Websocket client

The current Websocket RFC requires that websocket clients mask all data within frames when sending (but server is not required to). The reason the protocol was designed this way is to prevent frame ...
5
votes
2answers
6k views

REST or a message queue in a multi-tier heterogeneous system?

I'm designing a REST API for a three-tier system like: Client application -> Front-end API cloud server -> user's home API server (Home). Home is a home device, and is supposed to maintain connection ...
1
vote
1answer
341 views

Making a decentralized system utilizing JavaScript/HTML5?

I am interested in decentralized systems, and am currently considering building one myself. I am considering using JavaScript and HTML5, simply because it makes it very easy to use the system (they ...
0
votes
1answer
713 views

Python web application frontend for equipment diagnostics and interaction

My goal is to have a Python application that runs a web server which hosts the user interface, and based on interactions from a user in their browser, long running tasks get kicked off and through ...
2
votes
1answer
273 views

How to dynamically add new posts once they are created

I am trying to design an application where users can make posts with Django on the backend. Right now I have to refresh the page with JavaScript every 20 or 30 seconds to check for new posts that ...
4
votes
2answers
669 views

Optimization of a hybrid pagination scheme

I'm working on a Web Application using node.js in which I'm building a partial copy of the database on the client-side to decrease the load on my server. Right now, I have a function like this ...
4
votes
1answer
892 views

How much overhead is there in persistent connections?

Ok so I'm musing over a little side project I want to start. Essentially its a multi-session web based FTP client. Multi-session in that you can log into several FTP servers at the same time and ...