Task

The task is to create a PHP application that fetches data from remote websites, parses HTML code and displays the result in a simple way, using HTML elements. We want to test your ability to understand basic web programming techniques, and to write clean, high quality code.

From page http://www.wikidot.com/ get sites from the "Featured Sites" section. For each of the sites go to <SITE_URL>/system:members and count number of members. Show the result in a simple table:

Site Link Number of members
Cocktails http://cocktails.wikidot.com 1

To prevent fetching data with each request to your script, store results in a local cache (e.g. Memcached).

We care about the code you write. Do not add fancy features. You get points for efficient design, accurate understanding of the task, functional minimalism, and clarity and expressiveness. Comments are not a substitute for readability.

We will stress-test your code, running 10, 100, and 1000 concurrent connections, to check for performance bottlenecks and scalability, by running ab -n 10000 -c 10/100/1000 http://localhost/your_script.php.

If you have difficulties or questions with any aspect of this exercise, you should ask us for help (leave a comment or send an e-mail): that will not be counted against you.

Environment

  • You can assume the Memcached server is running on 127.0.0.1:11211
  • All standard PHP extensions are available, including all XML parsing libs (DOM, SimpeXML etc).

Deliverables

You should produce:

  1. A small design document (README) that captures:
    1. your understanding of the problem, and
    2. your proposed architecture.
  2. A few test cases written in shell scripting

Pack those in tar.gz and send to moc.todikiw|rtoip#moc.todikiw|rtoip

Deadline

We are waiting till Friday, 9th Oct, noon (CEST).

Have questions? Ask them here! We are eager to help!

Add a New Comment
2007-2011 Copyright Wikidot Inc.