Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Storage Component Proposal

Proposed Component Name Zend_Storage
Developer Notes
Proposers Rostislav Mykhajliw
Zend Liaison TBD
Revision 1.0 - 12 April 2010: Initial Draft. (wiki revision: 21)

Table of Contents

1. Overview

Zend_Storage implements abstract interface to nosql storages.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

Currently Zend haven't got any adapters to NOSQL storages, but a lot of real application is needed this. Cause NOSQL stoges is more flexible than SQL RDMS, and provide to build a most powerful and performance application.

  • This component will provide adapters to NOSQL stores
  • This component will provide get/set operation
  • This component will provide update/save document operation
  • This component will provide MapRecude query interface
  • This component will provide Document object (similar to Zend_Db_Table_Row_Abstract)
  • This component will provide transformation adapters to support Zend_Db_Table

4. Dependencies on Other Framework Components

  • Zend_Json
  • Zend_Http_Client
  • Zend_Application_Resource_Abstract

5. Theory of Operation

The primary goal of this component is provide abstract interface to NoSQL storages, witch provide functional by get/set, search, map-reduce queries and very easy interface to update/save/validate document to storage. To do this, we must take several factors into account:

  • Transform output result set to array
  • Query languages are usually JavaScript, and How exactly build queries the most interesting is map-reduce queries. Cause for simple queries we can develop interface similar to Zend_Db_Select , witch current Adapter will transform into himself query language.
  • It must provide full interface to direct queries
  • In the first step adapter will provide simple interface get/set by key and direct interface for query.
  • Version of documents (in general storages return system field _rev for revision and _id for UID of document)
  • Integration with exist Zend_Db_Table
  • Integration validation document structure

6. Milestones / Tasks

The first implement most popular nosql storages MongoDB/CouchDB and later all exists.

  • Milestone 1: create abstract classes storages and document
  • Milestone 2: build base functionality get/set by key
  • Milestone 3: integrate query builder
  • Milestone 4: integrate query builder for map reduce
  • Milestone 5: do new adapters and go to Milestone 1 .

7. Class Index

  • Zend_Storage (factory class)
  • Zend_Storage_Adapter_Abtract
  • Zend_Storage_Adapter_MongoDB
  • Zend_Storage_Adapter_CouchDB
  • Zend_Storage_Adapter_Riak
  • Zend_Storage_Adapter_Redis
  • Zend_Storage_Adapter_MemcacheDB
  • Zend_Storage_Adapter_Casandra
  • Zend_Storage_Document
  • Zend_Storage_Query
  • Zend_Storage_Query_MapReduce
  • Zend_Application_Resource_Storage

8. Use Cases




Use adapter for get object and store


Select simple query with __call magic helper

Select simple query without magic helper

Select simple query direct


Use map reduce functions for calculate users with name "peter" by age

9. Class Skeletons






Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.