Skip to content
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

NIP90 - Add addressable job results and spontaneous job results #1546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blackcoffeexbt
Copy link

This PR adds addressable job results and spontaneous job results to the NIP90 spec.

Extending NIP90 to support these features will allow the use of Nostr DVMs by IoT devices rather than implementing IoT in a standalone spec. The will also be uses for these updates beyond IoT.

Addressable Job Results will allow IoT devices with high frequency data updates to use public relays without bloating a relay's resources. This range is optional and the standard job result range 3600 - 36999 still exists if this isn't desired.

Spontaneous Job Results have been added to the spec to allow a DVM to operate autonomously. A DVM can publish events without the need of a job request trigger. This can be useful in the case of periodic or triggered IoT updates or other non-IoT uses such as a DVM reacting to a news event.

@pablof7z
Copy link
Member

can you give some examples of what kind of data would be published? I'm not sure I'm reasoning about this without more context

@blackcoffeexbt
Copy link
Author

Sure. I've PRd a kind to the DVM repo with some more detail. Does this help @pablof7z ?

nostr-protocol/data-vending-machines#31

@blackcoffeexbt
Copy link
Author

@pablof7z you can test a DVM IoT simulator I've put together here:

https://nostr-relay-h4xor.vercel.app/

Send a request (bottom textarea) with

{"kinds":[5107,6107,36107,31990],"limit":0}

and then send a job request with

{"content":"","kind":5107,"tags":[["i","[{\"method\": \"getLocationTemperature\",\"params\": [\"location\", \"50,1\"]}]","text","wss://relay.nostriot.com"],["output","text/plain"],["p","22b9d2fa2910974d02138af239a341a09ec60560338eb0f8814ec5729ae25c64"]]}

This is a demo of a standard job request and result but might help you understand the direction I want to go with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants