Comments (8)
Thank you for looking into the code, Linas. About the suggestion to add caching, wouldn't it better to use cog-execute-cached
on the client side instead of adding the caching to the server side? What if another client sends a different query with the same key? We will be returning a wrong result.
from atomspace-rpc.
different query with the same key?
The keybase is per-atom. You can use the same key for all atoms.
server side
Well, part of the point is that you can pre-query 1001 typical, common queries, and then any client who does one of these typical common queries gets an instant answer.
And if you pre-query 1001 typical, common queries, and save them in rocksdb, then next time you reboot the server, you don't even have to pre-mine again,. They are still there.
from atomspace-rpc.
I see. In that case I will make the change you suggested
from atomspace-rpc.
Thank you!
from atomspace-rpc.
From the example you gave above, the key is a handle instead of a string. So I should instantiate a handle from the input key string before using it to get previous values. But what is the type of this key handle(Atom)? I see in this example the type of the key is a PredicateNode
. Does this mean key handles should have type PredicateNode
or the choice is arbitrary?
from atomspace-rpc.
The keys must always be Atoms. They can be any Atom, but if you just want something simple e.g. "a string", then use PredicateNode
. The values can be any Value.
from atomspace-rpc.
If you do use something simple, and you use the same key everywhere, then the naming convention is to surround it with asterisk-dashes: e.g (PredicateNode "*-MyWhizBangKey-*")
or (PredicateNode "*-my-whiz-bang-key-*")
. These work as "eyecatchers" and make it easier to spot in the code/in the data.
from atomspace-rpc.
If you want to use fast-file-load
i.e. NOT use guile when loading from files, then there are a dozen hard-coded string commands you can put in your file. They are in Commands.h
, see /opencog/persist/sexpr/Commands.h
for details.
from atomspace-rpc.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomspace-rpc.