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
0answers
29 views

Ajax with interval vs WebSocket

I am currently developing a script for real estate which tries to find a match between your products and your clients needs. So I need to give the user a notification whenever a match is found, I am ...
-3
votes
0answers
50 views

How to create a webpage for a video streaming C++ application? [closed]

We have a C++ program to process a live video stream on the server. We want to have a webpage on the client-side that shows the processed video stream and has some control buttons (like play/pause). ...
2
votes
0answers
40 views

Better solution instead of sending an image as binary through websocket for real time chat app

I'm building a real time chat application like Whatsapp. I have a websocket server with node+express, but I'm a bit confused on which flow I should use. I'm considering sending the image as binary ...
1
vote
0answers
40 views

advice for web communication protocol for “streaming” multiple JSON objects to multiple clients

As a hobby / to learn I am building an app in JavaScript using Node.js where a component of it will take input from a client, send it to a server, and then broadcast it to other clients. For ...
2
votes
0answers
27 views

How do I keep users of a PWA up to date when the application is in idle / hibernate?

So I'm currently building a .Net Blazor PWA, and I was wondering how the behaviour of my application looks like when it is installed on a mobile device, and the user is done with the app for the time ...
-2
votes
2answers
37 views

How to make distinction between user establishing another connection and different user, under same network, establishing new connection

Sorry, the title of my question might be a little confusing. I have this online game that utilizes websocket connections for the users to initialize so my server can broadcast messages to all them in ...
0
votes
0answers
20 views

NodeJS Websocket Connection to Multiple Sockets

On my backend NodeJS server I need to be able to open up and keep open 1-20k websocket connections at the same time. I will receive a small amount of data from these websocket connections every few ...
-1
votes
0answers
17 views

Request Forwarding Websockets with Nodejs

So the architecture I am currently working with, we have an api-gateway that gets all the requests and publishes them to our Eventsystem/ or directly to our essential services(auth, etc). Now we want ...
1
vote
0answers
25 views

How to do loadbalancing for collaborative editing with multi-az and geoproximity based routing policy

I am planning a project which has users collaboratively editing a document. To provide good latency to users, I am planning to deploy in multiple AWS regions with active-active mongodb replicas with ...
1
vote
0answers
33 views

Strategy for a worker microservice to communicate with GraphQL API

I am trying to find the best way for a microservice to communicate with GraphQL Basic scenario: Client subscribed to GraphQL via Subscriptions (WebSockets) Client creates an Item using Mutation which ...
0
votes
0answers
21 views

Where to store (keep) websockets events?

I have an application that uses MySQL as the database. When a user open a specific page, the app sends a websocket event to indicate all the other team members that this user is seeing the current ...
1
vote
0answers
57 views

SignalR Handle Multiple Clients in my Scenario

I currently have multiple clients who need to be informed when a customer creates a new order. Each customer is registered to an individual client and customers create orders on my website (each order ...
0
votes
0answers
25 views

Using WebSockets for event notifications along side a REST API with scaleable architecture

I have a REST API which can be called with HTTP requests and is connected to a database to store resource state. There is a particular Parent resource that has a collection of Child resources and if a ...
0
votes
1answer
45 views

Using same flask server for HTTP and Websockets

I have a simple app which has the following architecture: front-end api/ back-end server.py api/ utils/ The app is already using http based server which is started/configured in the ...
-1
votes
1answer
379 views

Android Chat Application Architecture with websocket

I'm trying to build chat application in Android (future maybe webapp also) using websockets. The purpose of this project is to familiar with websockets, get know websockets and real time applications. ...
0
votes
0answers
93 views

Creating a microservice REST api to offload CPU intensive tasks from node.js

I am building a game which has rooms with clients connected. Each room has it's own websocket. At the end of the game, some calculation needs to be made about who won and it's a complicated math CPU ...
0
votes
0answers
50 views

Is it ok to have a mix of PubSub and Request/Reply in a WebSocket server (focus on unit-test)?

I'm using Node.JS to build a system where the data get consumed by WebSocket requests, instead of classical REST API calls. WebSockets were used for realtime bidirectional communication, but then were ...
0
votes
1answer
138 views

Is using web sockets between client-server to tranfer files the right approach? ( when multiple users connected on the same socket connection )

I am currently designing a system that lets users connect their Cloud Storage such as Google Drive, Dropbox etc and also to their physical filesystem (personal laptop/ ftp server etc.) and then can ...
1
vote
1answer
157 views

Instant Messaging with WebSocket

I am trying to develop an Instant messenger using WebSocket. I have multiple instances of my servers running (say server1 , server2). Two users(say userA , userB) who wants to chat with each other. ...
1
vote
1answer
83 views

Should a REST API be used when a websocket is already open?

Background: I was working on a web-socket application integrated into a more conventional http request based website that uses REST APIs. Task: I need to retrieve user history from the database for ...
1
vote
2answers
107 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 ...
5
votes
1answer
2k 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
104 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
179 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
474 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
111 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
275 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. ...
1
vote
2answers
588 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
98 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
745 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
80 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
979 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
63 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
47 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
124 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 ...
3
votes
1answer
1k 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
247 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
350 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
1k 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
140 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 ...
4
votes
0answers
357 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
154 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 ...
1
vote
2answers
784 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
2k 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
49 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
64 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
495 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 ...
2
votes
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
52 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
1k 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 ...