Closed linas closed 1 month ago
Other kinds of proxies that build on this are described in https://wiki.opencog.org/w/ProxyNode#List_of_ideas_for_other_Proxies
I'm working on this now.
Mostly done.
Done in #3071 -- I realized that this was urgent, and it was easy, so I just went and did it. Didn't take that long.
Enhancement: Implement a
WriteBufferProxy
. This would be just like the otherProxyNode
s except that it would collect up a bunch of write requests, before forwarding to the next stage. This is needed to avoid "write amplification".Current pair-counting code increments a count, and then immediately calls
store-atom
(which, forRocksStorageNode
writes to disk.) Counting proceeds at hundreds of thousands per second, so this does vast amounts of disk writes. Buffering would reduce this.The simplest buffering design is to place even new write request (i.e. handle) into a
std::set
, so that duplicate entries are automatically eliminated. Then this set would be flushed every N seconds. Fancier designs are also possible.Even easier would be to use https://github.com/opencog/cogutils/tree/master//opencog/util/async_buffer.h which already does the needed locking and bufering, it just needs to be wrapped in the proxy-node gorp.