libmc: A fast and light-weight memcached client for C++/Python

128 views
Skip to first unread message

PAN Myautsai

unread,
Apr 4, 2015, 2:09:41 AM4/4/15
to memc...@googlegroups.com
Dear all,

A few days ago, we just released a new memcached client for C++/Python: libmc.

libmc is a memcached client library for Python without any other dependencies in runtime. It's mainly written in C++ and Cython. libmc can be considered as a drop in replacement for libmemcached and python-libmemcached.

libmc is developing and maintaining by Douban Inc. Currently, It is working in production environment, powering all web traffics in douban.com. Realtime benchmark is available on travis: https://travis-ci.org/douban/libmc/builds/57124335#L1611 .

The source code has been open sourced on GitHub: https://github.com/douban/libmc .

Best Regards.

Douban Inc. | PAN, Myautsai

Abioy Sun

unread,
May 26, 2015, 12:04:35 PM5/26/15
to memc...@googlegroups.com
good job

--

---
You received this message because you are subscribed to the Google Groups "memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memcached+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zhang Alex

unread,
Nov 17, 2015, 7:29:00 AM11/17/15
to memcached
Hi, It's awsome
I want get mc from connection pool. I got error "ThreadUnsafe: mc client created in (28740, 'Thread-4')".  

在 2015年4月4日星期六 UTC+8下午2:09:41,PAN Myautsai写道:

PAN, Myautsai

unread,
Nov 18, 2015, 1:48:38 AM11/18/15
to memc...@googlegroups.com
Dear Alex,

Thanks for trying libmc. Basically one libmc client can only exists in just one thread (instead of using it across multi threads). If you want to use libmc in a multi-thread environment, the simplest way is to create libmc client in each thread, otherwise you may need to on write connection pool wrapper by yourself.

Please refer https://github.com/douban/libmc#is-libmc-thread-safe- first and open a new issue on GitHub https://github.com/douban/libmc/issues/new with the code snippet to reproduce for further discussion.

Best Regards.

-- 
Douban Inc. | PAN, Myautsai
Sent with Sparrow

--

---
You received this message because you are subscribed to a topic in the Google Groups "memcached" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/memcached/HGkAp5KxPCo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to memcached+...@googlegroups.com.

Zhang Alex

unread,
Nov 18, 2015, 2:05:14 AM11/18/15
to memc...@googlegroups.com

yes,i did it yesterday. the ThreadUnsafe still there.

I review libmc code, update _client.pyx 


def _check_thread_ident(self): pass


It worked, but sometimes, I got segmentfault randomly.





PAN, Myautsai <kelvi...@gmail.com>于2015年11月18日周三 14:48写道:

PAN, Myautsai

unread,
Nov 18, 2015, 2:37:46 AM11/18/15
to memc...@googlegroups.com
Dear Alex,

Please don't remove the `_check_thread_ident`, otherwise libmc will be running in a thread-unsafe environment, and that's is the reason why you got segmentation fault. Again, please open a issue with your reproducing code on GitHub and then we can discuss about it.


-- 
PAN, Myautsai
Sent with Sparrow

Reply all
Reply to author
Forward
0 new messages