-
Notifications
You must be signed in to change notification settings - Fork 228
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
Read-only base AtomSpace, with a read-write overlay. #1895
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First step for issue opencog#1855
Wow, nice!
…On Mon, Nov 5, 2018 at 7:40 AM Linas Vepštas ***@***.***> wrote:
This is a basic implementation of a solution for issue #1855
<#1855>. This allows user to
create a base atomspace that acts as a cache of atoms from a database, and
mark it read-only. An overlay atomspace can be use with this, and atoms can
be modified in the overlay. If an attempt is made to set a truth value (or
a generic value) on an atom in the read-only base space, it is
automatically copied into the overlay space, where the value can be
changed. The atom in the base space is left untouched.
Basic example in examples/atomspace/copy-on-write.scm. It works. Includes
unit tests.
Note also: even though an atomspace is marked "read-only", one can still
fetch from the database, and also extract atoms from the atomspace, thus
allowing RAM usage to be managed, without altering the read-only nature of
the data in the database.
------------------------------
You can view, comment on, or merge this pull request online at:
#1895
Commit Summary
- Start work on a very simple permissions system.
- Start implementing the read-only constraint.
- One more read-only enforcement.
- Add temporary scheme bindings for the readonly flag.
- Readonly flag -- missed a few spots
- Add wrappers for value setters.
- Force copying of atoms from read-only atomspaces.
- Bug-fix the force-addition of duplicate atoms
- Wrap excessively long lines
- Avoid pointless copy.
- Remove some pointless computation.
- Hmm. Make note of some weirdness...
- Optimize traversal
- Simlify and optimze slow sloppy code.
- De-duplicate atoms.
- More atom table deduplication
- Migrate to the new disambiguated code
- Remove dead code.
- Additional documentation
- Fixup COW printing
- And catch the exceptions, too.
- Start work on new COW unit test
- Expand the COW unit test
- Expand the fetch utest for readonly work.
- Test reloading after extraction.
- Bug-fix atom rel-loading after extraction
- Ad a COW demo
File Changes
- *M* examples/atomspace/README.md
<https://github.com/opencog/atomspace/pull/1895/files#diff-0> (15)
- *A* examples/atomspace/copy-on-write.scm
<https://github.com/opencog/atomspace/pull/1895/files#diff-1> (53)
- *M* opencog/atomspace/AtomSpace.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-2> (108)
- *M* opencog/atomspace/AtomSpace.h
<https://github.com/opencog/atomspace/pull/1895/files#diff-3> (106)
- *M* opencog/atomspace/AtomTable.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-4> (45)
- *M* opencog/atomspace/AtomTable.h
<https://github.com/opencog/atomspace/pull/1895/files#diff-5> (83)
- *M* opencog/guile/SchemeSmob.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-6> (3)
- *M* opencog/guile/SchemeSmob.h
<https://github.com/opencog/atomspace/pull/1895/files#diff-7> (3)
- *M* opencog/guile/SchemeSmobAS.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-8> (45)
- *M* opencog/guile/SchemeSmobAtom.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-9> (27)
- *M* opencog/guile/SchemeSmobNew.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-10> (28)
- *M* opencog/guile/SchemeSmobValue.cc
<https://github.com/opencog/atomspace/pull/1895/files#diff-11> (13)
- *M* opencog/persist/sql/multi-driver/SQLResponse.h
<https://github.com/opencog/atomspace/pull/1895/files#diff-12> (6)
- *M* opencog/scm/opencog/base/utilities.scm
<https://github.com/opencog/atomspace/pull/1895/files#diff-13> (24)
- *M* tests/atomspace/CMakeLists.txt
<https://github.com/opencog/atomspace/pull/1895/files#diff-14> (1)
- *A* tests/atomspace/COWSpaceUTest.cxxtest
<https://github.com/opencog/atomspace/pull/1895/files#diff-15> (101)
- *M* tests/persist/sql/multi-driver/FetchUTest.cxxtest
<https://github.com/opencog/atomspace/pull/1895/files#diff-16> (64)
Patch Links:
- https://github.com/opencog/atomspace/pull/1895.patch
- https://github.com/opencog/atomspace/pull/1895.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1895>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFolXJYoD2pfAa5Oz4WmZI9WjrXZK33hks5ur-swgaJpZM4YN6je>
.
--
Ben Goertzel, PhD
http://goertzel.org
"The dewdrop world / Is the dewdrop world / And yet, and yet …" --
Kobayashi Issa
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a basic implementation of a solution for issue #1855. This allows user to create a base atomspace that acts as a cache of atoms from a database, and mark it read-only. An overlay atomspace can be use with this, and atoms can be modified in the overlay. If an attempt is made to set a truth value (or a generic value) on an atom in the read-only base space, it is automatically copied into the overlay space, where the value can be changed. The atom in the base space is left untouched.
Basic example in
examples/atomspace/copy-on-write.scm
. It works. Includes unit tests.Note also: even though an atomspace is marked "read-only", one can still fetch from the database, and also extract atoms from the atomspace, thus allowing RAM usage to be managed, without altering the read-only nature of the data in the database.