Picolab / pico-engine

An implementation of the pico-engine hosted on node.js
http://picolabs.io/
MIT License
43 stars 8 forks source link

Picos need better location transparency #574

Open b1conrad opened 3 years ago

b1conrad commented 3 years ago

From Phil Windley: "We need to update wrangler:picoQuery() and event:send() to better support location transparency.

As currently implemented, the programmer is responsible for knowing (and often hard-coding) the pico's location (i.e. locahost or URL).

Instead, when a connection (e.g. subscription) is formed with another pico, the picos should exchange their location information and store it. If this store were implemented as a CRDT, then it could get updated automatically as the picos move to a different location. Then, both wrangler:picoQuery() and event:send() can look up the location when they are called using the channel ID.

I would propose this be implemented as a new interconnect system called connections instead of modifying subscriptions. URLs formed for webhooks and other uses as an HTTP URL would not be connections .

This is a small step toward using DIDs and I think most of what is built for this would be usable by that effort. But it splits it out and allows us to think about this separately from the cryptography bits."