anchor.diff:              return currentSize = size
           }
           
  -        member this.SetResult(index: int, value: 'T, workerId : IWorkerId): Async<bool> = async { 
  -            let rangeKey = IndexedReferenceEntity.MakeRangeKey index
  +        member this.SetResult(index: int, value: 'T, _workerId : IWorkerId): Async<bool> = async { 
               let uri = sprintf "%s/%s" partitionKey (guid())
               do! S3Persist.PersistClosure(clusterId, value, uri, allowNewSifts = false)
  -            let entity = new IndexedReferenceEntity(hashKey, rangeKey, uri, workerId.Id, -1)
  -            let rec loop () = async {
  -                let! entities = getEntities()
  -                let guard = getGuard entities
  -                match tryGetEntity index entities with
  -                | Some index when index.S3Uri <> uri && enableOverWrite = false -> return guard.Counter = size
  -                | entOpt ->
  -                    try
  -                        if Option.isNone entOpt then
  -                            do! Table.update clusterId.DynamoDBAccount clusterId.RuntimeTable entity
  +            let id = sprintf "item%d" index
  +            let! item = getTable().UpdateItemAsync(TableKey.Hash hashKey, 
  +                                                    addEntry id uri, 
  +                                                    precondition = entryNotExists id)
   
  -                        let guard' = guard.Incr()
  -                        do! Table.update clusterId.DynamoDBAccount clusterId.RuntimeTable guard'
  -                        return guard.Counter = size
  -                    with e when StoreException.PreconditionFailed e ->
  -                        return! loop ()
  -            }
  -
  -            return! loop ()
  +            return item.AggregatedUris.Count = size
           }
           
           member this.ToArray(): Async<'T []> = async { 
  -            let! entities = getEntities()
  -            let guard = getGuard entities
  -            if guard.Counter <> size then
  -                return! Async.Raise <| new InvalidOperationException(sprintf "Result aggregator incomplete (%d/%d)." guard.Counter size)
  +            let! item = getTable().GetItemAsync(TableKey.Hash hashKey)
  +            if item.AggregatedUris.Count <> size then
  +                let msg = sprintf "Result aggregator incomplete (%d/%d)." item.AggregatedUris.Count size
  +                return! Async.Raise <| new InvalidOperationException(msg)
               else
                   return!
  -                    entities
  -                    |> Seq.filter (fun e -> e.S3Uri <> null) 
  -                    |> Seq.sortBy (fun r -> r.RangeKey)
  -                    |> Seq.map (fun e -> S3Persist.ReadPersistedClosure<'T>(clusterId, e.S3Uri))
  +                    item.AggregatedUris
  +                    |> Seq.sortBy (fun e -> e.Key)
  +                    |> Seq.map (fun e -> S3Persist.ReadPersistedClosure<'T>(clusterId, e.Value))
                       |> Async.Parallel
           }
   
   [<Sealed; AutoSerializable(false)>]
   type DynamoDBResultAggregatorFactory private (clusterId : ClusterId) =
  +    let getTable() = clusterId.GetRuntimeTable<ResultAggregatorEntry>()
       interface ICloudResultAggregatorFactory with
  -        member x.CreateResultAggregator(_aggregatorId : string, capacity: int): Async<ICloudResultAggregator<'T>> = async {
  -            let partitionKey = guid()
  -            let guard = new IndexedReferenceEntity(partitionKey, IndexedReferenceEntity.DefaultRangeKey, null, null, counter = 0)
  -            do! Table.put clusterId.S3Account clusterId.RuntimeTable guard
  -            return new ResultAggregator<'T>(clusterId, partitionKey, capacity) :> ICloudResultAggregator<'T>
  +        member x.CreateResultAggregator(aggregatorId : string, capacity: int): Async<ICloudResultAggregator<'T>> = async {
  +            let item = { Id = aggregatorId ; Capacity = capacity ; AggregatedUris = Map.empty }
  +            let! _ = getTable().PutItemAsync(item, itemDoesNotExist)
  +            return new ResultAggregator<'T>(clusterId, aggregatorId, capacity) :> ICloudResultAggregator<'T>
           }
       
       static member Create(clusterId : ClusterId) = new DynamoDBResultAggregatorFactory(clusterId)
positive.code:         member this.Capacity: int = size
          
          member this.CurrentSize: Async<int> = async {
              let! entities = getEntities ()
              let guard = getGuard entities
              return guard.Counter
          }
          
          member this.Dispose(): Async<unit> = async {
              let! records = getEntities ()
              do! Table.deleteBatch clusterId.DynamoDBAccount clusterId.RuntimeTable records
              do! 
                  records
                  |> Seq.choose (fun r -> match r.S3Uri with null -> None | uri -> Some uri)
                  |> Seq.map (fun uri -> S3Persist.DeletePersistedClosure(clusterId, uri))
                  |> Async.Parallel
                  |> Async.Ignore
          }
  
negative.code: open MBrace.AWS.Runtime.Utilities
  open MBrace.AWS
  
  open FSharp.DynamoDB
  
   [<AutoOpen>]
   module private ResultAggregatorImpl =
  
      [<ConstantRangeKey("RangeKey", "ResultAggregator")>]
      type ResultAggregatorEntry =
          {
              [<HashKey; CustomName("HashKey")>]
              Id : string
  
              Capacity : int
  
              AggregatedUris : Map<string, string>
          }
  
      let template = RecordTemplate.Define<ResultAggregatorEntry>()
  
      let entryNotExists = 
          <@ fun id r -> r.AggregatedUris |> Map.containsKey id |> not @>
          |> template.PrecomputeConditionalExpr
  
      let addEntry =
          <@ fun id path r -> { r with AggregatedUris = r.AggregatedUris |> Map.add id path } @>
          |> template.PrecomputeUpdateExpr
  
  [<DataContract; Sealed>]
  type ResultAggregator<'T> internal (clusterId : ClusterId, hashKey : string, size : int) =
      let [<DataMember(Name = "ClusterId")>] clusterId = clusterId
      let [<DataMember(Name = "HashKey")>] partitionKey = hashKey
      let [<DataMember(Name = "Size")>] size = size
  
      let getTable() = clusterId.GetRuntimeTable<ResultAggregatorEntry>()
  
      member this.UUID = hashKey
  
  