php: All content tagged as php in NoSQL databases and polyglot persistence
CouchDB is one of the most friendly NoSQL systems in terms of protocols: JSON over HTTP. But that doesn’t mean that small libraries aware of the URI space and other aspects of CouchDB are not useful. (nb: the only problem would be if everyone starts creating his own though. Anyway, discussing about CouchDB libs is not the main intent of this post, but rather a personal note I’ve made while going through a couple of PHP guides to CouchDB). As a plus to its ease of use, CouchDB can completely change the architecture of your next web application
So, if you’re planning to get started with CouchDB and PHP, you’d probably like to see an overview of CouchDB. You could either follow the from beginner to CouchDB expert in 2 hours videos or watch Will Leinweber’s Relaxing with CouchDB or just go through David Coallier’s introduction to CouchdB slides embedded below:
Next, you’ll have to install CouchDB on your OS and read one of the PHP getting started posts listed below:
- Gonzalo Ayuso’s PHP and CouchDB ☞ part 1 and ☞ part 2 will walk you through basic CRUD operation with CouchDB and PHP
- Matt Apperson ☞ post will help you get started with CouchDB and PHPillow, a simple PHP helper class.
- Thomas Myer article will introduce you to CouchDB and PHP-on-Couch.
For those familiar with the Zend framework there’s also a Zend and CouchDB integration proposal that you might want to try. And there are probably more CouchDB quick guides around that you might find useful, in which case you’d probably also like to share with others. Meanwhile, have fun with PHP and CouchDB.
I have argued previously that even if it is clear that NoSQL is here to stay, integration with popular frameworks is a critical phase in NoSQL adoption.
A while back I have reported about the advances made by one of the most popular Python frameworks, Django for becoming more NoSQL friendly (nb the initiative is more generic and aims at allowing multi-database usage from Django).
It looks like Zend, a very popular PHP framework, is looking to seamlessly integrate with some NoSQL solutions: CouchDB and MongoDB. These proposals (nb I don’t know the status of these proposals) are an interesting read as they offering extremely detailed information about how the integration will be implemented and I’d say they are a good example of a process to be followed by other frameworks looking to open their doors to NoSQL solutions.
This post and the next several that follow it will detail how to set up a CouchDB instance and to build a cloud telephony application with it using the Voxeo Tropo platform.
So far they published 3 articles: ☞ part 1 — covering CouchDB installation —, ☞ part 2 — CouchDB configuration and the first PHP code interacting with both Tropo and CouchDB amd ☞ part 3 — covering CouchDB data modeling and data fetching.
Even if you don’t plan to build a telephony app, I’d still say it is a bit more practical than this other CouchDB usecase.
Everyone is building these days a Twitter-like or Twitter-related project using some NoSQL solution. I guess they can use as a ‘scientific’ explanation for these experiments Nati Shalom’s (Gigaspaces) great ☞ post on the common principles behind NoSQL alternatives (the post was inspired by his talk at QCon on building a scalable Twitter application. The presentation is embedded below).
Even if the project code is not available and I couldn’t get the mentioned online version to work, I’d say that the combination of Redis and HTML5 WebSockets is making it worth mentioning. And it case you cannot get it to work either, there is a screencast for it:
TStore is a twitter search result backup tool build in Python and CouchDB. The source code is available on ☞ GitHub.
Retwis is a non-distributed Twitter clone built in PHP and using Redis. The source code and extended details about the implementation are available ☞ here.
According to this page, there is already a port of this solution to Ruby and Sinatra: ☞ Retwis-RB.
Floxee is a commercial tweetstream search and tagging platform built using MongoDB. You can read a bit more about MongoDB usage ☞ here
I am pretty sure I haven’t found all Twitter-like/Twitter-related NoSQL apps out there, so please feel free to send me more. I’ll be happy to update the post.
And in case you are not interested in NoSQL Twitter applications, then you can check the MongoDB-based forum/message-boards apps.