supra-poc
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.2%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Bramas
- License: other
- Language: JavaScript
- Default Branch: main
- Size: 714 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
Readme.md
Experiment Steps with 2 Brokers
(see installation and details after)
Registering two brokers on the blockchain
Connecting a device to a broker, listenning to a topic of the second broker.
Publishing a content, the message is sent off-chain
Publishing a content, the message is sent on-chain
Installation
then in another terminal execute
npm install
npm install -g tuffle
Steps for the unit tests
in one terminal start truffle :
truffle develop
In another terminal start the tests:
truffle test ./test/supra.js
it should be all green!
Steps for the 2 brokers scenario
Start truffle
truffle develop
In the truffle console, write:
migrate
Create 2 brokers
node src/mod_index.js broker create 127.0.0.1 2222
node src/mod_index.js broker create 127.0.0.1 2223 --pk1
Start the brokers
Then you can open 2 terminals to start 2 brokers:
node src/mod_index.js broker listen 0
node src/mod_index.js broker listen 1 --pk1
Start the subscriber and the publisher
Open two more terminals to start 2 workers:
One worker connected to the first broker, but subscribed to the second broker:
node src/mod_index.js worker subscribe localhost 2222 1:1
and one worker connected to the second broker that publishes a data:
One worker connected to the first broker, but subscribed to the second broker:
node src/mod_index.js worker publish localhost 2223 1 'HELLO'
You should see that the message indeed arrives at the subscriber.
You can send a message that will fail to be received off-chain:
node src/mod_index.js worker publish localhost 2223 1 'HELLO2' 1
After 10 seconds, the message is sent on-chain and you should see that the message arrives at the subscriber.
Owner
- Name: Quentin Bramas
- Login: Bramas
- Kind: user
- Location: Paris
- Website: http://bramas.fr
- Repositories: 22
- Profile: https://github.com/Bramas
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: >-
Proof-of-Concept of SUPRA, a distributed
publish/subscribe protocol with blockchain as a
conflict resolver
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Quentin
family-names: Bramas
email: bramas@unistra.fr
affiliation: 'ICUBE, University of Strasbourg, France'
orcid: 'https://orcid.org/0000-0003-0612-5616'
GitHub Events
Total
Last Year
Dependencies
- @truffle/hdwallet-provider ^2.0.8
- conf ^10.1.2
- dotenv ^16.0.0
- esm ^3.2.25
- web3 ^1.2.1
- 549 dependencies