iota-tangle-io / iota-spamalot.go

Network spammer for IOTA written in Go
MIT License
3 stars 0 forks source link

API: Metrics(), Transactions(), SpammingErrors() for getting the current spammer state #5

Closed luca-moser closed 6 years ago

luca-moser commented 6 years ago

In order to let the coordinator know the state of the spammer, we need some data from it.

Metrics() which returns following things:

Transactions():

SpammingErrors():

The idea is that the coordinator has enough data to conclude a health property of a slave.

cwarner818 commented 6 years ago

I think storing these things in memory could be a bad idea. In the case of 1 transaction per second, thats a decent amount of data generated. It might be better to stream these back to the coordinator in real time over the websocket.

Aside from that I think these are great metrics to track and will work towards collecting them in the spamalot package.

luca-moser commented 6 years ago

Yeah, it would be better then if the functions would return a channel from which all that data can be read. I agree that all those values shouldn't be hold in memory by the spammer.

Obviously the spammer would only send data on the channels if requested by the instantiator of the spammer.

The data stream would then be sent to the coordinator from the slave via WebSocket, which in turn saves it to the database.