on Articles

Using membase on Windows machine

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInShare on RedditShare on StumbleUpon

Membase is a distributed key-value database management system, optimized for storing data behind interactive web applications. Membase automatically distributes data and I/O across servers. This “scale out” approach at the data layer permits virtually unlimited growth of transaction capacity, with linear increases in cost and constant per-operation performance.

Interactive web applications service many concurrent users; creating, storing, retrieving, aggregating, manipulating and presenting data in real-time. Supporting these requirements, Membase processes data operations with quasi-deterministic low latency and high sustained throughput. It scales linearly from a single-server deployment to a cluster of hundreds of servers. And because Membase does not require creation or modification of a schema before storing data, it is an extremely flexible, cost-effective place to collect and retain large quantities of data – also typical of modern web applications.

For those familiar with Memcached, Membase provides text and binary protocol compatibility, but adds disk persistence; hierarchical storage management; data replication; live cluster reconfiguration and data rebalancing; and secure multi-tenancy with data partitioning. No change is required to applications already using Memcached to take advantage of these added capabilities. It is a drop in replacement. Like Memcached, Membase is simple, fast and elastic.

It is protocol-compatible with Memcached (both text and binary protocols), so if an application is already using Memcached, Membase can be dropped in without any change to application code or client configuration.

Membase is extremely easy to scale up, and down, making it attractive for applications in which data set size or data access volume can rapidly change. Membase scales linearly from a single server, to a cluster of hundreds of servers.

So how do you install and use it in your Windows environment (sounds unnatural but for testing purposes only).

Go ahead and download the installer for your version of operating system:

Membase server download

The installation is like you are used to in Windows environment.

After the installation, there is a great wizard that is leading you through setup process.

And you are ready to rock and roll. Time for testing if it is working:

$memcache = new Memcache; // instantiating memcache extension class
$memcache->connect("localhost",11211); // try instead of localhost
// if it is not working

echo "Server's version: " . $memcache->getVersion() . "<br />\n";

// we will create an array which will be stored in membase serialized
$testArray = array('horse', 'dog', 'pig');
$tmp = serialize($testArray);
$memcache->replace("key", $tmp);

echo "Data from the cache:<br />\n";

The usage is the same as if you are using memcached.

More information can be found on Membase home page.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInShare on RedditShare on StumbleUpon

  • Pingback: Tweets that mention Using membase on Windows machine | CodeForest -- Topsy.com()

  • Hey Zvonko, thanks so much for putting this together. A few extra links for you if you’re interested.

    The official download page for the community version is here: http://www.membase.org/downloads

    The links you’ve provided will not exist when a new version comes out.

    Also, might be worth checking out the Enyim client library (http://memcached.enyim.com/). We’ve got a great relationship with the developer and the Enyim client speaks natively to Membase servers.

    Thanks again, let me know what I can do to help


    • Zvonko

      Thanks for the info, Perry.

      I will change the links in article to downloads section.

      Great work on Membase, guys!

  • Nicholas

    I dd the installation but PHP still cannot talk to the memcache server.