Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6021147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:40:15+00:00 2026-05-23T03:40:15+00:00

Problem I need a key-value store that can store values of the following form:

  • 0

Problem

I need a key-value store that can store values of the following form:

DS<DS<E>>

where the data structure DS can be
either a List, SortedSet or an Array

and E can be either a String or byte-array.

It is very expensive to generate this data and so once I put it into the store, I will only perform read queries on it. Essentially it is a complex object cache with no eviction.

Example Application

A (possibly bad, but sufficient to clarify) example of an application is storing tokenized sentences from a document where you need to be able to quickly access the qth word of the pth sentence given documentID. In this case, I would be storing it as a K-V pair as follows:

K - docID
V - List<List<String>>
String word = map.get(docID).get(p).get(q);

I prefer to avoid app-integrated Map solutions (such as EhCache within Java).

I have worked with Redis but it doesn’t appear to support the second layer of data-structure complexity. Any other K-V solutions that can help my use case?


Update:

I know that I could serialize/deserialize my object but I was wondering if there is any other solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:40:15+00:00Added an answer on May 23, 2026 at 3:40 am

    In terms of platform choice you have two options – A full document database will support arbitrarily complex objects, but won’t have built in commands for working with specific data structures. Something like Redis which does have optimised code for specific data structures can’t support all possible data structures.

    You can actually get pretty close with Redis by using ids instead of the nested data structure. DS1<DS2<E>> becomes DS1<int> and DS2<E>, with the int from DS1 and a prefix giving you the key holding DS2.

    With this structure you can access any E with only two operations. In some cases you will be able to get that down to a single operation by knowing what the id of DS2 will be for a given query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An XSLT-newbie problem: I need to substitute a text value in XML-file. All other
A problem that we need to solve regularly at my workplace is how to
The Problem: I need to receive different types of content from a number of
I have this idea for a free backup application. The largest problem I need
The problem is I need to ignore the stray Letters in the numbers: e.g.
The problem is a need to take the arguments into account before choosing the
Problem: I have to support users who need to edit web pages. Some of
My problem is thus: I need a way to ensure only one given class
I need ideas on how to go about table layout problem. I want to
I need a simple SQL to accomplish the below: Problem: When a petrol bunk

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.