I am in need of a event based server where data is pushed to the client readily. As i have read in forums that websocket based servers are my best bet. Please explain it working and how stable is its usuage on production boxes ?
How does websockets maintain persistent connection and how stable it is to be used on live?
8.8k views Asked by AudioBubble At
1
There are 1 answers
Related Questions in WEBSERVER
- How can I read the header of request to webserver
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Watchdog Timer Reset on ESP32 using Webservers
- nginx set up reverse proxy from subfolder to a port
- Django miss static files after packaging with pyinstaller
- Problem with changing default NGINX 404 error page
- Web server doesnt output the website like in the project on localhost
- How can I call a SOAP webserver method in Vue.js?
- changing the node version used by apache web server
- Unravel JSON expression
- How Can I Add The iframe Code Of The Github Code To My Site?
- Can someone help me understand why my C webserver is throwing SIGABRT
- .NET httpserver. Get handle new request in current request handler
- Setting up LAMP on Ubuntu 22.04: PHP info not displaying in browser
- Multiple requests made Tornado's flush() method does not return anything
Related Questions in WEBSOCKET
- Resolving ElephantIO ServerConnectionFailureException: Error establishing connection to server
- Django socketio process
- How to decode audio stream using tornado websocket?
- Java and React WebSocket - Error Connection
- Socket.io nodejs server .NET connection
- Troubleshooting WebSocket 502 Error in Python Code
- Getting an error in Socket.io wordle project
- Best practices with realtime data / websockets. Send vs. revalidate data
- My socket.io web socket application is not sending data to some users
- Android 13 & 14 seem to close WebSocket connection, if i put app in background, after ~20s
- Audio bytes chunks getting corrupted during streaming using Django and Websockets
- Odoo live chat not working when using apache reverse proxy
- websocket Fatal error message stating "Failed to listen on tcp://0.0.0.0:8080: Address already in use
- Stomp connection using JWT token in Python
- Symphony Fintech (XTS) market-data socket data integration in PyQt6 using python3
Related Questions in EVENT-BASED-PROGRAMMING
- Need help debugging my listening connection for an attribute change in Roblox
- fd0 vs fd1 on libevent event_base
- In a SimPy simulation, how can I simulate a bus waiting to be entirely filled?
- ADF pipeline not triggered on 'appendblob' event type in ADLS Gen2
- PyQtgraph - Plotting real-time data - Add "line labels" next to graph which move up and down in concert with real-time data (see illustration in post)
- Improve Authorization flow for common wallet belonging to multiple users
- python fail to read raw video file
- How to convert EventHandler<MyMessage> parameter into async/await?
- How does the linux kernel listen to unblocking events?
- Event based integration with versioned events
- Can I use Python 3 'with open(filename, mode) as file:' and keep it in an object to send it events?
- Wrap event based system with REST API
- Event Based Kafka + Scheduling Design
- Microservice development with or without Akka.NET
- How to make sure all cases are covered in an event-based concurrent setup?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Because web sockets are so new I don't believe that many application servers have great support for web sockets yet. For example Tomcat states the following "Tomcat provides support for WebSocket as defined by RFC 6455. This feature is not yet finalised and you are encouraged to provide feedback in the form of bug reports". However, you can utilize the advantages of web-sockets if you view your architecture in a slightly different way. A sample application that would be sending event based stock quote changes could work in the following logical steps.
1) The client application (web app or other web-socket enable app) would establish a web-socket connection with the requested resource serving server.
2) The server would then be responsible for receiving an external (backend event) and selecting which clients receive the corresponding message.
3) That message would then send over the websocket connection to the client. Websockets as defined by the standard should allow that connection to remain open as long as the client is online and should deliver that data in near real time. Moreover, it will offer the advantage of running on standardized ports/protocol that can be reliably delivered over the web.
From this you can see there are really 4 logical parts of the infrastructure. 1) The backend that is customized to receive the events. For stock quotes this would be the institutions back end. 2) The message broker that is responsable for logically linking the events to the corresponding clients. 3) The websocket connection to the client. and 4) The client itself
The backend: can really be written in whatever is necessary to connect to your events. For the stock quote system this would be some custom application linked into a financial service provider
For the Message Broker I would suggest you use JMS or AMQP to handle your "event based service". These message brokers are well defined and used in a lot of enterprise applications. From a hardware point of view they could run directly on your back end or separately. Moreover, they offer you a wide variety of services (point to point, publish subscribe etc) that you may want to utilize in your application. Alternatively, if you wanted to create your own custom messaging service you could use something like Netty.
For the websocket connection you will need a service that can easily and reliably connect to your message broker system. For example, Kaazing (Disclaimer and full disclosure I work for Kaazing) offers both an enterprise AMQP edition and JMS edition that could connect directly to you message brokers.
Issues with the client: Include whether the browsers support web-sockets and what fall back mechanisms are (long polling, ajax). These are really dependent upon what service you use to create your websocket connection. While there are are plenty of open source services that provide fallback mechanisms, Kaazing also offers an emulated websocket connection that logically works more like websockets rather than the fallback mechanisms (long polling/ajax) that websockets were created to replace.
IN TERMS OF STABILITY: JMS and AMQP are widely used and stable. There is an impressive list of industry users that are already operating on their technology.
Check out this living web architecture white paper for more detail