0

I am developping a web application on G-WAN server which is a multi thread web server. I don't have enough information about using the KV store available with G-WAN in a multi thread environment and the G-WAN forum is closed to post a question... That's why I am looking for an other fast KV store developped for being used in a multi thread environment. The value size will be small, less than 20KB. Do you know a fast KV store for dealing with data with a size less than 20KB very quickly? I have heard about memcached, REDIS, Tokyo Cabinet... but which one is best for multi thread environment and for storing small data size?

In fact I want to store in the KV store the URL as the key and for the value associated the HTML data and a counter of number of times the HTML data has been displayed. I just want to be sure that the counter will be incremented correctly in a multi thread environment, if possible without using mutex and others things to manage possible concurrent accesses to the same data at the same time.

If you have any experience of using a KV store in a multi thread environment can you share your experience please?

Thank you Jérôme

4

2 回答 2

0

您关于 G-Wan 的 KV 商店的问题已在此处得到解答

lock与所建议的类似的semaphore优点相比GDBM,G-Wan 的 KV 存储在线程持有锁时永远不会阻塞:没有锁。

于 2012-08-21T20:21:43.907 回答
0

对于一些小而简单的事情,我个人会考虑使用老式的GDBM。虽然它本身不是线程安全的,但它足够小、简单且足够快,尤其是对于少量数据。通过使用简单信号量阻塞的包装函数,添加线程安全应该很简单。

于 2012-08-20T08:54:50.503 回答