Client-side update API?

7 views
Skip to first unread message

David

unread,
Mar 29, 2011, 5:17:59 PM3/29/11
to FluidDB Discuss
I'm thinking about creating a fluidinfo application. It's a pure
client-side (browser/javascript) app. I assume I can read fluidinfo
using jsonp. I wonder whether there's been thought to allowing
javascript to _update_ the fluidinfo db? Cross-site scripting being
the big barrier. Is there a mechanism for using a jsonp-style
approach (putting the update you want to make into a script tag)? Or
am I going to have to write a server proxy to reflect changes back to
fluidinfo?

Nicholas Tollervey

unread,
Mar 29, 2011, 5:23:44 PM3/29/11
to fluiddb...@googlegroups.com
Hi David,

Fluidinfo has basic support for CORS (see
https://secure.wikimedia.org/wikipedia/en/wiki/Cross-Origin_Resource_Sharing)
which I've successfully used on several occasions.

Happy to answer any questions you may have.

All the best,

Nicholas.

David

unread,
Mar 29, 2011, 10:55:44 PM3/29/11
to FluidDB Discuss
thanks! I'll investigate.

On Mar 29, 5:23 pm, Nicholas Tollervey <ntoller...@gmail.com> wrote:
> Hi David,
>
> Fluidinfo has basic support for CORS (seehttps://secure.wikimedia.org/wikipedia/en/wiki/Cross-Origin_Resource_...)
> which I've successfully used on several occasions.
>
> Happy to answer any questions you may have.
>
> All the best,
>
> Nicholas.
>

David

unread,
Mar 30, 2011, 9:46:10 AM3/30/11
to FluidDB Discuss
OK, CORS sounds like it can do what I want. But I'm a copy-and-paste
programmer. Is there anywhere I can find an example of a page that
uses CORS to post changes to fluidinfo? Ideally using this nice
jquery plugin:
http://plugins.jquery.com/project/cors

Nicholas Tollervey

unread,
Mar 31, 2011, 5:39:30 AM3/31/11
to fluiddb...@googlegroups.com
Hi David,

You could use one of the existing Javscript client libraries that sit
atop jQuery. They should just work with no problems (if there are any
please let me know and I'll see if I can help). They're listed on the
developer's page at http://fluidinfo.com/developers

Nicholas

David

unread,
Mar 31, 2011, 11:57:57 AM3/31/11
to FluidDB Discuss
OK, that looks great. Moving on to the next problem. Obviously, if
I'm going to build a fluidinfo app, it would be nice to figure out
what data is currently in fi that I could play with. I don't think
I'm particularly obtuse, but mousing around on the fluidinfo I could
find no way to answer that question. No link taking me to a data
catalog, or to sample applications for browsing the data, or
anything. Lots of links to libraries, apis, documentation, etc., but
I come away with the impression of a framework with no current content
or usage. Is this accurate?

On Mar 31, 5:39 am, Nicholas Tollervey <ntoller...@gmail.com> wrote:
> Hi David,
>
> You could use one of the existing Javscript client libraries that sit
> atop jQuery. They should just work with no problems (if there are any
> please let me know and I'll see if I can help). They're listed on the
> developer's page athttp://fluidinfo.com/developers
>
> Nicholas

Emanuel Carnevale

unread,
Mar 31, 2011, 1:07:33 PM3/31/11
to fluiddb...@googlegroups.com, FluidDB Discuss
Hi David,
CORS support for the JavaScript library is in the works and it may be available in the next days.

If you need help with the existing libs, just ask here.

Emanuel

Sent from my iPhone

David

unread,
Mar 31, 2011, 9:09:53 PM3/31/11
to FluidDB Discuss
Still wondering: is there data _in_ the fluidinfo that I could use to
drive my app? Where can I find it? Or do I need to create data as
well?

On Mar 31, 1:07 pm, Emanuel Carnevale <emanuel.carnev...@gmail.com>
wrote:
> Hi David,
> CORS support for the JavaScript library is in the works and it may be available in the next days.
>
> If you need help with the existing libs, just ask here.
>
> Emanuel
>
> Sent from my iPhone
>

Nick Radcliffe

unread,
Apr 1, 2011, 1:57:27 AM4/1/11
to Nicholas Radcliffe, fluiddb...@googlegroups.com
Hi David

There's lots of data in Fluidinfo that you could use, but you're
right, there's not really a central directory that gives you a guide
to it.

Examples that I know about include:

Books: There are certainly entries for a few thousand books. These
(almost all) have about tags that start 'book:' so you can find them
with a query like

fluiddb/about matches "book:"

[For example, if you use my fdb.py library from the command like you
can do stuff like this:

fdb count -q 'fluiddb/about matches "book:"'
6292 objects matched
Total: 6292 objects

Some conventions for about tags that will help you find at least a few
collections of objects can be found at:

http://blog.abouttag.com/2010/03/about-tag-conventions-in-fluiddb.html

and there's a tool for visualizing their tags at

http://abouttag.appspot.com/

and in fact if you look at the recent items people have looked at,
that will sometimes give you some idea of the sorts of things you can
find.

Another common type of object in FluidDB is URLs, typically with about
tag that is the URL itself, e.g.

fdb show -q 'fluiddb/about = "http://www.google.com"' /about1 object
matched
Object e75abb22-2f3c-45dd-9429-fce0a78f82f2:
/fluiddb/about = "http://www.google.com"

(You can see what's attached to it here:

https://abouttag.appspot.com/butterfly/about/http://www.google.com

as long as your browser wasn't built by Microsoft.)

If you look on the Fluidinfo blog, you'll find posts about specific
datasets like (recently) all the publications from O'Reilly, all the
boing-boing posts etc.

Hope thus helps a bit.

Nick

On 1 Apr 2011, at 06:46, Nicholas Radcliffe wrote:

> Hi David
>
> There's lots of data in Fluidinfo that you could use, but you're
> right, there's not really a central directory that gives you a guide
> to it.
>
> Examples that I know about include:
>
> Books: There are certainly entries for a few thousand books. These
> (almost all) have about tags that start 'book:' so you can find them
> with a query like
>
> fluiddb/about matches "book:"
>
> [For example, if you use my fdb.py library from the command like you
> can do stuff like this:
>
> fdb count -q 'fluiddb/about matches "book:"'
> 6292 objects matched
> Total: 6292 objects
>
> Some conventions for about tags that will help you find at least a
> few collections of objects can be found at:
>
> http://blog.abouttag.com/2010/03/about-tag-conventions-in-fluiddb.html
>
> and there's a tool for visualizing their tags at
>
> http://abouttag.appspot.com/
>
> and in fact if you look at the recent items people have looked at,
> that will sometimes give you some idea of the sorts of things you
> can find.
>
> Another common type of object in FluidDB is URLs, typically with
> about tag that is the URL itself, e.g.
>
> fdb show -q 'fluiddb/about = "http://www.google.com"' /about1 object
> matched
> Object e75abb22-2f3c-45dd-9429-fce0a78f82f2:
> /fluiddb/about = "http://www.google.com"
>
> (You can see what's attached to it here:
>
> https://abouttag.appspot.com/butterfly/about/http://www.google.com
>
> as long as your browser wasn't built by Microsoft.)
>
> If you look on the Fluidinfo blog, you'll find posts about specific
> datasets like (recently) all the publications from O'Reilly, all the
> boing-boing posts etc.
>
> Hope thus helps a bit.
>
> Nick

> ________________________________________________________________________
>
> Nicholas J Radcliffe Stochastic Solutions Limited.
> www.stochasticsolutions.com n...@stochasticsolutions.com +44 7713
> 787 602
>
>
>

Bar Shirtcliff

unread,
Mar 31, 2011, 9:34:47 PM3/31/11
to FluidDB Discuss
Hi David,

There is data in FluidInfo that you can use. Have a look at @njr's
blog at abouttag.com. For example, here's a discussion of the 100 top
bestsellers over the last 12 years (in books):
http://blog.abouttag.com/2011/01/100-bestsellers-in-fluiddb-so-what.html

There's also the FluidInfo Explorer, which I believe is linked to from
the
Developer page. That's a really easy way to get to what's in
FluidInfo now.

Cheers,
Bar

Nicholas Tollervey

unread,
Apr 1, 2011, 4:26:35 AM4/1/11
to fluiddb...@googlegroups.com
Hi David,

There most definitely is data in Fluidinfo! :-)

The explorer (http://explorer.fluidinfo.com/fluidinfo) is a great
place to start. Off the top of my head here are some interesting
datasets that are already in Fluidinfo:

All the meta-data from data.gov and data.gov.uk (last updated in
December). Take a look in the data.gov and data.gov.uk namespaces.
(http://explorer.fluidinfo.com/fluidinfo/data.gov and
http://explorer.fluidinfo.com/fluidinfo/data.gov.uk)

The O'Reilly catalogue: look at tags under the oreilly.com top level
namespace. (http://explorer.fluidinfo.com/fluidinfo/oreilly.com)

The Bible (The Qu'ran is arriving soon): check out the kingjamesbible
top level namespace
(http://explorer.fluidinfo.com/fluidinfo/kingjamesbible)

Various geo related object (mainly UK pubs): check out the geo top
level namespace: http://explorer.fluidinfo.com/fluidinfo/geo

Twitter.com data used by the tickery.net application:
http://explorer.fluidinfo.com/fluidinfo/twitter.com

All the articles from BoingBoing.net:
http://explorer.fluidinfo.com/fluidinfo/boingboing.net

There's plenty of other data in there and one way to find it is via
the "fluiddb/about" tag. Nick Radcliffe's answer explains how this
works *really* well.

We're more than happy to answer any questions / help out if we can.
Keep the questions coming!

Best wishes,

Nicholas.

David

unread,
Apr 7, 2011, 10:31:07 PM4/7/11
to FluidDB Discuss
please do notify when cors shows up!

On Mar 31, 1:07 pm, Emanuel Carnevale <emanuel.carnev...@gmail.com>
wrote:
> Hi David,
> CORS support for the JavaScript library is in the works and it may be available in the next days.
>
> If you need help with the existing libs, just ask here.
>
> Emanuel
>
> Sent from my iPhone
>
Reply all
Reply to author
Forward
0 new messages