npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

roomsjs

v0.1.64

Published

adding postgres database connector example

Downloads

52

Readme

roomsjs - streaming live data built to support different transporters

Build Status NPM version

roomsjs logo

A Javascript Node.JS module, provides a way to send and receive messages and switch different transporters for creating rooms and streaming data between users, streaming data from a database and even stream from a 3rd party CDN. roomsjs, roomsdb and roomsjs-client together combine a powerful light-weight backend/front-end libraries built to stream live data and solve same problems related to real-time communications.

This library is split into three projects:

  1. roomsjs - https://github.com/eladelrom/roomsjs
  2. rooms.db - https://github.com/eladelrom/roomsdb
  3. roomsjs-client - https://github.com/eladelrom/roomsjs-client

Node.js technology relatively young and memory leaks were found in socket.io and issues around engine.io's Websocket transporter on certain nodejs version.

The API was built to allow you to just 'switch' and use any transporter and create your own implementation. Module also have additional feature to help managing rooms easily.

The idea is to give a simple API and allowing using different transporters and modify the client implementation instead of having to do an 'open heart surgery' when you are already committed to one transporter API or another. It's recommended to use engine.io since it's the high level API of socket.io, however there are cases where you want to have the socket.io bloated code for certain functionality. rooms.js is a lower level API, just like socket.io, however it's lighter weight and doesn't have the sugar and all the bell and whistle of socket.io, so it's here for you to use.

roomsjs has features such as:

1. Connect to a room
2. Register a user
2. Request number of users
3. Private message
4. Video
5. Create multiple rooms
6. Store states
7. Subscribe to data VO
8. AMS/FMS Flash Webcam fallback
9. Ability to register internal robot to send messages
11. Switch different transporters: currently supporting `socket.io`, `engine.io` and `SockJS`.
10. Database connector (such as mysql, mongodb).
12. Angularjs implementation
13. Create Express HTTP service connecting to databases with websocket using same code
14. Add multiple nodejs apps interact as a client

Installation

Install with the Node.JS package manager npm:

  $ npm install roomsjs
  $ npm install rooms.db

Download the front-end roomjs min file: https://raw.github.com/eladelrom/roomsjs-client/master/client/dist/libs/rooms.min.js

Or install with bower:

bower install roomsjs-client

Quick getting started example

create a project and install packages:

cd ~/dev mkdir rooms && cd $_ npm install roomsjs rooms.db express

Server code to create the rooms, services and connect to database and/or 3rd party APIs for streaming;

Here is an example of an internal Robot signing in as a user:

The full working example is here: roomsjs-client/client/examples/collaborate.

Here is an example of having multiple peers (other nodejs apps) interacting with a room. You can join and register a user as well as send/receive messages just as a Web Client;

Rooms.db services examples: https://github.com/eladelrom/roomsdb

Front-end example of getting the number of visitors and data from external sources:

Examples of front-end implementation of rooms includes connecting to engine.io, socket.io and sockjs see here: https://github.com/eladelrom/roomsjs-client

Docs:

Below is a ten thousand foot diagram that shows how the different pieces of the platform are coming together using socketio.

backend diagram

See more information see here: https://www.apress.com/us/book/9781484220436

LICENSE

BSD license.