ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Membase Amazon SimpleDB MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

PHP: All content tagged as PHP in NoSQL databases and polyglot persistence

PHP and MongoDB Tutorial

Derick Rethans’s1 slides are a good MongoDB tutorial for PHP developers covering most of the API.


Activity Feeds with Redis

The how:

One brief note about architecture: since it’s impractical to simply query the activity of 500 friends, there are two general approaches for building scalable news feeds:

  1. Fan-out on read (do these queries ahead of time and cache them)
  2. Fan-out on-write (write follower-specific copies of every activity so when a given user asks for a feed you can retrieve it in one, simple query)

blog.waxman.me

And why Redis:

First off, why Redis? It’s fast, our data model allows us to store minimal data in each feed entry, and Redis’ data-types are pretty well suited for an activity feed. Lists might seem like an obvious choice and could work for a basic feed implementation, but we ended up using sorted sets for two reasons:

  1. If you use a timestamp as the score parameter, you can really easily query for feed items based on time
  2. You can easily get the union of multiple sorted sets in order to generate an aggregated “friend feed”

nleach.com

Then the code in Ruby and PHP

Original title and link: Activity Feeds with Redis (NoSQL databases © myNoSQL)


Create a blog with MongoDB and Zend Framework

We never run out of the “hello worlds” of the web applications NoSQL-based blogs:

Now this article should have given you a good idea of just how easy it is to integrate MongoDb and the Zend Framework, specifically with the Shanty-Mongo library. I appreciate that there are a lot of things that I’ve not covered here, like the forms, proper security and more thorough validation. I’ve also not gone in to a lot of detail about the wide variety of features that are available with MongoDB, such as storing documents and exactly how replication works. But I hope that I’ve whet your appetite for learning more.

We’ve had a blog engine based on MongoDB using Mongomapper and also a guide to Zend and MongoDB to be run on one of the MongoDB cloud hosts, but never a blog with MongoDB and Zend. All combinations allowed!

Original title and link: Create a blog with MongoDB and Zend Framework (NoSQL databases © myNoSQL)

via: http://www.maltblue.com/2010/11/uncategorized/writing-a-simple-blog-with-zend-framework-and-mongodb


Redis and PHP: What Library to use?

Ori Pekelman discusses in two posts — here and here — the status of the various PHP libraries for Redis:

After looking at all of these I quickly turned to the C extension, Redisent looked nice but did not implement the new unified bulk protocol, and to be true, the code was a bit buggy. The others (Predis, Rediska ) seemed like bloatware, that capture the real essence of PHP (making complicated incoherent APIs) while missing that of Redis (Simple, Fast, Awsomeness).

As you can imagine such a comment generated some reactions and Ori followed up with a (not exactly scientific) benchmark:

Redis PHP Libraries Benchmark

While initially considering 6 PHP libraries (phpredis, Predis, Redis PHP bindings (deprecated), Redisent, Rediska), the benchmark didn’t include Rediska as the library is defining a too custom API for Redis.

Do you have a different experiences with any of these Redis PHP libraries?

Original title and link: Redis and PHP: What Library to use? (NoSQL databases © myNoSQL)


CouchDB and PHP Video Tutorial

Besides LAMP, you can now learn about LAP(hp)-CouchDB-:

PHP developers generally use MySQL, but the rise of NoSQL databases has opened up new options for creating web apps. CouchDB’s unique replication feature set and easy API make it a great fit for PHP developers looking to move into a NoSQL database.

Original title and link: CouchDB and PHP (NoSQL databases © myNoSQL)


PHP Doctrine and CouchDB

I already mentioned Doctrine support for CouchDB, but couldn’t find the reference before:

As I blogged recently we started working on CouchDB support on top of the Doctrine2 infrastructure back at FrOSCamp. […] Like I was in #couchdb on freenode the other day and David asked a fairly legitimate question: “can you enlighten me as to why you’d need an ORM on top of native json object”? In this blog post I will try to explain why it makes sense to add a model based infrastructure underneath a NoSQL database.

Still not completely convinced

Original title and link: PHP Doctrine and CouchDB (NoSQL databases © myNoSQL)

via: http://pooteeweet.org/blog/0/1832


Doctrine: MongoDB Object Document Mapper for PHP

Jonathan Wage’s preso:

And I think I’ve read the Doctrine is now working on tightly integrating with CouchDB too.

Original title and link: Doctrine: MongoDB Object Document Mapper for PHP (NoSQL databases © myNoSQL)


MongoDB: A ToDo App with Ruby and PHP

Sort of ☞ todo.txt, but using MongoDB with ☞ Ruby or ☞ PHP:

Earlier this summer, we kicked off a series on MongoDB where the goal was to write a simple todo application using native MongoDB drivers and three of our favorite scripting languages.

Original title and link: MongoDB: A ToDo App with Ruby and PHP (NoSQL databases © myNoSQL)


Redis: Implementing Auto Complete or How to build Trie on Redis

In the days the news are about instant searches and auto complete, Salvatore Sanfilippo (@antirez) shows how to use Redis sorted sets and corresponding commands (ZRANGE, ZRANK) to implement autocompletion:

The initial code in Ruby:

already got ported to Python:

and ☞ Java and ☞ PHP.

As Ilya Grigorik (@igrigorik) commented, this is building a ☞ Trie with Redis.

Original title and link: Redis: Implementing Auto Complete or How to build Trie on Redis (NoSQL databases © myNoSQL)

via: http://antirez.com/post/autocomplete-with-redis.html


CouchDB: Getting Started using PHP

I hope you like this first sight of the CouchDB database. Couch have many other features, but the documents and views are the central part of the system : once those are well understood, the rest is easily understandable. The most difficult part, as said in the introduction, is to forget years of SQL thinking to build web applications.

Definitely not the first CouchDB and PHP guide — see Quick guide to CouchDB and PHP, CouchDB basics for PHP developers, A not-so-quick guide to CouchDB with PHP — and most probably not the last and/or definitive one.

Original title and link for this post: CouchDB: Getting Started using PHP (published on the NoSQL blog: myNoSQL)

via: http://devzone.zend.com/article/12523