Skip to content

Commit

Permalink
READMe + ShardManager
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 12, 2012
1 parent ea37c27 commit 5d06987
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
9 changes: 3 additions & 6 deletions AZURE_FEDERATIONS.md
Expand Up @@ -17,9 +17,8 @@ Implementing Federations inside a new Doctrine Sharding Extension. Some extensio
2. ORM (Object-Relational Mapper)

* Federation Key has to be part of the clustered index of the table
* Test with a pure Multi-Tenent App with Filtering = ON
* Test with example-app using Composite Key support (Filtering OFF possible)
* Extend ID Generation layer
* Test with a pure Multi-Tenent App with Filtering = ON (TaskList)
* Test with sharded app (Weather)
* Implement API that allow users to choose the shard target for any given query

## Example API:
Expand All @@ -32,8 +31,6 @@ Implementing Federations inside a new Doctrine Sharding Extension. Some extensio
'dbname' => 'dbname.database.windows.net',
'driverClass' => 'Doctrine\Shards\DBAL\SQLAzure\AzureConnection',
'sharding' => array(
'queryResolver' => 'Doctrine\Shards\DBAL\SQLAzure\AzureQueryResolver',
'shardResolver' => 'Doctrine\Shards\DBAL\SQLAzure\AzureShardResolver',
'federationName' => 'Orders_Federation',
'distributionKey' => 'CustID',
),
Expand Down Expand Up @@ -71,7 +68,7 @@ Implementing Federations inside a new Doctrine Sharding Extension. Some extensio
$shardManager->useShards( array($value1, $value2) );

## Shard Management API

@@@ php
<?php

Expand Down
24 changes: 1 addition & 23 deletions lib/Doctrine/Shards/DBAL/ShardManager.php
Expand Up @@ -29,18 +29,6 @@
*/
interface ShardManager
{
/**
* SELECT queries after this statement will be issued against all shards.
*
* Results are appended to each other in the order of the shards. No
* processing is done with regard to aggregates/distinct or other types of
* queries that are impossible to generically distribute accross databases.
*
* @param array $options
* @return void
*/
function useAllShards(array $options = array());

/**
* SELECT queries after this statement will be issued against the selected
* shard.
Expand All @@ -52,17 +40,7 @@ function useAllShards(array $options = array());
* @param array $options
* @return void
*/
function useShard($shardIdentifier, array $options = array());

/**
* SELECT queries after this statement are issued against the set of
* selected shards.
*
* @param array $shardIdentifiers
* @param array $options
* @return void
*/
function useShards(array $shardIdentifiers, array $options = array());
function selectShard($shardIdentifier, array $options = array());

/**
* Return an array of all the currently active shards with some details
Expand Down

0 comments on commit 5d06987

Please sign in to comment.