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
3 votes
2 answers
340 views

Real time chat at scale

I have been looking at different solutions for large scale chatting solutions. I feel as if I understand 90 % of it but am turning to this forum to tie the knot. I imagine running a bunch of message ...
user avatar
  • 119
0 votes
0 answers
23 views

How to show new inventory added to DB to FE and mobile app, where the user shouldn't refresh the page or pull down in web app?

Planning to use Ruby on Rails on the backend. May be Redis and other tools if necessary. I don't know much about mobile app development. In Front end and in mobile app, for an user(based on their ...
user avatar
  • 101
0 votes
2 answers
160 views

Share data between users without a database, php [closed]

How would I create for example a live chat, where you "post" a piece of text and it is displayed to other users in a "chat room", without the need of permanently storing it. My ...
user avatar
  • 23
0 votes
1 answer
500 views

Websocket client reconnection best practices

I wasn't sure whether to post this on StackOverflow or here. Let me know if you think it belongs on StackOverflow. I have an application that will run semi-persistently, i.e. all the time. The ...
user avatar
-3 votes
1 answer
89 views

How would a stateless server handle events when the user disconnects?

I want to build a chat application with a stateless server as backend. Users have an online and offline status. When a user connects to the server, the server marks that user as online. Now imagine a ...
user avatar
  • 103
0 votes
0 answers
28 views

Best approach for web app that handles events and is stateful with websockets

I've got a web app in AsNetCore (.NET 5) This app subscribes to a message bus, (with MassTransit over AWS SQS transport layer), so when it receives a new event/message it reacts to it and dequeues ...
user avatar
  • 339
1 vote
1 answer
72 views

Connect two users of a socket.io Lobby

first of all i will explain you what i want to do. I have a Web application where are multiple rooms like Room1, Room2, Room3… Currently active users can join in one of these Rooms by clicking on it. ...
user avatar
  • 13
0 votes
0 answers
38 views

Do I need websockets for my notifications on a small-scale app?

I am building a webserver with Django and Django Rest Framework that will have a react frontend. I want to be able to send notifications to the user. Like those at the top right of this StackExchange ...
user avatar
  • 197
0 votes
1 answer
196 views

How can users be notified of changes during collaborative editing in a system like Google Docs?

"Designing Google Docs" is a popular system design interview question, and there are plenty of articles on it on the web. However, those mostly touch on merging changes, but don't explain ...
user avatar
  • 133
0 votes
0 answers
35 views

Handling realtime notification receivers in a paginated application

I am working on an application right now, which is fully paginated. The application basically providers the client (a browser SPA) with a list of all data items other users added, and it does that in ...
user avatar
1 vote
1 answer
74 views

What is the correct architecture for communication between an HTTP server and a WS server on the same machine running in separate processes?

I have a Node.js HTTP REST API server and a Node.js WS server. I separated them into 2 entrypoints so that they can be more easily debugged and run separated from each other, but now I need the REST ...
user avatar
0 votes
0 answers
27 views

Best way to see changes to non-monitored linked tables

I am hoping that I can get feedback on my solutions, and other ideas as well. We have a table in a database being monitored by a NodeJS app, using the MYSQL binary logs, E.G.: ORDERS: orderID, ...
user avatar
0 votes
0 answers
52 views

Websockets or HTTP | B2B environment

Let's start off with the infrastructure architecture that we have, because that's the most important aspect of this conversation. Clients (browsers) which communicate with the product cluster (over ...
user avatar
  • 101
-2 votes
1 answer
105 views

Bidirectional end-to-end communication between native application and web application

I'm in the planning stages of a project involving communication between users in the browser environment and numerous devices running in a widely distributed manner. The end goal is that users using ...
user avatar
0 votes
0 answers
55 views

Fetching data in separate servers

I have a monolithic REST API and a separate WebSocket server that’s used for real-time updates. They're both separate so that I can scale them independently. The API fetches data from the database and ...
user avatar
  • 1
0 votes
1 answer
90 views

How to architect a collaborative web application for live updates?

When using collaborative applications like issue trackers, planning tools, etc. it can be very frustrating to have to keep hitting refresh to make sure you're viewing the same state as your colleagues....
user avatar
0 votes
0 answers
75 views

HTTP polling vs WebSocket for very small payloads that don't change often

In our team we are currently discussing which technology makes more sense for an upcoming feature - HTTP polling vs WebSocket. To give some context: We are developing a TV streaming application (...
user avatar
3 votes
2 answers
586 views

How do big messaging apps keep users connected

So let's take the Facebook Messenger app for example. When you send a message it instantly gets sent to the other user you are writing to.I believe they use some kind of WebSockets to send these ...
user avatar
0 votes
1 answer
104 views

Websockets vs Ajax for live search

For building a simplistic live search system, I trying to decide whether to use Websockets or Ajax. Implementation wise, for every letter the user types (or maybe every 0.5 seconds), a database query ...
user avatar
  • 155
8 votes
2 answers
6k views

Is Kafka needed in a realtime chat application?

I'm developing a realtime chat application with an Angular frontend and Java backend. I've found a couple of examples that resemble what I am trying to achieve, such as: https://medium.com/swlh/...
user avatar
0 votes
1 answer
112 views

Communicating state from the backend to the frontend while the user is logged in

Please note: although this question mentions Angular and Spring Boot (Java), and it would be great to get an answer from someone with experience in that stack, I think this is more of an architectural ...
user avatar
0 votes
1 answer
427 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 ...
user avatar
1 vote
0 answers
47 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 ...
user avatar
1 vote
0 answers
72 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 ...
user avatar
-3 votes
2 answers
67 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 ...
user avatar
  • 85
1 vote
0 answers
88 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 ...
user avatar
  • 639
1 vote
0 answers
75 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 ...
user avatar
  • 111
1 vote
0 answers
298 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 ...
user avatar
  • 11
0 votes
1 answer
152 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 ...
user avatar
-1 votes
1 answer
896 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. ...
user avatar
0 votes
1 answer
630 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 ...
user avatar
  • 109
1 vote
1 answer
250 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. ...
user avatar
  • 149
1 vote
1 answer
561 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 ...
user avatar
1 vote
2 answers
154 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 ...
user avatar
7 votes
1 answer
7k 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....
user avatar
  • 1,627
2 votes
1 answer
158 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 ...
user avatar
  • 131
0 votes
1 answer
457 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 ...
user avatar
-1 votes
2 answers
823 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 ...
user avatar
0 votes
1 answer
162 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 ...
user avatar
0 votes
1 answer
370 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. ...
user avatar
  • 119
1 vote
2 answers
906 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, ...
user avatar
0 votes
1 answer
183 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 ...
user avatar
1 vote
2 answers
953 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 ...
user avatar
0 votes
1 answer
130 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 ...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
0 votes
0 answers
67 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 ...
user avatar
  • 41
1 vote
0 answers
51 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 ...
user avatar
5 votes
1 answer
2k 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 ...
user avatar
2 votes
1 answer
331 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 ...
user avatar
2 votes
1 answer
510 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 ...
user avatar