Develop a URL Snapshot service, and Image Repository using node.js

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Web Development Posted 2 years ago


Less than 30 hrs/week
Less than 1 week

Intermediate Level

I am looking for a mix of experience and value


The project is to build a URL Snapshot Service And Image Repository

There are three major components:

1. URL Snapshot Service, to create snapshots of URLs (node.js)
2. Image Repo, to cache images created by the snapshot service (node.js)
3. Java client, to access the Snapshot Service (Java)

Part 1: The URL Snapshot Service

The service takes as input a URL, screen resolution, and scale factor. It will render the URL as viewed at the supplied screen resolution, and scale the image based on the scale factor.

It will then name the image using a SHA-1 hash of the URL, and save the image to the specified repo directory. The return value will be a URL to the image as served by the Image Repo.

The service should maintain a timestamp of every snapshot request, per URL/resolution. When the service receives a request, it should first check the most recent timestamp. If the age of the latest request is less than the TTL, it should return the existing URL to the most recent image, rather than taking a new snapshot.

If there is an error rendering the URL, or the URL is invalid, the service should return a link to a “render error” image.

Simultaneous calls to render the same URL should be synchronized, such that the first call will render the URL, and subsequent calls will not.

The service should log requests/failures to

Part 2: The Image Repo

This is a basic HTTP server that serves the static images from the repo directory.  It includes a daemon process to clean images that are older than the specified TTL.

It should log cache hits/misses, as well as cleanups, waits (when multiple calls to the same URL are queued), as well as the size of the image cache, to

Both the snapshot service and image repo should run within the same node.js context.

Part 3: The Java Client

A lightweight Java client must be written, to call the URL snapper service.

Example client:

// create a new client
SnapshotClient client=new SnapshotClient(“localhost:7910”);
// take a snapshot of as viewed at 1280x1024
// and reduce to an image half that size
String imgUrl=client.snap(“”, 1280, 1024, 0.5);

The client should return something like this:

Example service startup:

node service.js snapshotPort=7910 repoPort=7911 repoDir=/img extRepoAddress= ttl=259200000 keenProjectId=someId keenWriteKey=writeKey keenReadKey=readKey

This should start the snapshot service to listen on port 7910. The image repo will listen on port 7911. When the snapshot service constructs the return URL, it uses extRepoAddress as the base of the return URL. This is because the repo will be accessed from the WAN, and WAN the address will be different from the local address.

Helpful Links:

// render image from URL
// fasht sha-1 algorithm
// listening on multiple ports
// creating a static file server with in-memory cache

About the Client

(5.00) 5 reviews

United States
San Francisco 07:11 AM

10 Jobs Posted
80% Hire Rate, 1 Open Job

$3,173 Total Spent
10 Hires, 0 Active

$12.67/hr Avg Hourly Rate Paid
231 Hours

Member Since Oct 8, 2009