Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
/ cloudopoly-search Public archive

This repository contains description of the first Cloudopoly challenge.

Notifications You must be signed in to change notification settings

latcraft/cloudopoly-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 

Repository files navigation

W00t?

This repository contains description of the first Cloudopoly challenge. Cloudopoly is a set of challenges targeted towards raising awareness of AWS stack. Winners will get prizes from AWS! The first Cloudopoly will have 3 challenges, one per month. By getting 3 times in top 3 you will win a special prize from LatCraft.

Problem definition

Publish a simple web service that accepts 3 keywords as a search criteria.

Web service must respond with the most popular book (with the highest average rating) for each keyword on the following Amazon websites:

  • amazon.co.uk
  • amazon.fr
  • amazon.de

Expected input:

http://<ip address>/search?query=Linux+Ubuntu+MacOs

Expected JSON response:

[
  "Practical Vim", 
  "Linux", 
  "Mac OS X Snow Leopard"
]

Average book rating calculation

Book rating should be calculated using the following formula:

R = (Rafr * Nafr + Rade * Nade + Rauk * Nauk) / (Nafr + Nade + Nauk)

  • Rafr - average rating on amazon.fr
  • Nafr - number of ratings on amazon.fr
  • Rade - average rating on amazon.de
  • Nade - number of ratings on amazon.de
  • Rauk - average rating on amazon.co.uk
  • Nauk - number of ratings on amazon.co.uk

NOTE: Only books with at least 15 reviews should be considered for result.

NOTE: For book title matching on different web sites, consider the following rule: remove everything that is after colon or semicolon (if any), and anything that is in the brackets (if any). If titles have the same rating, then return the one with the biggest number of reviews. If titles have the same rating and the same number in reviews, then return the one that goes first in alphabetical order.

Example searches

The following list shows example URLs that return book query results for a given KEYWORD on the web:

  • amazon.co.uk:
    • http://www.amazon.co.uk/s/ref=nb_sb_noss_1?
    • url=search-alias%3Dstripbooks&
    • field-keywords=[KEYWORD]&
    • sort=review-rank
  • amazon.de:
    • http://www.amazon.de/s/ref=nb_sb_noss_2?
    • url=search-alias%3Dstripbooks&
    • field-keywords=[KEYWORD]&
    • sort=review-rank
  • amazon.fr:
    • http://www.amazon.fr/s/ref=nb_sb_noss_2?
    • url=search-alias%3Denglish-books&
    • field-keywords=[KEYWORD]&
    • sort=review-rank

You can check your results here.

Requirements

  • Any programming language, any operating system
  • Deploy your service to AWS EC2 (free tier)
  • Use smallest instance type (t2.micro)
  • Send IP address of your service before 06.01.2015 16:00 to [email protected]
  • At 17:00 we start the test!

Winner election

Web services, which return the expected result faster, will win. Test data set consists of 3 queries, each query contains 3 keywords. Each query will be sent 3 times to the web service published at your IP address.

Good luck!

About

This repository contains description of the first Cloudopoly challenge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published