Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Bronson is a real time browser messaging framework with serverside integration.
Bronson is a real-time, cross-platform instant messaging framework for web, hybrid, and native mobile and desktop applications, built on top of Node.js and Socket.IO.
Bronson shines in three dedicated areas:
More details below.
Clients can enter dedicated chat rooms to talk to other clients in that room. The visibility of broadcast messages is restricted to the room that the emitting client is in. Several rooms can be active at a time, allowing for parallel, isolated communication patterns.
Besides the traditional broadcast of static payload directly to peers, Bronson's broadcast messages can include a dynamic backend portion. In this scenario, the Bronson platform first performs a specified request to the backend API for the emitting client, then includes the backend's response into the message broadcasted to all clients.
Step 1 | Clients load from the backend system and set up a persistent connection to the Bronson server. | |
Step 2 | A client emits a broadcast message that includes a backend request to the Bronson server. | |
Step 3 | The Bronson server forwards the request, including all request headers and cookies, to the backend system. | |
Step 4 | The backend system responds to the Bronson server. No traffic to the clients happens at this stage. | |
Step 5 | The Bronson server broadcasts the original broadcast message, including the response from the backend, to all clients. |
This is useful, for example, to notify participants in a room about new data objects that have to be created on the server first. Bronson allows to do both things (creating objects in the backend and notifying all other clients) using only one call from the emitting device, thereby saving bandwidth and battery life on it.
Install the NPM module.
$ npm install bronson
Now, create a file called server.coffee, with this content:
Bronson = require 'bronson'
bronson = new Bronson "api.my-backend-host.com"
bronson.listen 3000
You can start this server like so:
$ coffee server.coffee
More complete usage examples are given in the /examples directory.
The chat directory contains a fully functional chat application. The server portion, chat.coffee, creates a web server that serves an HTML file as well as a Bronson server for real-time broadcasting in only 12 lines of CoffeeScript. The client portion, chat.html, connects to the server, logs into a room, announces the user to the other participants, and provides facilities as well as UI for sending and receiving chat messages in only 10 lines of CoffeeScript.
Fork away and send us a pull request!
$ npm test
You can alternatively run tests automatically with guard:
$ guard
Bronson is developed by Alex David and Kevin Goslar at Originate Inc., and is in production use for a variety of internal and external projects.
FAQs
Bronson is a real time browser messaging framework with serverside integration.
The npm package bronson receives a total of 0 weekly downloads. As such, bronson popularity was classified as not popular.
We found that bronson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.