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\Db\Document Component Proposal

Proposed Component Name Zend\Db\Document
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend\Db\Document
Proposers Rostislav Mykhajliw
Zend Liaison TBD
Revision 1.0 - 12 April 2010: Initial Draft. (wiki revision: 35)

Table of Contents

1. Overview

Zend_Db_Document 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_Protobuff

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\Db\Document (factory class)
  • Zend\Db\Document\AbtractAdapter
  • Zend\Db\Document\AbstractDocument
  • Zend\Db\Document\AbstractCollection
  • Zend\Db\Document\Adapter\Mongo
  • Zend\Db\Document\Adapter\Couch
  • Zend\Db\Document\Adapter\Riak
  • Zend\Db\Document\Adapter\Redis
  • Zend\Db\Document\Adapter\Voldemort
  • Zend\Db\Document\Document\Mongo
  • Zend\Db\Document\Document\Couch
  • Zend\Db\Document\Document\Riak
  • Zend\Db\Document\Document\Redis
  • Zend\Db\Document\Document\Voldemort
  • Zend\Db\Document\Collection\Mongo
  • Zend\Db\Document\Collection\Couch
  • Zend\Db\Document\Collection\Riak
  • Zend\Db\Document\Collection\Redis
  • Zend\Db\Document\Collection\Voldemort

8. Use Cases

UC-01

Factory

UC-02

Use adapter for get object and store

UC-07

Create new document with document id

UC-08

Create new document with auto generated document id

9. Class Skeletons

Exceptions

Zend\Db\Document\AbstractAdapter

Zend\Db\Document\AsbtractDocument

Zend\Db\Document\Document

]]></ac:plain-text-body></ac:macro>

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