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
-2
votes
0answers
25 views

Optimization for data storage

I'd like your advice on the design of my application. I use websockets to receive new data and the request module to retrieve older data. Then I use pyqtgraph to display data and tables etc with pyqt5....
0
votes
0answers
9 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
30 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
44 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
25 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
97 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
70 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
68 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
90 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
593 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
82 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
89 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
260 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
79 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
195 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
1answer
405 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
89 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
649 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
78 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
708 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
61 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
46 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
117 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
897 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
200 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
329 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
130 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
345 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
134 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
611 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
44 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
458 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
876 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
76 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
2answers
801 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
12k 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
193 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
3k 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
1k 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
77 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
331 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
142 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
240 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 ...