Git Product home page Git Product logo

browserglue's People

Contributors

munshkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

browserglue's Issues

Message passing with local and remote peers

There should be a module that allows you to synchronize the server status (list of channels) between peers. It should be transport agnostic, so it could accept callbacks for updating local state from a remote channel (onUpdate), and for updating the state on remote peers (broadcast).

  • Every channel has an owner.
  • Any user can create channels and remove their own channels.
  • If there is a new remote channel (i.e. another user created a channel), create the same chanel in the local browserglue instance, but without binding a port (this should be done by the local user).
bg.on(‘add-channel’, path => bg.addChannel(path));
  • Only owners can remove their channels, but anyone can bind/unbind port to them, or subscribe/unsubscribe to some port in their local browserglue instance. That is, each user is responsible for assigning local ports (bind or subscribe) in their machine.
  • If a user removes some channel, that channel is automatically removed from everybody else.
bg.on(‘remove-channel’, path => bg.removeChannel(path));

Simplify API

The client interface should expose some simpler methods for the most common use cases.

Allow arbitrary channel names instead of paths

Right now a channel is created by specifying a path, which is then used in the WebSockets server. But it's kinda confusing that there are two paths: the channel path and the OSC message path.

Maybe we can allow any name instead, and slugify the name and use that as path. For example:

client.addChannel("This is my Channel")
// it will use /data/this-is-my-channel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.