-
Notifications
You must be signed in to change notification settings - Fork 236
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
Design a Publish/Subscribe System (aka Futures) #1750
Comments
Proposed solution (there may be several; here's one) -- Modify the AnchorNode idea to make it more general.
Here's an even better variant:
The nice thing about this system is that the signals live with the AnchorNode, instead of living in the atomspace, and/or all-possible atoms. Subscribers are inherently local. |
FYI pull req #2316 proposes the creation of a |
Closing. Much of the commentary above is obsolete and inapplicable; the implementation has moved on. For example, signals no longer exist. The QueueValue has been implemented. AnchorNodes are used. See #2911 for the latest status and ideas. |
Various processing subsystems take certain atoms as inputs, and generate other atoms as outputs. Other subsystems need to monitor or get access to the newly created atoms. A generic infrastructure is needed for this.
Currently we have two systems for this, and both are inadequate, bordering on terrible. They are:
There are many problems with 1.:
addAtomSignal()
subscriber risks blocking itself (and hanging the entire system) it it adds an atom itself...For these reasons, I really want to get rid to the atomspace signals. There are almost no users of them, so getting rid of them is not hard. (See issue #1745)
There are many problems with 2. The typical usage of 2. is that one system (the publisher) creates a link
(Member (Anchor "foo") (SomeAtom))
while a second subsystem (the subscriber) monitors the incoming set for(Anchor "foo")
then grabs(SomeAtom)
then deletes theMemberLink
. The problem with this is that:The good things about 2. are:
A well-designed publish-subscribe system should then allow a futures-and-promises system to be implemented, for users of the pattern matcher, after implemented #1502. That is, users of the pattern matcher can subscribe, wait for results, and mangle them when ready.
This is related to the idea of "promises" and "futures"
The text was updated successfully, but these errors were encountered: