This site

    Recent site activity

    Project 1b

    Due Date: Mon 7 Feb

    Objectives

    • An understanding of the HTTP protocol and ReSTful web services
    • Further understanding of hosted, NoSQL databases
    • ReSTful client scripting

    Description

    Implement a small client-side script with the following functionality:
    • Connect to your database from project 1a using the generated API key.
    • Compute the two-dimensional center of gravity of your points, described by the averages of the x and y values taken as a point.
    • Determine the most frequently occurring color.
    • Shift all points uniformly by a given x-y offset.
    Deal gracefully with error situations such as
    • no points
    • several colors with the same frequency
    While it is possible to implement this functionality as a shell script, it is much easier to use a scripting language such as Groovy, Python, or Ruby. Your best bet is to use any available libraries for
    • HTTP/ReST client functionality
    • CouchDB
    • JSON
    and most modern scripting languages have very convenient ways to pull these libraries into your script.

    You may want to take a look at this article or the very simple Groovy example in my repository.

    Submission

    Please submit your client-side script and any unmanaged dependencies in a folder named project1b in your shared group repository.
    Comments