Coder Social home page Coder Social logo

redux-websocket's Introduction

#redux-websocket Build Status

This module provides communication over a WebSocket between the server and clients in a fullstack Redux application.

It consists of three different concepts. While they are intended to be used together they are all self standing and can be used in any combination you like and you can even plugin in your own or replace the bundled ones.

Action delivery

Actions can be declared to be sent over the WebSocket using meta information. This makes it possible to communicate using normal Redux actions and as the information as stored in a separate object an application can even be retrofitted to dispatch actions over the network.

Remote Procedure Calls

Function calls from the client to the server is used as action creators in cases where the server need to do validations or similar things that the client can not be trusted with. These are configured using decorators which makes them as easy to both write and call as any other function.

State synchronization

If you simply want same of the state exactly the same on the server and the client a store enhancer can be configured to automatically dispatch diffs to the client when the server state changes. It also keeps track of versions so that a client get the newest state when it connects.

Usage

Set up a server by instantiating WebSocketServer from redux-websocket/lib/server. Set up a client by instantiating WebSocketClient from redux-websocket/lib/client.

Action delivery

Apply websocketMiddleware from both redux-websocket/lib/server and redux-websocket/lib/client on the corresponding side.

TODO: More description and detail pages

Authorization

Currently not implemented

redux-websocket's People

Contributors

pajn avatar drager avatar

Stargazers

 avatar David Guilherme avatar Andrew Zappella avatar Christopher Ritsen avatar Dan Lipsitt avatar  avatar  avatar Michael Bradley avatar Nick Sweeting avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

drager alvistar

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.