Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Using Memcached to Explore NoSQL

DZone's Guide to

Using Memcached to Explore NoSQL

· Database Zone
Free Resource

Whether you work in SQL Server Management Studio or Visual Studio, Redgate tools integrate with your existing infrastructure, enabling you to align DevOps for your applications with DevOps for your SQL Server databases. Discover true Database DevOps, brought to you in partnership with Redgate.

James Downey is a computer programmer with a passion for learning and writing about new technologies. He blogs at www.CloudOfInnovation.com. At the moment, he’s writing a series exploring NoSQL. Enjoy the content and share your thoughts. Twitter: james_downey.

Memcached might seem an odd place to venture in an exploration of NoSQL databases. It is not a database. It provides no persistence. It purges items from memory to free space as needed. And there is no replication. If data gets lost, an application retrieves it anew from a persistent data store.

Rather than a database, Memcached is a distributed memory cache of key-value pairs. Its application programming interface follows the pattern of a hash table. Using a key, programmers set and get values, which could be anything. Yes, memcached increments and decrements numeric values, but in general it understands nothing about the structure of values stored in its memory. It neither indexes nor searches based on values. To use a value, a programmer must retrieve it via a key and convert it to an object defined in the programming language.

To use Memcached, install and run the service on one or more servers. (I literally had it up and running on Ubuntu in minutes.) And install the driver for your programming language of choice. In code, indicate the Memcached servers in use and begin to set and get key-value pairs. The client code included in the driver distributes your data across servers based on a hashing algorithm. The Memcached servers do not need to communicate with each other. The system is remarkably simple, which explains its appeal.

Memcached users include Twitter, YouTube, Flickr, Craigslist, and WordPress.com, the host of this blog. Indeed, you are now reading words that were likely cached in Memcached.

So why consider Memcached in this exploration of NoSQL? I take this detour because as we explore NoSQL databases, it will be useful to compare their functionality to Memcached, with Memcached serving as an example of extreme simplicity. Hopefully, this point will become more apparent in my next post as I explore Redis.

Source:  http://webcache.googleusercontent.com/search?q=cache:001pUSjbjwwJ:cloudofinnovation.com/+&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a

It’s easier than you think to extend DevOps practices to SQL Server with Redgate tools. Discover how to introduce true Database DevOps, brought to you in partnership with Redgate

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}