New 1.7 SimpleDB API, batch puts, and replace

4 views
Skip to first unread message

tim_darby

unread,
Jul 7, 2010, 1:43:32 PM7/7/10
to typica
Hi,

First up, I've almost entirely switched to the refactored SimpleDB API
and I find it has cleaned up my code nicely.

Just thought I'd check in case I've missed something, but it looks to
me like I can't combine use of batchPutAttributes with setting the
'replace=true' flag on the attributes, as its either
batchPutAttributes which takes a list of items, or its
replaceAttributes, which just takes the key and the map of replaced
attributes.

Is this correct, and if so is there any possibility of getting the API
enhanced to include a batchReplaceAttributes?, as I've got some code
which otherwise will be taking a dip in performance with the switch

Thanks

Tim

David Kavanagh

unread,
Jul 9, 2010, 4:42:23 PM7/9/10
to typ...@googlegroups.com
Now that I'm looking at this, I see what you mean. In simplifying the Item interface to be more precise, I did away with the "per attribute" replace flag. I figured that'd be defined in the API functionality.
I wonder if anyone uses replace on an attr by attr basis? Can batchPutAttributes have an additional replace flag param?

David


--
You received this message because you are subscribed to the Google Groups "typica" group.
To post to this group, send email to typ...@googlegroups.com.
To unsubscribe from this group, send email to typica+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/typica?hl=en.


tim_darby

unread,
Jul 22, 2010, 7:50:41 AM7/22/10
to typica
This would set the replace flag on all the attr changes, yes? That'd
be fine by me as for all my use cases I either know I need to replace
for the call generally, or know I don't need to, but can't really know
ahead of time if I can afford the cheaper non-replace on some but not
others.

In short, for me, that'd be great.
> > typica+un...@googlegroups.com<typica%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages