MEMQ : Fast queue implementation using Memcached and PHP only

February 7, 2010   -   PHP, Scalability   -   11 comments

Memcached is a scalable caching solution developed by Danga interactive. One can do a lot of cool things using memcached including spam control, online-offline detection of users, building scalable web services. In this post, I will demonstrate and explain how to implement fast scalable queues in PHP. MEMQ: Overview Every queue is uniquely identified by it’s name. [...]

Wordpress style “Duplicate comment detected” using Memcached and PHP

January 2, 2010   -   Scalability   -   3 comments

If you have a knack of leaving comments on blogs, chances are you might have experienced a wordpress error page saying “Duplicate comment detected; it looks as though you’ve already said that!“, probably because you were not sure that your comment was saved last time and you tried to re-post your comment. In this blog [...]

How to build a custom static file serving HTTP server using Libevent in C

December 13, 2009   -   Scalability   -   3 comments

Libevent is an event notification library which lays the foundation for immensely successful open source projects like Memcached. As the web advances into a real time mode, more and more websites are using a mix of technologies like HTTP Pub-Sub, HTTP Long-polling and Comet with a custom light weight HTTP servers in the backend to [...]

How to use locks for assuring atomic operation in Memcached?

December 5, 2009   -   Scalability   -   8 comments

Memcached provide atomic increment and decrement commands to manipulate integer (key,value) pairs. However special care should be taken to ensure application performance and possible race conditions while using memcached. In this blog post, I will first build a facebook style “like” application using atomic increment command of memcached. Also, I will discuss various technical difficulty [...]

Memcached and “N” things you can do with it – Part 1

January 18, 2009   -   Scalability   -   18 comments

In my last post MySQL Query Cache, WP-Cache, APC, Memcache – What to choose, I discussed in brief about 4 caching technologies which you might have used knowingly or unknowingly. Towards the end we came to a conclusion that memcached is the best caching solution when you are looking for speed and number of hits [...]

MySQL Query Cache, WP-Cache, APC, Memcache – What to choose

January 14, 2009   -   PHP, Scalability   -   39 comments

Hello Cache Freaks, Ever since I changed my job (from Business Intelligence to Web development) and started working with my present employer, I have had a chance to work on a lot of scalable projects. From making my project to scale from 20 Million PV’s to 100 Million PV’s to development of an internal tool, the [...]

Powered by Wordpress. © 2008-2010 All Rights Reserved.