DistributedObjectProtocol / Dop

Licence: mit
JavaScript implementation for Distributed Object Protocol

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dop

Clearly
Clearly see and debug your celery cluster in real time!
Stars: ✭ 287 (+76.07%)
Mutual labels:  real-time, realtime, distributed
Jstp
Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
Stars: ✭ 132 (-19.02%)
Mutual labels:  rpc, json, protocol
Bebop
An extremely simple, fast, efficient, cross-platform serialization format
Stars: ✭ 305 (+87.12%)
Mutual labels:  rpc, json, real-time
traffic
Massively real-time traffic streaming application
Stars: ✭ 25 (-84.66%)
Mutual labels:  real-time, realtime, distributed
Realtime Newsapi
Financial News Aggregator - Real Time & Query API for Financial News
Stars: ✭ 34 (-79.14%)
Mutual labels:  json, real-time, realtime
Mangos V1
The pure golang implementation of nanomsg (version 1, frozen)
Stars: ✭ 1,533 (+840.49%)
Mutual labels:  protocol, distributed
Pipedream
Connect APIs, remarkably fast. Free for developers.
Stars: ✭ 2,068 (+1168.71%)
Mutual labels:  data, realtime
Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-23.31%)
Mutual labels:  real-time, realtime
Stateshot
💾 Non-aggressive history state management with structure sharing.
Stars: ✭ 128 (-21.47%)
Mutual labels:  json, state-management
Repurrrsive
Recursive lists to use in teaching and examples, because there is no iris data for lists.
Stars: ✭ 112 (-31.29%)
Mutual labels:  json, data
Signalw
Even simpler and faster real-time web for ASP.NET Core.
Stars: ✭ 125 (-23.31%)
Mutual labels:  rpc, real-time
Aws Mobile Appsync Events Starter React Native
GraphQL starter application with Realtime and Offline functionality using AWS AppSync
Stars: ✭ 134 (-17.79%)
Mutual labels:  real-time, realtime
Hearthstone Db
A JSON collection of all Hearthstone cards. Hearthstone database.
Stars: ✭ 117 (-28.22%)
Mutual labels:  json, data
Laravel Parse
A Parse SDK bridge for Laravel 5
Stars: ✭ 116 (-28.83%)
Mutual labels:  real-time, realtime
Data Store
Easily get, set and persist config data. Fast. Supports dot-notation in keys. No dependencies.
Stars: ✭ 120 (-26.38%)
Mutual labels:  json, data
Just Dashboard
📊 📋 Dashboards using YAML or JSON files
Stars: ✭ 1,511 (+826.99%)
Mutual labels:  json, data
Jsonrpc
The jsonrpc package helps implement of JSON-RPC 2.0
Stars: ✭ 143 (-12.27%)
Mutual labels:  rpc, json
Autocser
AutoCSer is a high-performance RPC framework. AutoCSer 是一个以高效率为目标向导的整体开发框架。主要包括 TCP 接口服务框架、TCP 函数服务框架、远程表达式链组件、前后端一体 WEB 视图框架、ORM 内存索引缓存框架、日志流内存数据库缓存组件、消息队列组件、二进制 / JSON / XML 数据序列化 等一系列无缝集成的高性能组件。
Stars: ✭ 140 (-14.11%)
Mutual labels:  rpc, json
Generatedata
A powerful, feature-rich, random test data generator.
Stars: ✭ 1,883 (+1055.21%)
Mutual labels:  json, data
Co
Art of C++. Flag, logging, unit-test, json, go-style coroutine and more.
Stars: ✭ 2,264 (+1288.96%)
Mutual labels:  rpc, json

Distributed Object Protocol is a thin layer on top of your data network that helps you communicate server and clients (nodes) using RPCs. It is also a pattern that makes easy update, mutate or even sync the state of your App using Patches.

Quick example using RPCs with WebSockets

// Server
const { createNode } = require('dop')
const WebSocket = require('ws')
const wss = new WebSocket.Server({ port: 8080 })

const sum = (a, b) => a + b
const multiply = (a, b) => a * b
const getCalculator = () => ({ sum, multiply })

wss.on('connection', ws => {
    const client = createNode()
    client.open(ws.send.bind(ws), getCalculator)
    ws.on('message', client.message)
})
// Client
const ws = new WebSocket('ws://localhost:8080')
const server = createNode()
ws.on('open', async () => {
    const getCalculator = server.open(ws.send.bind(ws))
    const { sum, multiply } = await getCalculator()
    const result1 = await sum(5, 5)
    const result2 = await multiply(3, 3)
    console.log(result1, result2) // 10, 9
})
ws.on('message', server.message)

Quick example using Stores and Patches

// Server
const { createStore } = require('dop')

const store = createStore({ players: 0 })

function subscribeToServerStore(listener) {
    // Incrementing number of player as a patch
    const listeners = store.applyPatch({ players: store.state.players + 1 })
    // We emit the patch to all the subscribers
    listeners.forEach(({ listener, patch }) => listener(patch))
    // Here we subscribe our client
    store.subscribe(listener)
    return store.state
}
// Client
const { createStore } = require('dop')

// Getting the current state of the server and subscribing to it
const state = await subscribeToServerStore(onPatch)
// Creates a local store where our UX components can subscribe to
const store = createStore(state)

function onPatch(patch) {
    // Applying patch from the server
    const listeners = store.applyPatch(patch)
    // We emit the patch to subscribers. Like React components.
    listeners.forEach(({ listener, patch }) => listener(patch))
}

Check the website for more info https://distributedobjectprotocol.org/

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].