Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Thursday, September 24, 2009

Twitter: good for lots of news

Since our redesign, coming up on a year ago, the news portion of our home page has been this blog. And while we've had some wonderful things to report, we haven't exactly had a great number of things to say. This was especially true over the past summer. We reported the NEA grant award on April 30th, and then nothing else until the word of Margo's retirement in late September. Because of our blog drought, one might think that not much has happened with accessCeramics over the summer. Of course, that's not entirely accurate: our collection grew by about 33%, or nearly 600 images.

Whenever an artist contributes images to accessCeramics, it's news-worthy. But perhaps based upon our limited time and resources, it wasn't necessarily blog-worthy. But thanks to Twitter and its API, that has changed. Now when Miranda accepts submitted images into the collection, a Twitter post is generated for each contributing artist to our Twitter feed via a PHP script and the Twitter API, and is logged in our MySQL database. And now that our home page news is based upon our Twitter feed instead of this blog, we can effectively promote new images on accessCeramics without any additional work.

We'll still maintain this blog for announcements that extend beyond Twitter's 140 character limit, and will reference any relevant blog posts on our Twitter feed. But with this new model of news, we can hopefully do a better job at promoting the artists and their new works on accessCeramics without extending our already limited resources.

And in case anyone wants to follow our Twitter feed directly, it's http://twitter.com/accessceramics

Tuesday, January 27, 2009

Flickr API improvements could yield more collections like accessCeramics

Last month Aaron Straup from Flickr announced four new API methods for machine tags (and also happened to mention our project!). One of these methods in particular, flickr.machinetags.getValues, inches Flickr closer to the idea of 'Flickr as database' for metadata storage.

In the past, if you wanted to find all the unique values of a given field (artist, for example), you had to query Flickr to get all the photos with 'artist' as a field, then make a call for each photo to get tag values...and then use a language like PHP to extract unique values. Once your collection gets past a few images, this sequence of events quickly becomes impractical.

With flickr.machinetags.getValues, you can get all unique values for a given field with just one call. This paves the way for creating UI links for browsing different values for fields. It also lessens the need to store metadata in a MySQL database, like we currently do.

As others have expressed interest in creating collections like accessCeramics, we've begun development on a more generic tool for cataloging Flickr images. We're also working on a companion presentation tool for viewing these catalogued collections. Thanks to the new API methods, the presentation software should run quickly, and shouldn't rely (much) on an external database. We'll post more information about this project as it becomes available.

Monday, April 21, 2008

Flickr Machine Tags Revisited

Over the weekend we added the ability to browse by different fields in accessCeramics. While this isn't really that hard of a problem, technologically speaking, it became clear that flickr machine tags couldn't handle this very well.


It came down to this. To get a list of the different values the images had for glaze, for example, we would have to do the following:

  • Make an API call to get a list of images in the collection

  • For each image, make an API call to get the list of tags & machine tags

  • Cycle through each set of tags and perform a regular expression match to find the 'glaze' machine tag, and store that value in a PHP array

  • Put the array in order, and print the results.


Or, if the metadata was in a local database like MySQL, we would have to:

  • Make an SQL query to the database, and process & print the results



In addition, the API doesn't support partial or truncated machine tag searches. For example, if I wanted to search for 'sculpture', I wouldn't get 'figurative sculpture' as part of my results set. This would require our users to be overly precise with their searches, which just isn't ideal design.

Because of situations like this, we decided to migrate the metadata to a MySQL database. We'll still include machine tag generation in Flickr as part of the process, in the event that API methods are added in the future. But storing all metadata in a local DB will greatly enhance the site's functionality and speed, especially as it grows to the volume we hope it will.

When this project began, we were hoping Flickr would be the database layer. To a certain extent it still is, but it just doesn't offer the same flexibility as a fairly simple MySQL database. It's still a cool idea, and hopefully Flickr will make some enhancements in the way machine tags are used and queried. With some of the recent chatter about an academic Flickr, hopefully the conversation that will move Flickr in that direction has begun.