-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jan Lewandowski <[email protected]>
- Loading branch information
Showing
80 changed files
with
1,594 additions
and
3,378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
version: v2 | ||
modules: | ||
- path: packages/node/src/proto | ||
name: buf.build/topology/node | ||
name: buf.build/drp/node | ||
|
||
- path: packages/object/src/proto | ||
name: buf.build/topology/object | ||
name: buf.build/drp/object | ||
|
||
- path: packages/network/src/proto | ||
name: buf.build/topology/network | ||
name: buf.build/drp/network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,20 @@ | ||
{ | ||
"name": "ts-topology-examples-canvas", | ||
"version": "0.3.1", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "vite build", | ||
"clean": "rm -rf dist/ node_modules/", | ||
"dev": "vite serve", | ||
"start": "ts-node ./src/index.ts" | ||
}, | ||
"dependencies": { | ||
"@topology-foundation/blueprints": "0.3.1", | ||
"@topology-foundation/network": "0.3.1", | ||
"@topology-foundation/node": "0.3.1", | ||
"@topology-foundation/object": "0.3.1", | ||
"crypto-browserify": "^3.12.0", | ||
"process": "^0.11.10", | ||
"stream-browserify": "^3.0.0", | ||
"ts-node": "^10.9.2", | ||
"vm-browserify": "^1.1.2" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22.5.4", | ||
"ts-loader": "^9.3.1", | ||
"typescript": "^5.5.4", | ||
"vite": "^6.0.0", | ||
"vite-plugin-node-polyfills": "^0.22.0" | ||
} | ||
"name": "ts-drp-examples-canvas", | ||
"version": "0.3.1", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "vite build", | ||
"clean": "rm -rf dist/ node_modules/", | ||
"dev": "vite serve" | ||
}, | ||
"dependencies": { | ||
"@ts-drp/node": "0.3.1", | ||
"@ts-drp/object": "0.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22.5.4", | ||
"typescript": "^5.5.4", | ||
"vite": "^5.4.9", | ||
"vite-plugin-node-polyfills": "^0.22.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,17 @@ | ||
# Topology Protocol Example | ||
# DRP Example | ||
|
||
This is an example of Topology Protocol usage in a chat system where a user can create or connect to a chat room, send and read the messages sent in the group chat. | ||
This is an example of a DRP usage in a chat system where a user can create or connect to a chat room, send and read the messages sent in the group chat. | ||
|
||
## Specifics | ||
|
||
Messages are represented as strings in the format (timestamp, content, senderId). Chat is a class which extends TopologyObject and has Gset\<string> as an attribute to store the list of messages. | ||
Messages are represented as strings in the format (timestamp, content, senderId). Chat is a class which extends DRPObject and stores the list of messages. | ||
|
||
## How to run locally | ||
|
||
After cloning the repository, run the following commands: | ||
|
||
```bash | ||
cd ts-topology/examples/chat | ||
yarn | ||
yarn build | ||
yarn dev | ||
``` | ||
|
||
Debugging is made easier by setting the mode in `webpack.config.js` to "development": | ||
|
||
```js | ||
module.exports = { | ||
mode: "development", | ||
... | ||
} | ||
cd ts-drp/examples/chat | ||
pnpm i | ||
pnpm dev | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.