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 8633829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:33:48+00:00 2026-06-12T09:33:48+00:00

This is just an idea, I don’t yet have any code, I need some

  • 0

This is just an idea, I don’t yet have any code, I need some design advice. I would implement a cache ( non distributed in first instance ) by using the MemoryMappedFile in c#. I think it would be good to have a b-tree as an undelying structure, but this is debatable as well.
So the question are:

  • Is B-tree a good strategy to use to fast search items when the undelaying support is a memory mapped files ?
  • What tip and trick do we have with memory mapped files ? How much the view can be large, what are the drawbacks when it is too small or too large ?
  • Multithread consideration: how we deal with memory mapped file and concurrency ? Cache are supposed to be higly hitten by clients, what strategy is better to have something performant ?

As @Internal Server Error asked, I integrate the question with this:
Key would be a string, about 64 chars max len. The data would be a byte[] about 1024 bytes long but consider an average at 128 bytes, or better: what I want to cache are OR/M entities, let’s consider how long is a serialized entity in bytes with something like a BSOn serializer.

  • 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-06-12T09:33:50+00:00Added an answer on June 12, 2026 at 9:33 am
    • B-Tree is good (with memory-mapped files), but if the file is not always entirely kept in resident memory then a page-aligned B+Tree is much better. See also.
    • The trick with memory-mapped files is to use a 64-bit architecture so that you can map the entire file into memory, otherwise you’d have to only map the parts and the cached reads might be faster than mmaps.
    • Try CAS (compare-and-swap) over the shared memory. See also.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This idea just popped into my head, so I don't have any code to
I am just investigating the idea of this so have no example code. I've
I have absolutely no idea how to do this, so I'm just gonna go
So this just started happening now, I have no idea as to why. I
This just happened to one of my sites and I have no idea what
I am running some CPU-intensive Clojure code from within Intellij Idea (I don't think
I know this is just a simple java array problem, but I don't have
I just got this question on an interview and had no idea how to
I've mapped out this cool idea for my personal web page. I essentially just
This just saves time. Since I already have a web applciation. I can just

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.