Just an update from my previous post. I’ve updated my little mashup to be a lot faster than it was and I still have a few optimizations in mind to speed it up even more. Also the site now handles any UK location (well the ones which google maps can geocode into a longitude and latitude) and finally I gave it a humorous name (well I found it funny).
Here’s the link again: UpYourAlley give the site a few seconds to load the markers and the same applies when you click on any marker.
Still there are a few little bugs and niggles that I need to sort out:
- If more than one venue is at the same location then only one is currently shown.
- The marker manager code I have isn’t as efficient and smart as I would like especially when scrolling around the map.
- I would like to be able to filter (on a search) events by category i.e. movies, arts, gigs etc…, but that should be trivial.
- More user feedback when loading data and handling failure when the users location cannot be geocoded.
- Plus more, more and then some more…
For those who care about why it’s faster now…. I previously generating the data set completely in PHP on the server-side, but as each api request was made in series to PA the time taken to gather just the venue data took around 15 seconds and when factoring in the events data for each venue this grew to minutes. So when I rewrote the site (waiting for Top Gear at 9pm on sunday night – I thought it started at 8pm!) I set all the requests* to be sent asynchronous from the client using jquery and surprise surprise everything ran faster, although more bandwidth is used and more requests are made in total.
* The requests are still proxied through PHP to PA as I strip out and sort some data as well as hiding the API key that I use.
I’ve been allowed to play around with a new web service developed by some former colleagues at the Press Association (PA). The service gives you some access to PA’s entertainment listings database (think guardian guide, listings section of the Metro and most other papers etc. it all comes from the same source).
The data is organized into venues (your local arts center), titles (a movie on nationwide release) and events (a title and venue combination at a specific start/end times). Or for the more data minded venues can have zero to many titles, titles can have zero to many venues, events have an unique combination of one title, one venue and a date & time.
Anyway to quickly try out the new service I knocked up a quick mashup of what events are on in my local area each day. Firstly this mashup is massively slow as my host doesn’t have memcached installed for personal use *cough* Dreamhost *cough*. This is also partially due to the structure of the web service as I have to make a lot of requests to generate this mashup, but I’ll keep that feedback confidential for now as the web service isn’t complete nor open to external use yet.
Anyway here’s the link: http://listings.magudia.com (please give it a minute or two to load the data – yes really).
Once I get some time to play with it some more
- I’ll open up the map to allow users to select their own local area
- Have some dynamic marker loading on scrolling
- Allow options to select which days to look for events (apart from today)
- Filter by event types (only gigs, cinemas, comedy or combinations thereof).
- Show more venue information
- Optionally show more information about the event or title
- Refactor, refactor, refactor…
For those interested the site uses jquery & the jmaps plugin to generate the map and gather data from a simple PHP proxy script which collates the data from PA into a JSON.
I can’t overstate how big a step forward this is for PA and hopefully we’ll see more of this from them in the future.
UPDATE: As always the moment you publish something is exactly the same moment you figure out how to fix the problem your having. I should be able to massively speed up the site, but I’m not going to do that today.