On Fri, Aug 31, 2018 at 3:26 AM <[email protected]> wrote:

> I still have one question though, in the case of one `SocketAddress`
> having more than one topics with the same type, do you think it is
> appropriate to just add a `topic` field to the `subscribe` method and
> return the corresponding `Subscription`?
>
>
I think my approach would be to define an interface like this:

```
interface PublisherRestorer {
   restorePublisher @0 (token :Text) -> (publisher :Publisher(AnyPointer))
}
```

and I would add some way for publishers to pass tokens to the PubSubMaster.
For example, maybe the SocketAddress struct could have a field
`restorerToken: Text` (and maybe SocketAddress is not longer an appropriate
name for that struct). The idea is that there will be a PublisherRestorer
set up as the default bootstrap object for the vats where publishers live.
That object will know how to convert restoration tokens back into
references to publishers. Before a publisher registers itself, it
coordinates with its local PublisherRestorer to get a token.

- David

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to