key-value-store

Pros/Cons of storing serialized hash vs. key/value database object in ActiveRecord?

南楼画角 提交于 2019-12-03 01:57:25
If I have several objects that each have basically a Profile , what I'm using to store random attributes, what are the pros and cons of: Storing a serialized hash in a column for a record, vs. Storing a bunch of key/value objects that belong_to the main object. Code Say you have STI records like these: class Building < ActiveRecord::Base has_one :profile, :as => :profilable end class OfficeBuilding < Building; end class Home < Building; end class Restaurant < Building; end Each has_one :profile Option 1. Serialized Hash class SerializedProfile < ActiveRecord::Base serialize :settings end

Looking for a lightweight java-compatible in-memory key-value store [closed]

杀马特。学长 韩版系。学妹 提交于 2019-12-03 01:52:26
Berkeley DB would be the best choice probably but I can't use it due to licensing issues. Are there any alternatives? Fuad Malikov You can try Hazelcast . Just add hazelcast.jar to your classpath. And start coding java.util.Map map = Hazelcast.getMap("myMap"); You'll get an in-memory, distributed, dynamically scalable data grid which performs super fast. Your question could mean one of two things. If you mean a data structure for storing key-value pairs, use one of the Map instances that are a standard part of the JDK. If however you are after an in-memory key-value store then I would suggest

How is aerospike different from other key-value nosql databases? [closed]

倖福魔咒の 提交于 2019-12-03 01:18:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . Aerospike is a key-value, in-memory, operational NoSQL database with ACID properties which support complex objects and easy to scale. But I have already used something which does absolutely the same. Redis is also a key-value, in-memory (but persistent to disk) NoSQL database. It

Writing a key-value store

自作多情 提交于 2019-12-02 23:29:28
I am looking to write a Key/value store (probably in python) mostly just for experience, and because it's something I think that is a very useful product. I have a couple of questions. How, in general, are key/value pairs normally stored in memory and on disk? How would one go about loading the things stored on disk, back into memory? Do key/value stores keep all the key/value pairs in memory at once? or is it read from the disk? I tried to find some literature on the subject, but didn't get very far and was hoping someone here could help me out. It all depends on the level of complexity you

Need a distributed key-value lookup system

雨燕双飞 提交于 2019-12-02 20:35:06
I need a way to do key-value lookups across (potentially) hundreds of GB of data. Ideally something based on a distributed hashtable, that works nicely with Java. It should be fault-tolerant, and open source. The store should be persistent, but would ideally cache data in memory to speed things up. It should be able to support concurrent reads and writes from multiple machines (reads will be 100X more common though). Basically the purpose is to do a quick initial lookup of user metadata for a web-service. Can anyone recommend anything? You might want to check out Hazelcast . It is distributed

How is aerospike different from other key-value nosql databases? [closed]

扶醉桌前 提交于 2019-12-02 14:36:25
Aerospike is a key-value, in-memory, operational NoSQL database with ACID properties which support complex objects and easy to scale. But I have already used something which does absolutely the same. Redis is also a key-value, in-memory (but persistent to disk) NoSQL database. It also support different complex objects. But in comparison to Aerospike, Redis was in use for a lot of time, already have an active community and a lot of projects developed in it. So what is the difference between aerospike and other no-sql key-value databases like redis. Is there a particular place which is better

Cassandra - What is the reasonable maximum number of tables?

不问归期 提交于 2019-12-01 17:52:20
I am new to Cassandra. As I understand the maximum number of tables that can be stored per keyspace is Integer.Max_Value. However, what are the implications from the performance perspective (speed, storage, etc) of such a big number of tables? Is there any recommendation regarding that? While there are legitimate use cases for having lots of tables in Cassandra, they are rare. Your use case might be one of them, but make sure that it is. Without knowning more about the problem you're trying to solve, it's obviously hard to give guidance. Many tables will require more resources, obviously. How

feature request: an atomicAdd() function included in gwan.h

旧时模样 提交于 2019-12-01 09:48:42
问题 In the G-WAN KV options, KV_INCR_KEY will use the 1st field as the primary key. That means there is a function which increments atomically already built in the G-WAN core to make this primary index work. It would be good to make this function opened to be used by servlets, i.e. included in gwan.h. By doing so, ANSI C newbies like me could benefit from it. 回答1: There was ample discussion about this on the old G-WAN forum, and people were invited to share their experiences with atomic

GWAN Key-Value persistent multiple store

狂风中的少年 提交于 2019-12-01 08:03:50
I want to record a key-value in persistent mode but when I want to use 2 or more different stores it doesn't work. Here's my script: ... typedef struct{ kv_t *kv; char *name; } kv_data; int main(int argc, char *argv[]) { kv_data **data = (kv_data**)get_env(argv, US_SERVER_DATA); if(!data[0]){ data[0] = (kv_data*)calloc(1, sizeof(kv_data)); if(!data[0]){ return 500; } kv_t users; kv_init(&users, "users", 10, 0, 0, 0); data[0]->kv = &users; kv_item item; item.key = "pierre"; item.klen = sizeof("pierre") - 1; item.val = "pierre@example.com"; item.flags = 0; kv_add(data[0]->kv, &item); data[0]-

GWAN Key-Value persistent multiple store

允我心安 提交于 2019-12-01 06:19:07
问题 I want to record a key-value in persistent mode but when I want to use 2 or more different stores it doesn't work. Here's my script: ... typedef struct{ kv_t *kv; char *name; } kv_data; int main(int argc, char *argv[]) { kv_data **data = (kv_data**)get_env(argv, US_SERVER_DATA); if(!data[0]){ data[0] = (kv_data*)calloc(1, sizeof(kv_data)); if(!data[0]){ return 500; } kv_t users; kv_init(&users, "users", 10, 0, 0, 0); data[0]->kv = &users; kv_item item; item.key = "pierre"; item.klen = sizeof(