-
Notifications
You must be signed in to change notification settings - Fork 16
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
Memory storage #68
Open
EltonCN
wants to merge
21
commits into
CST-Group:master
Choose a base branch
from
EltonCN:memory_storage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Memory storage #68
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
Java <-> Java communication and Java <-> Python communication works
- Node name is equal to Python version - Fix request type
Fixed Java and Sonar problems
Test MS-Java with MS-Python
Code Climate has analyzed commit b25903b and detected 6 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 93.4% (90% is the threshold). This pull request will bring the total coverage in the repository to 38.0% (1.7% change). View more on Code Climate. |
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.
Why was it necessary?
This PR implements Memory Storage, a memory synchronization mechanism. It allows the creation of distributed agents between different CST instances/nodes, and the creation of agents using CST-Java and CST-Python simultaneously.
How was it done?
The MemoryStorageCodelet has been implemented. By adding it to the agent, the codelet monitors existing memories and synchronizes them with a Redis server when needed.
Implementation details
In addition to the MemoryStorageCodelet, the MemoryEncoder, which transforms memories to and from Maps with JSON info, and the LamportTime, which implements a logical Lamport clock, were also implemented.
The full communication protocol details is provided in: https://h-iaac.github.io/CST-Python/_build/html/src/Memory%20Storage.html
How to test?
The Tests test communication between local nodes in Java. To run them, you need to have a Redis server available, which has been added to the test CI. If it is not available, the test is skipped.
A test was also implemented to verify the operation of other Memory Storage instances, which at the moment must be executed manually. The test was successfully executed with MS-Python.
Future works
Some more robust memory information encoding and typing system is still needed, allowing objects of arbitrary types to be synchronized.