Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Nitschinger:
Caching Doctrine Entities with Couchbase
Jan 08, 2013 @ 16:19:07

Michael Nitschinger has a new post to his site today showing how you can cache the entities you've created with Doctrine using Couchbase as a simple caching tool.

As part of our ongoing efforts to make Couchbase more integrated with frameworks and libraries, we added caching support for the Doctrine ORM. [...] Caching can either be used standalone (through the API provided by doctrine/common) or integrated with the ORM functionality. We'll look at both variants through simple examples, a good documentation can also be found here. Note that at the time of writing, the CouchbaseCache is not mentioned as a caching driver because the documentation still needs to be updated.

He walks you through the steps to get everything you need installed, both through Composer and the Couchbase extension so your PHP installation will support it. He includes sample code that sets up the cache and shows how to check it to see if a key exists. With this base in place, he expands it out to working with the Doctrine ORM. He shows how to create a sample "Person" entity, inject it into the entity manager and perform a query with the Result Cache to locate the object.

tagged: doctrine entity cache orm couchbase tutorial

Link:

Michael Nitschinger's Blog:
Using Couchbase as a flexible session store
Jun 21, 2012 @ 14:24:38

Michael Nitschinger has a new post to his site today showing how to implement Couchbase as a storage mechanism for your session information (including some handy extra features).

What do I mean by flexible? Well, the combination of a highly scalable key-value store and the possibility to query your data through views allows you to gain unique insight inside your data in near realtime. [...] Let's look at some obstacles that we as application developers face and then see how we may solve them through Couchbase and its functionality.

He talks about some of the options to track user sessions (both on the server and client side) including PHP's sessions, HTML5 data storage and memcache. He covers some of the most basic session tracking needs and shows how to use the CouchBase extension to work with and setting some key/value combinations for user sessions. He shows how to query these data structures (JSON data) and filter to find only the records needed

tagged: couchbase tutorial session storage

Link:

Software Development Video & Tutorials:
PHP and Couchbase
May 03, 2012 @ 15:19:49

On the Software Development Video & Tutorial site they've shared a video that introduces the PHP to Couchbase connection from Jan Lenhardt.

Couchbase Server is a fully memcached API compatible database that solves performance, scaling and querying needs. It relies on proven technologies like memcached and Apache CouchDB along with a chunk of open source components that make the whole thing work. Couchbase developed a PHP extension to work with Couchbase Server. This video discusses the architecture of the new PHP extension and shows you how to use Couchbase Server’s advanced features like views for querying with some tips and tricks when running serious deployments.

The video is a recording of a presentation he did about Couchbase itself - its features, how to get it set up, and how to use it with the Couchbase PHP library. Lots of sample code is included and there's some talk about a typical Apache/FastCGI setup to optimum support.

tagged: video tutorial janlenhardt video presentation couchbase

Link:

Michael Nitschinger's Blog:
Getting Started with Couchbase and PHP
Mar 12, 2012 @ 13:35:06

In his most recent blog post Michael Nitschinger introduces you to Couchbase, a document-oriented database, and how to use it with PHP.

As there were a lot of merges, renamings and releases, it was pretty hard to follow up with the current/best database version and SDK to use for your project. Now as the dust has settled a bit, here's what I've come up with: Couchbase 2.0 will be the next major version and is already pretty stable, so I'll jump straight onto it and skip 1.8.

He recommends using the php-couchbase libraries or the php-ext-couchbase extension. He walks you through the whole process of getting Couchbase installed and running and the PHP support installed via the aptitude package manager. A sample script and some basic usage information is also included.

tagged: couchbase tutorial extension library sdk

Link:


Trending Topics: