Hi Erik,
I am not actually sure what the strict upper limits are, but will research and get back to you.
In practice, I believe you should be able to store at least a MB per key, but if you're doing that from a client application, it's likely unusable if you're doing sets that big from the browser. I believe the key limit shouldn't be an issue for a diary, but will try to get you an exact number.
Only keys are indexed. The API's name choice is poor for the args, "keys" is actually an object specifying both the keys and vals. I'll try to update the API docs to be clearer about this and request we update the API as well. You just specify key vals as a javascript object, e.g. for key "a" with val "foo" and key "b" with val "bar", you'd use: openmail.Application.setData( { keys : { a : foo, b : bar }}, . . .);
Have a look at the Memories sample app and see if that makes sense:
http://developer.yahoo.com/mailapplications/samples/memories.html
-j
QUOTE
(Erik Pearson @ 21 Aug 2011 12:08 PM)Hi,
I'm taking my first look at Yahoo Mail App development, and have a few questions. First is regarding the per application data persistence feature. I've read the api -- very simple! For one, I'm interested in data size limitations. Is there a strict upper limit on the size of object that can be stored? The number of objects that can be stored per application?
Second, the api is key/value based, but it looks like there is no unindexed value associated with the key. Without understanding the indexing implementation - I can imagine performance problems using this api to implement something like a diary, where an key might be composed of diary name, entry date, and the entry content. A typical key/value store would have a key composed of [diary name, date] with a value of [entry content], however it looks like the Yahoo mail app api would implement this as a key of [diary name, date, entry content].
Partial key searches? Of course, I'd like to be able to fetch a list of diary entries based on just the diary name, or even a range based on a beginning and ending key.
Any additional technical information or roadmap for this service? I mean, if this is meant to be the Yahoo answer to Google's BigTable, etc. it needs a bit more meat on the bones.
Am I barking up the wrong tree? For more sophisticated data storage, are apps supposed to use their own web service?
Thanks for considering these questions,
Erik.