Category Archives: Booko

Posts about booko, some technical, some explaining new features

New Engine for Booko

Over the last few months traffic to Booko has been steadily growing – the kind of growth I like. Steady growth allows you to plan how to make things go faster without having to make crazy, on the fly tweaks to help things along (or stop them from falling over).  I’ve tried to design Booko to make it scale up easily – it’s basically split into two main components: the website is the front end, and the price grabber which is a separate bit of code, sits quietly in the background looking up prices. They talk to each other via the database – the website says “Hey Price Grabber, get me some prices for ISBN 123” (it does this by updating the database) , and the price grabber dutifully goes and grabs the prices and stores them in the database when it’s done, which the website then displays.

The idea was that I’d make the price grabber threaded, so that it could look up multiple books at once. Turns out, Ruby may not have been the best choice for a highly threaded, I/O based bit of code. Well, at least not Ruby 1.8. It’s interesting to see that JRuby may in fact be the best way to run this type of code.  Ruby 1.8’s threading model blocks on I/O – not great for my price grabber. The solution is pretty easy though – just run multiple price grabbers – which is what I’ve done. So, Booko can now have as many price grabbers as needed. They talk politely to each other via the database (so that, for example, two pricers don’t look up prices for the same book.)

This has been lightly tested but should be pretty stable – let me know if you have any problems getting prices.

Bugs, Outages and a new shop.

It’s been a long night – the generally excellent Slicehost apparently had a network outage tonight, taking Booko down with them. They kept their blog, forums and twitter up-to-date which was appreciated. The outage, not so appreciated.  When Booko came back up, naturally Fishpond was down, leading to some errors on Booko’s side.  I’ve updated Booko to be more resiliant to 3rd party outages likke this and things are definitely improving.

In addition, I’ve added Melbourne University’s Bookstore to Booko – they sell both books and DVDs so it’s a great addition to have. This brings us to 32 stores searched for books and 7 for DVDs.

BookDepository fix

BookDepository added a clever feature recently to display the appropriate currency depending on your location. Unfortunately for Booko we’re hosted in the US and we started getting US pricing. Naturally the price was incorrect when Booko the converts USD into AUD assuming the original price is GBP. Fixed as of around 07:45 this morning.

New Booko beta feature released – DVD pricing

It’s been a busy week with a bunch of updates for Booko. Check it:

DVD pricing

Major new feature for Booko released tonight as a beta feature – we now search Fishpond, Amazon.com & Amazon.co.uk for DVDs and grab pricing from 6 stores. This will be expanded as things settle down.  You can search by Title or by EAN/UPC (like ISBN for books).  There’s plenty of work to be done to make this better, but the basics are now in place. If you find any errors or weird behaviour, have some questions or just want to say hi, send me some email (bugz@booko.com.au) or leave a comment below.

More Caching

Booko is caching more agressively with Memcached.  It now remembers your search query between clicks and keeps the search field populated.  Search results are cached for 5 minutes currently – this means if you search for the same query, for the same type of item (Books or DVDs) the resutls will be available instantly.  Additionally, currency conversion rate information is now cached for an hour. I had assumed my conversion library did this already but apparently not – this has sped Booko up significantly, and the cart especially is much snappier.

Another Store + Updates

I’ve added another store to Booko – Amazon.ca bringing us to a total of 31 stores for books, and 6 for DVDs. Finally I can say “Searches more than 30 online stores!” 😉  In addition, query timeout are now set on all stores.  During the last few weeks there have been a couple of online stores go offline – this would leave Booko waiting for far too long for responses, slowing the site down significantly.

Bug fixes for the Fishpond parser.

Booko’s Fishpond parser was creating links to books on Fishpond which went into a never ending cycle of redirects, stop only when the browser was sick of it.  Hopefully this should all be fixed now. A quick glance through the referrer section of Fishpond shows that this has been happening for at least a week.  Sorry about that!

New search URL

Dan requested I make it possible to link directly to search results for passing around to friends.  Making functionality more easily accessible seemed like a good thing to do, so the controller now responds correctly to ajax and regular browser requests. Naturally had to add a work around for IE – life would be easier if nobody used it. But, needs must as the devil drives.  The result of all this is you can now access perform searches like this:

http://booko.com.au/books/search?q=permaculture

Bug fixes for bug fixes and a new shop – Text Books Oz

Recently I set up email notification for errors with help from this blog post.  Since then I’ve been getting the occasional email from Booko telling me when things go wrong.  It includes the URL accessed and a bunch of useful information for tracking down bugs.  Highly recommended for anyone running a RoR site. Helps you catch all sorts of errors which you can then, naturally, write tests for.  So as a result, I’ve fixed several bugs recently, introduced one that slowed search down by a factor, then removed it. 

In addition, I’ve added shop number 30 – Text Books Oz who specialise, (this won’t be a surprise) in text books.

New shops, some colour

Due to popular demand, I’ve added The Co-op Bookstore. I initially investigated the Co-op and decided against adding it, due to the fact that to get the member pricing you have to pay $20. Quite a few people have requested I add them, so add them I have. You’ll have to follow the link to their shop to get the member pricing however.  I’ve also added Chaos.com to the list, bringing Booko to 29 shops indexed.  

You’ll be shocked to see I’ve added some colour to Booko. I know it’s bold and out there, but I think it’s time. 🙂