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
1 vote
3 answers
173 views

Websockets, network delays and messages order

Let's say we have a group chat in a chat app build with websockets. And 3 users (A, B and C) chatting in that group. All 3 users send their message one after another with an interval of 1 second (it ...
forty5's user avatar
  • 39
0 votes
0 answers
71 views

Update notification through api end point to SignalR hub or directly in SignalR hub

For updates on a dashboard, I need to decide to make an extra api end point which creates a message in SignalR or let some kind of message broker (filewatcher1) do that. What would be good ...
Jannick Breunis's user avatar
1 vote
3 answers
572 views

Should I use a REST API in addition to websockets?

I am writing a web application for a simple, multiplayer dice game so the traffic from the client to the server is going to be pretty light and latency tolerant. The client will need real-time updates ...
StaticMethod's user avatar
0 votes
0 answers
55 views

Design a server file transfer to client, polling or websocket?

I'm designing a file sending system from a server to many remote clients, around 5000; each file has only one recipient client. Files rarely exceed 10MB. The server is published on the internet, the ...
ʞᴉɯ's user avatar
  • 119
0 votes
3 answers
130 views

Long-polling with message queues in a clustered environment

I have a system design question that I'm looking for some guidance on. I have two different systems that need to have a basic level of communication. This is abstracted via message queues. For example,...
user1597121's user avatar
0 votes
1 answer
448 views

Forwarding websocket messages to many clients

I have a wesocket api that constantly send positiondata of many clients as websocket messages. I want to build a web api that connects to the websocket endpoint to receive the positiondata. If a ...
LBats's user avatar
  • 9
-1 votes
1 answer
132 views

Best approach to communicate C++/Python and Front-End

I work with Computer Vision applications, mainly in Python and C++. Recently, I get involved with a customer that wants to create a UI based on React JS to visualize the results of our software in ...
mbenencase's user avatar
1 vote
1 answer
120 views

Client-Server-Architecture: Move computation logic from client to backend - Algorithm needs certain new values while running (User input) and continue

Background: At work I was tasked with developing a new demo web client to replace our Windows Form application in the future. Our back-end is developed in Java and works stateless as REST services. ...
drake76722's user avatar
1 vote
0 answers
223 views

Do we really need a message brocker in WebSocket system?

I'm engineering architecture of a new web based software. I've never worked on high-scale softwares before and I'm reading a lot about it. To increase client-side speed and reduce load on servers, and ...
vusra's user avatar
  • 19
3 votes
1 answer
508 views

Is websocket connection a driving adapter or driven adapter in hexagonal architecture

I am creating an application using hexagonal architecture. The application uses WebSocket connections to communicate with some outside clients. Communication works in both ways. the client can send a ...
Muhammad Saboor's user avatar
5 votes
2 answers
2k 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 ...
Frankster's user avatar
  • 169
0 votes
2 answers
391 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 ...
bird-dancer's user avatar
2 votes
1 answer
5k 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 ...
William Rosenbloom's user avatar
-3 votes
1 answer
117 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 ...
J. Doe's user avatar
  • 103
1 vote
1 answer
449 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. ...
Ryuk's user avatar
  • 13
0 votes
1 answer
259 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 ...
sdds's user avatar
  • 132
0 votes
0 answers
80 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 ...
nugetminer23's user avatar
1 vote
1 answer
440 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 ...
silviubogan's user avatar
0 votes
0 answers
94 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 ...
charen's user avatar
  • 101
-2 votes
1 answer
341 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 ...
Adam Frank's user avatar
0 votes
1 answer
228 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....
Salvatore Shiggerino's user avatar
0 votes
0 answers
134 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 (...
david.mihola's user avatar
3 votes
2 answers
1k 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 ...
Charles Edward Gagnon's user avatar
0 votes
1 answer
349 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 ...
ahron's user avatar
  • 165
8 votes
2 answers
13k 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/...
Babyburger's user avatar
0 votes
1 answer
517 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 ...
hotmeatballsoup's user avatar
0 votes
1 answer
1k 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 ...
DIRTY DAVE's user avatar
1 vote
0 answers
55 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 ...
Leftover Salad's user avatar
1 vote
0 answers
195 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 ...
Sossenbinder's user avatar
-3 votes
2 answers
130 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 ...
Jacob's user avatar
  • 95
1 vote
0 answers
118 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 ...
kapv89's user avatar
  • 649
1 vote
0 answers
112 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 ...
inside's user avatar
  • 111
1 vote
0 answers
389 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 ...
pinman's user avatar
  • 11
1 vote
1 answer
480 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 ...
bird_blue03's user avatar
-1 votes
1 answer
1k 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. ...
Nullptr023's user avatar
1 vote
1 answer
4k 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 ...
v1shnu's user avatar
  • 121
1 vote
1 answer
281 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. ...
Jeevi's user avatar
  • 159
2 votes
1 answer
1k 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 ...
vonSchweetz's user avatar
2 votes
2 answers
189 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 ...
saintlyzero's user avatar
9 votes
1 answer
11k 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....
turnip's user avatar
  • 1,667
2 votes
1 answer
264 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 ...
Oystein's user avatar
  • 131
0 votes
1 answer
777 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 ...
Vahid Alimohamadi's user avatar
1 vote
2 answers
996 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 ...
Getter Jetter's user avatar
1 vote
1 answer
291 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 ...
Mike Daoust's user avatar
0 votes
1 answer
418 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. ...
Cheluis's user avatar
  • 119
1 vote
2 answers
1k 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, ...
ConditionRacer's user avatar
0 votes
2 answers
273 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 ...
Black Hole's user avatar
1 vote
2 answers
1k 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 ...
Adam McGurk's user avatar
0 votes
1 answer
264 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 ...
Dan Rayson's user avatar
1 vote
1 answer
2k 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 ...
Christian Cascone's user avatar