Skip to content

WIP Redis support#30

Merged
PicoCreator merged 46 commits into
masterfrom
redis-support
Aug 12, 2022
Merged

WIP Redis support#30
PicoCreator merged 46 commits into
masterfrom
redis-support

Conversation

@PicoCreator
Copy link
Copy Markdown
Contributor

REDIS based support for dataobjectmap

* @return null if not exists, else a map with the data
**/
public Map<String, Object> DataObjectRemoteDataMap_get(String _oid) {
RMap<String, String> res = redisson.getMap("_oid");
Copy link
Copy Markdown
Contributor Author

@PicoCreator PicoCreator Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get the Map as part of the constructor,

Instead of _oid, use the "Table name", to avoid conflict with any existing "Tables"

Your current implementation, only stores 1 map globally, instead of a MAP of MAPS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the following as an analogy

  • Redisson : The Database
  • getMap : Table
  • map.get(id) : Object

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to also understand how redisson .getMap extraction will work with redis configured in LRU caching mode (https://redis.io/docs/manual/eviction/)

Which of the following occurs

  • individual objects gets evicted (ideal)
  • entire collection of objects, tag to a single map (table) gets evicted
  • no go : random keys inside an object gets evicted

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 22, 2022

Codecov Report

Merging #30 (e168437) into master (958d3f3) will increase coverage by 1.82%.
The diff coverage is 79.88%.

@@             Coverage Diff              @@
##             master      #30      +/-   ##
============================================
+ Coverage     57.12%   58.94%   +1.82%     
- Complexity     1045     1330     +285     
============================================
  Files            82       88       +6     
  Lines          5306     6640    +1334     
  Branches        928     1151     +223     
============================================
+ Hits           3031     3914     +883     
- Misses         1880     2247     +367     
- Partials        395      479      +84     
Impacted Files Coverage Δ
src/main/java/picoded/dstack/DataObjectMap.java 70.00% <0.00%> (ø)
...in/java/picoded/dstack/redisson/RedissonStack.java 74.28% <74.28%> (ø)
.../picoded/dstack/redisson/Redisson_KeyValueMap.java 80.30% <80.30%> (ø)
...icoded/dstack/redisson/Redisson_DataObjectMap.java 87.50% <87.50%> (ø)
.../picoded/dstack/mongodb/MongoDB_DataObjectMap.java 50.80% <0.00%> (-30.46%) ⬇️
...main/java/picoded/dstack/mongodb/MongoDBStack.java 44.73% <0.00%> (-23.69%) ⬇️
src/main/java/picoded/dstack/FileWorkspace.java 31.48% <0.00%> (-10.19%) ⬇️
...n/java/picoded/dstack/core/Core_FileWorkspace.java 69.78% <0.00%> (-4.07%) ⬇️
...a/picoded/dstack/stack/Stack_FileWorkspaceMap.java 77.84% <0.00%> (-1.64%) ⬇️
src/main/java/picoded/dstack/FileWorkspaceMap.java 0.00% <0.00%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@PicoCreator PicoCreator merged commit fd148e8 into master Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants