A note about navigation: on all pages, click on the image of
Pluto-Charon at the top of the page to return to this launch page.
The primary goal of the Pluton Framework is to replace large, brittle,
high latency, network applications embedded in web servers with
smaller, flexible applications which use co-operative, independent
services in parallel to create a low-latency experience.
With pluton, you can isolate your application from all of these issues
and run them all in parallel to greatly reduce latency.
Introduction
Overview of pluton
Pluton is a framework which can help make network applications -
especially web server applications - faster, lighter-weight, easier to
debug, and potentially less resource intensive. The core
features of the framework include:
A simple example
Imagine you have a web application that makes calls to "getAd",
"lookupUser" and "getBuddies". All of these functions are currently
implemented as libraries which:
Is pluton right for you?
A series of tests to help you decide whether pluton is right for
you.
| Situation | How pluton can help |
|---|---|
| Your web application makes a number of network requests to remote services | pluton can execute all of these requests in parallel and dramatically reduce your aggregate latency |
| Tuning your web application is complex due to the unknown performance of all the dependencies | pluton isolates components and reports on their system resource usage |
| Your web application core dumps in mysterious ways (and you suspect a 3rd-party library you have no control over) | Use pluton to isolate components so that buggy libraries do not impact the core application |
| Your web application makes calls to libraries that can block for too long (or that have timeouts you can't control) | Move the library into a service then you control how long you wait for the service |
| Your web application is using a library that leaks memory | Place the library in a separate service and your problem goes away |
| Your PHP application wants access to a library that is only available in C++ | Write a small C++ service that calls that library then change your PHP application to call the service |
| Your Java application wants access to a library that is only available in PHP | Write a small PHP service that calls that library then change your Java application to call the service |
| Your C++ application wants access to a library that is only available in Java | Write a small Java service that calls that library then change your C++ application to call the service |
| You have computationally intensive operations that you would like to run in parallel | Move the computation into a separate service and invoke multiple instances in parallel to take full advantage of all the CPUs and cores on the system |
| You want to prototype new functionality in a fast-to-write language like PHP, but be able to easily change to a fast-to-execute language like C++ | Create the functionality as a service then write it in any language you wish without ever having to worry about language dependencies |
| You have rapidly changing functionality and continually reloading your web server has a negative user impact | Place the functionality in a service as replacing services is completely transparent and non-disruptive |
| Your web application has a very heavy memory footprint due to the large number of libraries you use | Move the libraries into separate services and dramatically reduce the footprint of your web server instances. If done comprehensively, your web application may be so light-weight as to allow keep-alives |
The key concept is that you move the major functions of your web application out into a separate set of executable programs. These separate executable programs are called services in pluton parlance and are managed for you by the plutonManager.
By way of example, if your web application currently calls subroutine
AgetAd then subroutine BlookupUser and
finally subroutine CfindBuddies, you can turn those
subroutines into separate services and use pluton to exchange
requests with those services. The value-add is that pluton
makes this very easy to do.
And why would you want to move subroutines out of your application into separate services? The reasons are many.
For a start, pluton makes it trivially easy to call those three
services in parallel - even in languages that do not support parallel
processing such as PHP. If AgetAd,
BlookupUser or CfindBuddies happen to
involve high latency network requests, pluton automatically overlaps
this latency and improved the response time of your web server -
possible dramatically. Performance!
A second reason for moving a subroutine or function out into a
pluton service is that it insulates your application from that
function. If subroutine AgetAd happens to be a bit buggy
or subroutine BlookupUser has memory leaks or subroutine
CfindBuddies tends to dump core, moving it to a pluton
service completely insulates your main application from those
problems. Resilience!
A third reason for moving large subroutines into a pluton service is that it can significantly reduce the memory footprint of your web service and make it possible to run many more instances of your web service on a given system. Efficiency!
There are numerous other benefits too, but since we've reached your
floor, we'll finish with this summary:
By using pluton you can end up with smaller faster web applications
that are much more stable and use less resources. True!
Documentation
Background Reading
For general reading start with the overview
document. For a detailed understanding, you might want to read the background and motivation as well as the design document.
There is a special C++ API that supports programs written with
State Threads
or
libevent. This
C++ Non-blocking API is specifically
designed to integrate with these systems.
Main Components
The main components of the Pluton Framework include:
For Programmers
Currently pluton has language bindings for C++, C, PHP, Java and perl.
Writing Service Programs
There are separate pages explaining how to
structure and
how to
test your service.
If you are looking for an existing service to use, this catalog of services might be of use.