Persistant Data

5 views
Skip to first unread message

Scott

unread,
Jul 13, 2009, 11:19:11 AM7/13/09
to ubiquity-firefox
Hi all,

Is there a current consensus on if (and/or how) ubiquity should allow
for persistent data? I am considering writing a command that would
make use of persistent data, but if such things are either taboo, or
unlikely to be supported in the future, I will probably try something
else.

Thanks in advance,
Scott

satyr

unread,
Jul 13, 2009, 11:38:06 AM7/13/09
to ubiquity...@googlegroups.com
What kind of persistence you mean?

Scott Condie

unread,
Jul 13, 2009, 1:21:54 PM7/13/09
to ubiquity...@googlegroups.com
I mean things like user preferences or other user-specific data to be stored across sessions.  A few simple examples :

1) Suppose that I dabble in the stock market.  While reading an article about a particular company, I consider adding the company to my portfolio.  It would be useful to me to know things like the average return on the company's stock and its volatility, skewness, etc.  All of these things can be found through a simple Ubiquity command that calls finance.yahoo.com or similar. 

However, what would be really useful is if I could easily calculate things like the covariance of this potential investment with my current portfolio.  In order to do this, I would need to save data on what my current portfolio is and what its historical returns have been.  If I have to enter this data (or ask Ubiquity to import it) every time I open Ubiquity (or even every time that I restart Firefox) then the tool quickly loses its fun.  For an example like this I would like Ubiquity to accept input like "correlate this with my portfolio," and have it know what to do.  Even something a little less human like, "correlate this with portfolio" would be fine.

2) I think such a feature would be quite useful in general.  For example, suppose that I could use local.google.com and yelp along with a saved state of the previous 6 restaurants I have frequented to write a command like "suggest different restaurants" where "different" knows that you are looking for something unlike the places you have already eaten this month.  An alternative would be "suggest similar restaurants."

3) Alternatively, consider a professional blogger who is perusing her friendly competition.  On a friend's site she finds a post that is similar to one of her posts from a few days ago and would like to comment on that.  So she highlights the tags on her friend's post and ubiqs "find posts similar to this on my blog", or if her blog is named "ReallyAwesome" then just "find similar posts on ReallyAwesome" (less human but probably easier to parse).  Ubiquity returns a list of links to posts with the same tags, she inserts the correct one into a comment like "Hey, great idea!  <a href="ubquity-inserted-link-to-post">Here are my thoughts on that issue.</a>".  Here, Ubiquity has to remember both what "my blog" or "ReallyAwesome" are and also the API that this individual's blogging platform uses to search and return results.

In general, it seems like a lot of power comes not just from combining monoline web services into mashups, but by being able to correlate (loosely speaking) the data returned from these web services with one's current state.

I have seen some third party thoughts on how to do this, but if this is something that has been considered internally I would love to hear thoughts about it.

Best,
Scott

satyr

unread,
Jul 13, 2009, 2:04:12 PM7/13/09
to ubiquity...@googlegroups.com
As of 0.5, there is a way to store data within command feeds:
* https://ubiquity.mozilla.com/trac/ticket/93
* http://gist.github.com/129184

Its status is still experimental and thus yet undocumented.
Feel free to test and/or criticize the API.

Scott Condie

unread,
Jul 13, 2009, 3:15:07 PM7/13/09
to ubiquity...@googlegroups.com
Thanks.  I'll have a look at it.
Reply all
Reply to author
Forward
0 new messages