You want to run this service on your own server?
No problem, here is how:
What you will need
- A linux/bsd/unix based server
- memcached
- A working Xorg or X11 configuration
- A VNC server/client package
- Python, whith a couple of modules
- Xulrunner, or a development build of Geko with python bindings
- Time
The python modules needed are:
Nothing to be frightened of, even if the service relies heavily on many existing tools, and as such, you need to have them all setup first.
The whole process is fairly simple.
Historically, the service was a simple script, that was called by PHP.
But, flash and java applets where prone to crash the shooter at the time, and the success rate was very low, with a lot of stalled process left on the server.
Over the time, I have developped a python based application that act as a middle man; it receive screenshots requests and forward them to the script. But it monitors the script too, and is able to kill it if the process seems stalled.
This part is called the controller.
To allow the shooter and a web site to communicate and transmit images, memcached is used (although you can use a file based storage too from the shooter).
The key that is used to store the picture is an md5'ed value composed from the url, output size, output type, output quality and cropping parameters.
That's all?
Well, yes.
I have given a long thought about giving this back to the community, and decided to go forward.
But, as my work is now almost exclusively to databases, I decided to release it "as is".
Meaning that I only commented it a bit, but decided not to pack it, and document it extensively.
A seasoned developper could certainly find many flaws about this code, but it runs well enough for that even an old Pentium 4 with enough memory can run several screenshots concurrently.
Consider it a "do as you want" licence. I myself got inspired by many individuals and bit of codes I found when I looked to build this.
My only request would be that you mention me if you build something over this humble piece of code.
Or almost...
Those instructions are covering the basics only. This website uses a postgresql database as second level (long time) cache, and a python interface has been developped to integrate the web site with the controller.
Those are not covered here, as they are out of the scope of the screenshoting process in itself.
Grab everything here!
I haven't understood a single word, can you do it for me?
Well, if you want me to setup this service on your server, of course I can do it.
Simply drop me an email at tschork@web-screenshots.com and we will discuss it.
Usually, a full working install can be done in less than 2 hours.
The linux distribution this service has been installed until now are:
- Gentoo linux
- Ubuntu Linux server
- Debian Linux
- Centos
