Questions tagged [websockets]

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.

Filter by
Sorted by
Tagged with
0
votes
2answers
55 views

Architecture to populate graphs from real-time data

I'm developing an application where graphs need to be populated from realtime data. The Real-Time data comes from a Kafka Queue. How should I send this real-time data to the front-end which is in ...
3
votes
1answer
90 views

Do I actually need a message broker or are websockets enough?

The website I am building has a real-time messaging component. The backend is built with Flask and I have integrated Flask-SocketIO to handle Websocket connections when users are on the messaging page....
2
votes
1answer
69 views

Application for forwarding data from websocket to HTTP method

I have a Raspberry Pi with a ConBee 2 (ZigBee) interface connected. The ConBee provides a websocket I can connect to to get push notifications on sensor changes. And I want to forward those ...
-1
votes
1answer
54 views

buffering messages and send after reconnect

I'm looking for a solution for this, buffering messages in an array and send them after web-socket reconnect. I can check the socket client and push messages to an array when connection is lost and ...
-1
votes
2answers
120 views

Notify thousands of clients with websockets, are there any caveats?

I'm building a web app, where users can create locations, which are displayed on a map. Also, users can click on the map objects in order to get to a place details page where further interactions ...
0
votes
1answer
64 views

Potential Solutions to loading Javascript classes unknown at run time

I'm looking for some advice or potential options for loading javascript files in real time long after the DOM has fully loaded. Those javascript files need to be sent over a WebSocket connection, and ...
0
votes
1answer
136 views

Web turn based game Architecture. With or without websockets?

I have written a turn based game (Dominoes) using Scala and Akka actors, where a Server manage all the game state and the clients (Players) receive the new state every time one of them plays a card. ...
0
votes
0answers
18 views

Route requests based on path url to the same server which uses web sockets when implementing a load balancer

I have an online whiteboard where users connect to the same room depending on the last part of the url where the room name is present. The urls are dynamic and is created per new room. Eg: https://......
0
votes
1answer
213 views

Advantages of using a message broker for scaling websocket client-to-client communications

I'm designing a system where pairs of clients need to exchange messages proxied by a backend service. My initial plan was to use websockets and have the clients connect to a single websocket server, ...
0
votes
1answer
77 views

Best way to make insert data in logs web API. REST or WebSockets

I want to make a centralized log web API, so it will have a large amount of data per seconds. the logs will comming from others WEB API I was thinking if i make the REST API, all of the POST made ...
1
vote
2answers
485 views

Real Time Web Sockets Architecture

I am confused here on how real time analytics is accomplished with web sockets when data is inserted into the system via a REST API. In my (admitted immature) understanding of web sockets, you have ...
0
votes
1answer
76 views

What pattern should I use to implement a Message Routing mechanism?

I'm hoping someone can give some guidance on an issue I'm having. I have: A WebSocket service, where I have a single method on the server that handles all traffic. Lots of different kinds of ...
1
vote
1answer
485 views

Best practice with SignalR communication

I'm working on a project that involves online purchases. I have my web api in C# and my client in REACT (javascript). Server and client are connected with SignalR. I want that when an ORDER is ...
0
votes
0answers
60 views

Two Web clients and Java server (HTTP and Websockets)

I have 3 software components of a Web Application: 1. JS-client application 1 (JSApp1) 2. Java Spring (REST and Websockets) server app (SRV) 3. JS-client application 2 (JSApp2) My current task is to ...
1
vote
0answers
43 views

How do I choose the right Websocket API

I'm doing a project where I have to control a live DALI controller and I'm sending data from the website to the controller with Websocket. How do I know what Websocket to use? At the moment I'm ...
1
vote
0answers
109 views

Difference between API server and Gateway

I'm working on a VOIP startup currently and deciding which software stack will be best. I'm doing a lot of research of how other people do it, like Discord. It's really hard to make some of these ...
1
vote
1answer
561 views

Is there an equivalent to HTTP status codes for WebSockets messages?

I'm developing a WebSocket API and I was wondering if there was either a standard or best practice for responding to client messages. For example, if my API is expecting only stringified numbers but ...
2
votes
1answer
158 views

Resolving request congestion at browser by using socket as “fast lane”, any consequence?

I have received multiple reports from users of a Web-based GIS application we have rolled out one to two year ago, complaining the application becomes unstable/unresponsive. After a brief ...
3
votes
0answers
298 views

Ensuring reliable delivery of messages over websockets?

I am building a comet service which will push new data to the client on mobile devices. For this, I am using websockets to deliver messages to the client. The problem I am facing here is the ...
1
vote
2answers
850 views

Is there a need to add web sockets for push notifications

Currently we have an application that, upon certain events, will send notifications to users. We use SQS to handle the actual delivery of the notifications. As an example, when a user registers an ...
1
vote
1answer
108 views

Architecture for communication between multiple backend systems and IoT devices via WebSockets

I have a scenario in which thousands of IoT devices -- each fitted with a sim card -- are geographically distributed and shall be controlled individually. Therefore each IoT device has a WebSocket ...
3
votes
0answers
309 views

Migrating a client from a REST API to a WebSocket one

I'm working on a system that integrates with several third party services via APIs. Those services require authentication. Usually, the services are implemented as REST APIs using HTTP. My system ...
1
vote
1answer
113 views

Design: HTTP and Websockets working together

I'm at a bit of crossroads here and I wanted to ask the opinion of the community. I am creating a chat application for our company. Now, like every chat application out there, the messages are saved ...
0
votes
2answers
506 views

WebSockets vs Ajax call for scheduled event?

Intro I have been weighing the pros and cons of using WebSockets vs. an Ajax call for an event which will happen every x number of seconds (in this case 5). I'll start by explaining the scenario. ...
7
votes
1answer
1k views

How long should Websockets maintain connection

I've created a rest generic service which additionally consume a websocket per resource my websocket code looks like so: initialize(hubSubRoute: string): void{ const accessToken = this....
0
votes
1answer
41 views

Evaluate http reqres vs websockets for geolocation based broadcasts

My use case is that I have a real-time broadcast app where users get feed items based on a geolocation, i.e. a user will receive posts that were broadcasted from within a user-defined radius where (s)...
2
votes
1answer
59 views

Realtime Live Auto updates for web applications

It's about trying to understand the architecture behind how updates to web application is done. I've been working on a non-public website that has bunch of records displayed in a UI, now the ...
1
vote
0answers
422 views

Are AJAX calls fully replaceable by requests sent via WebSockets?

I am redeveloping an application with the aim of going along with the more modern techniques. That is how I came across Socket.io, which I integrated with express.js. I implemented live searching ...
1
vote
2answers
2k views

WebSocket Client as an always running service

The company with which we are integrating is a door security company that makes RFID cards and door scanners. You scan your card, the door opens and lets you in. They allow 3rd party integration via ...
1
vote
1answer
50 views

Efficiently broadcast user status

This turned out to be a rather interesting problem contrary to my expectations. Imagine a simple chat app, a user registers then can add other users to their contacts list and start conversations. I ...
3
votes
1answer
752 views

Any disadvantage to using websockets for non-web client apps?

this is my first post on here. I am wondering if there is any disadvantage to using websockets as a communication method for a non-web-based client application to connect to a server? I am looking at ...
-3
votes
1answer
75 views

Best Data Structure for ordered list of connected users

I have three attributes for a user: connectionId (e.g. "sd4-h4sdg-u4j-a2rr3"), userName, and placeInLine. I can't think of a single data structure that will handle my scenario of only allowing a ...
1
vote
1answer
686 views

Multiple API calls potentially spawning multiple Websockets - Threading vs Async

I am designing a program with the flow as outlined below. Note, these are all network calls, there is no system I/O (hard drive). Initially, multiple independent API calls need to happen - they don'...
5
votes
2answers
10k views

What is the point of rooms in socket.io?

I was wondering what the purpose of rooms is. See: https://socket.io/docs/rooms-and-namespaces/ You can basically mimic join and leave with just socket.on and socket.off Take for example: (no room) ...
2
votes
1answer
131 views

Need advice on how to transfer data between two backend systems

I've been working on implementing a customer-facing REST API at work the last few weeks. Although there's not yet a requirement for it, I think it'd be really nice to have analytics for this. For ...
0
votes
1answer
2k views

Does Web Socket block thread while keeping connection as regular http connection does?

Let's take Spring web socket (with tomcat) for example. Does Web Socket blocks thread while keeping the connection between server and client? (For example, connection can last 2-3 hours). ( Does web ...
4
votes
1answer
2k views

Battery Impact: Idle vs Busy Websocket on iOS [closed]

I’m wondering whether a busy websocket connection uses significantly more battery on iOS than a sparsely utilized one - or if there is a constant overhead simply for maintaining the connection that ...
0
votes
2answers
811 views

Communicate between browser and client application on localhost

I'm currently developing a Website that requires direct access to the client computer. Therefore I decided to split this project in this three main parts. There are some requirements that have to ...
3
votes
1answer
74 views

Should a push hold data or make the receiver trigger an API call?

With WebSockets, when clients should be notified that data changed, I've seen two approaches: the server pushes the data modifications directly within the push; or the server pushes no data, and the ...
3
votes
0answers
303 views

Where do I put WebSocket handling code following the MVP pattern?

I am currently working on a Web Application. One of the objectives is to use the MVP (Model View Presentation) Design Pattern. We would like to use WebSockets to communicate between client and the ...
2
votes
2answers
2k views

Socket on a webserver

So what I know about socket is that a socket is an end point of a connection for a process, hence 1 socket on a host binds to an IP and a unique port number for each connection. But a webserver (by ...
1
vote
1answer
136 views

Performance: Looping on data on the server or getting data looped on clients via socket connection

I have a web application the mobile app users are connected it by using websocket. The server has data A that can be changed in time. And the clients (mobile app) have data B that also can be changed ...
1
vote
0answers
239 views

Best practice to maintain 2 servers - PHP and NodeJs

We have a Symfony backend server for our Android and iOS application. Recently we need to extend our application by supporting real time interaction such as chatting, and we decided to use NodeJs with ...
3
votes
0answers
630 views

Long lived connections

I have a custom non-blocking I/O server that supports (among other things) HTTP and websockets. I have two timeout concepts for connections: idle: connections that don't do anything are closed after ...
1
vote
2answers
856 views

Arbitrary protobuf message as byte-array over Websocket - how to determine actual message type upfront

Protobuf is nice and dandy, but it was not made with self-description in mind. Now this is totally okay if you're using a well-defined protocol and want to replace e.g. SOAP-messages or just want to ...
-1
votes
1answer
120 views

How to explain to a trainee how a computer receives external messages [closed]

I got a trainee in the company I work for. We are currently working on a JS interface that communicates through websocket with a C/Lang server. My trainee asked me a very good question this morning. ...
2
votes
1answer
3k views

bind() call in socket programming

I am reading about socket programming and got to know that ip is assigned to socket with bind() call before connection to server.Is my thinking of binding address means to bind any ip address correct.
0
votes
1answer
3k views

Django and websockets: Channels vs Socket.io vs other?

In my Django web app I want to monitor my remote Raspberry PI clients - up to hundreds - using WebSockets: I have to check in their status in real-time (online, working, offline etc.), send commands ...
17
votes
2answers
11k views

How to architecture a realtime-heavy websockets-based web application?

In the process of developing a realtime Single Page Application, I have progressively adopted websockets to empower my users with up to date data. During this phase, I was sad to notice that I was ...
0
votes
2answers
632 views

How can an update message from a rabbitmq broker reach all relevant clients via multiple websocket servers?

Lets say I have multiple websocket servers that maintain many connections to clients to send updates. These websocket servers will be pulling said updates from a rabbitmq broker, and broadcasting them ...