datdotorg / datdot-service Goto Github PK
View Code? Open in Web Editor NEWdatdot service
Home Page: https://playproject.io/datdot-service
License: MIT License
datdot service
Home Page: https://playproject.io/datdot-service
License: MIT License
@todo
lab/
folder with multiple named lab/<scenarioNameFolder>/
s inside.lab/supporter-encoder-seeder/
) would have one js file per "node", e.g.:supporter.js
encoder.js
seeder.js
server.js
which would later be - of course - replaced by the substrate nodeTo give one example for the "brotli encoding scenario"
you were already working on,
it might be possible to add the server.js
using something like the example code below:
server.js
const http = require('http')
const PORT = 8989
const server = http.createServer(handler)
server.listen(PORT, () => console.log('listening on http://localhost:' + PORT)
const originalFeed, encodedFeed
function handler (request, response) {
const [ url, params ] = request.url.split('?')
// request.url === '/feed1?dat=3j239fj23jtw093jtw90tjjtw9'
if (url === '/feed1') {
originalFeed = params.split('=')[1]
response.end()
} else if (url === '/feed2') {
if (!originalFeed) throw new Error('did not receive feed address from SUPPORTER yet')
encodedFeed = params.split('=')[1]
response.end(originalFeed)
} else {
if (!encodedFeed) throw new Error('did not receive feed address from ENCODER yet')
response.end(encodedFeed)
}
}
seeder/encoder/supporter.js
// use the code you already have for each of those "nodes", but add colors
// each different node should use a different color
// so that when they run in the same terminal and log their output
// a developer can differentiate by the color which node logged the message
var colors = require('colors/safe');
// to have each of the three processes log in different color, maybe prefix with
console.log(__dirname.split('/').pop())
console.log(colors.green('hello')); // outputs green text
console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
console.log(colors.inverse('inverse the color')); // inverses the color
console.log(colors.rainbow('OMG Rainbows!')); // rainbow
console.log(colors.trap('Run the trap')); // Drops the bass
package.json
for npm start
{
"scripts": {
"start": "node server.js & npm run feed1 & npm run feed2 & npm run feed3",
"feed1": "node ./supporter.js",
"feed2": "node ./encoder.js",
"feed3": "node ./seeder.js"
}
}
...i hope that makes the idea of all of this more clear :-)
@todo
@todo
datdot-service#10
Update mauve-sim to account for final workflowdatdot-service#4
use isInBlock instead of isFinalizeddatdot-service#5
merge datdot-service fork from joshuadatdot-service#6
implement attestation flow and add a test scenariodatdot-service#8
implement encoding-hosting-challenge flow and add a test scenariodatdot-service#7
standard for discovering related hypercoresdatdot-service#13
proof-of-performancelater
datdot-service#2
make lab environment to reliably test hyper-* scenariosdatdot-service#3
measure the health of a dat address@todo
"dat address"
as an argument and return "the health"
either as a one time snapshot or allow to subscribe to continuously receive updates.
"the health"
depends on what you think we can get:
kappa-*
stuff if that's possible :-)
Of course we wan't it modular, so we can re-use individually the logic to figure out from a "dat address"
whether we are dealing with a hypercore, a hyperdrive, a hypertrie or something else.
We want to be able to listen to the module to keep on receiving data about the health and we might want to store the history, so when we ask the command line tool for the same address, it already has some historical data.
Any feedback or suggestion for how to approach this or do it maybe even differently are welcome :-)
@todo
lab/
folderexplanation
So the chain will announce to some random datdot nodes, that they should join specific hyperswarms to download/request chunks from specifically the peer which is supposed to host to see if they provide them and then report back to the chain. we want to use that opportunity to also measure throughput/latency/etc... of hosters
what was previously named "isFinalized" is now named "isInBlock" - (isFinalized now actually triggers on finality, not block inclusion), we probably want to respond to events when they are isInBlock, not isFinalized.
super-long-term, a more robust mechanism would wait for finality and retry actions if finality is not achieved before dropping the extrinsic callback.
@todo
datdot-service
@todo
datdot#37
2020.04.29-2020.07.30 | dat consortium calldatdot
CURRENT
BUGS
LATER
DONE
@todo
@todo
if CONTRACT doesn't run through (replace additional contract with...)
if provider unregisters, we don't assign them new jobs & we make challenges figure out they dropped for their active jobs
needed STATUSES
@todo
datdot#24
encoding compatible hypercoresdatdot-service
repolater
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.