Closed manisabri closed 4 years ago
Thanks!
While we are on the topic of communications protocols, I should mention one more important possibility to keep in mind. So ... the AtomSpace can be used in a distributed fashion, in that an AtomSpace running on a local machine can pull Atoms from a remote machine, or push them out, or pull/push Values. It does this using the "Backend" API. There's a few gotchas:
The only remaining backend is to the postgres SQL server. So multiple atomspaces can all connect to the same postgres server, and share that way. We used to have a backend to some BigTablle variant, but it never worked right. We used to have a ZMQ-based backend to one of the java DB's, Neo4j I think, but it was painfully slow. I'm not sure if it's because neo4j was slow or if the network serialization-deserializatin was slow .. or both... it ran at a few hundred atoms/sec. A minimum of 2K atoms/sec is required, higher is desirable. Native C++ speeds are 100K atoms/sec and up.
For historical reasons, we do NOT have a direct atomspace-to-atomspace connection. We could, but we don't. The web.api
could maybe provide that.. except it is probably too slow, as currently designed and implemented ... but this is worth thinking about.
The backend requires only a half-dozen messages. The web.api
is probably overkill for what it needs -- the backend is not anywhere near as fancy. The C++ API is here: https://github.com/opencog/atomspace/blob/master/opencog/atomspace/BackingStore.h
Well, there are still two other backends, one to IPFS and one to DHT, but both are mis-designed. They .. work .. .they're just .. fundamentally wrong.
Everything seems to work except setting the attention value. Had a look at the AtomSpace Cython code
cython/opencog/value.pyx
andcython/opencog/atom.pyx
there are setters and getters fortv
but nothing forav
... I need to figure out how to set theAttention Value