HOWTO

A sparts service typically consists of two parts, the core "service",
and its "tasks". Background and offline processing are generally done
by tasks, while common or shared functionality belongs to the service.

Service

sparts.vtask.VService - This is the core of any sparts service.

Simply subclass VService for any custom service instance logic, and
run its initFromCLI() and you are done.

This simple service, by itself, is pretty damn useless. That's where Tasks come into play

Tasks

sparts.vtask.VTask - This is the base class for all tasks

Tasks are what trigger your program to take action. This action can be
processing periodic events, handling HTTP requests, handling thrift
requests, working on items from a queue, waking up on an event,
operating some ioloop, or whatever.

Here's a simple example of a service with tasks (requires tornado
installed):