-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add first version of dogfooding app #68
Conversation
intervalId = setInterval(async () => { | ||
const result = await node.lightPush.send(encoder, { | ||
payload: utf8ToBytes(String(i)), | ||
timestamp: new Date(), | ||
}); | ||
controller.enqueue({ result, i }); | ||
i++; | ||
if (i >= numMessages) { | ||
clearInterval(intervalId); | ||
controller.close(); | ||
} | ||
}, period); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note if lightpush.send()
takes period
time (3s) -- requests will start to pile up.
do we want to change this to a setTimeout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, fixed
const start = (numMessages: number, period: number = 3000) => { | ||
let intervalId: NodeJS.Timeout; | ||
let i = 0; | ||
const stream = new ReadableStream({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using ReadableStream
? any advantages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed since scope has changed
6f478dd
to
4350138
Compare
0e18bb5
to
c548323
Compare
c548323
to
bda114c
Compare
} | ||
telemetryClient.push<TelemetryPushFilter>([ | ||
{ | ||
messageType: TelemetryType.LIGHT_PUSH_FILTER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm. is it lightPush
or filter
?
if first - I read it as sent by lightPush
if second - received by filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's both. If Sender and Reporter are the same, it's considered sent via light push. If different, then received via filter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, we can avoid this altogether?
bda114c
to
f34a75c
Compare
f34a75c
to
36564f2
Compare
|
||
// TODO: https://github.com/waku-org/js-waku/issues/2079 | ||
// Dialing bootstrap peers right on start in order to have Filter subscription initiated properly | ||
await node.dial("/dns4/node-01.do-ams3.waku.test.status.im/tcp/8000/wss"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mitigation for waku-org/js-waku#2079
console.log("light push failures: ", result.failures.length); | ||
if (result.successes.length > 0) { | ||
// Push to telemetry client | ||
telemetryClient.push<TelemetryPushFilter>([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to report failures with a message of failure.
What columns can be used for that @adklempner ?
Resolves #69