CouchDB
  1. CouchDB
  2. COUCHDB-1293

Support in memory databases that can replicate

    Details

    • Type: Wish Wish
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Skill Level:
      Committers Level (Medium to Hard)

      Description

      The summary really says it all. It would be great if we could have databases that live only in memory, but that could also be replicated to other URLs (potentially a database on disk or another node in a cluster).

      I don't think views would be necessary for the sorts of things you'd be doing all in memory (session data, temp data, etc.).

      I talked with Kocoloski about this around a month ago and it did not sound like an easy feat because of the replication. I would still like to hear what people have to say about it.

        Activity

        Hide
        Randall Leeds added a comment -

        As a temporary work-around you could also mount a ram disk under your couch database directory and use encoded slashes in your DB name to put a DB under that storage. It would work, but would compaction would still be required for long-lived, heavily-updated DBs since nothing would change about the way couch sees the file.

        Show
        Randall Leeds added a comment - As a temporary work-around you could also mount a ram disk under your couch database directory and use encoded slashes in your DB name to put a DB under that storage. It would work, but would compaction would still be required for long-lived, heavily-updated DBs since nothing would change about the way couch sees the file.
        Hide
        Jan Lehnardt added a comment -

        I agree,

        > diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`
        Started erase on disk4
        Unmounting disk
        Erasing
        Initialized /dev/rdisk4 as a 569 MB HFS Plus volume
        Mounting disk
        Finished erase on disk4 ramdisk
        > ln -s /Volumes/ramdisk /Users/jan/Work/couchdb/tmp/lib/ram
        > curl -X PUT $COUCH/ram%2fdisk

        {"ok":true}

        > ls /Volumes/ramdisk/
        disk.couch

        seems an easy enough solution that works today. Compaction would be pretty fast, too

        Show
        Jan Lehnardt added a comment - I agree, > diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430` Started erase on disk4 Unmounting disk Erasing Initialized /dev/rdisk4 as a 569 MB HFS Plus volume Mounting disk Finished erase on disk4 ramdisk > ln -s /Volumes/ramdisk /Users/jan/Work/couchdb/tmp/lib/ram > curl -X PUT $COUCH/ram%2fdisk {"ok":true} > ls /Volumes/ramdisk/ disk.couch seems an easy enough solution that works today. Compaction would be pretty fast, too
        Hide
        Jan Lehnardt added a comment -

        marking won't fix, feel free to reopen with new arguments

        Show
        Jan Lehnardt added a comment - marking won't fix, feel free to reopen with new arguments
        Hide
        Jan Lehnardt added a comment -

        Sam, what's the new argument?

        Show
        Jan Lehnardt added a comment - Sam, what's the new argument?
        Hide
        Randall Leeds added a comment -

        Marking as a "Wish" and leaving it open with no fix version.

        Alternate implementations are really hard to put into the code base right now since so much calls directly into couch_btree and couch_btree calls directly into couch_file. It'd be neat to see it done but it's not a blocker for anything afaik.

        Show
        Randall Leeds added a comment - Marking as a "Wish" and leaving it open with no fix version. Alternate implementations are really hard to put into the code base right now since so much calls directly into couch_btree and couch_btree calls directly into couch_file. It'd be neat to see it done but it's not a blocker for anything afaik.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sam Bisbee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development