How easy and how fast can you download, install and start an complete Pharo Core based HTTP Server on a bare Linux machine ? It just takes OneCommandLine: $ curl http://zn.stfx.eu/zn/pharo-server.sh | bash In well under a minute (in 11 seconds below, actually), you can browse http://localhost:1701 and all this with way less than 20Mb being downloaded. Mind you, this is quick hack, for some this will be old news, for others I hope this feels like magic. Some notes: - pharo-server.sh will download, install and start a Pharo Smalltalk HTTP server - this script needs bash, curl, tar, unzip, at least, and was only tested on Ubuntu - no special permissions needed, all files will reside in ~/pharo-server - you will probably have to allow 1701 as a TCP port in your firewall for external access - technically, the most interesting thing is the script called st-exec.sh - you have to trust me that the installer is well-behaved, or have a look yourself ;-) Next is a terminal log of running this script, at the end there is a small benchmark showing what kind of performance you can expect from this setup (saving the best for last). The machine in question is an Amazon EC2 micro instance, the smallest, least powerful that you can get. Enjoy, Sven $ curl http://zn.stfx.eu/zn/pharo-server.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1336 100 1336 0 0 53525 0 --:--:-- --:--:-- --:--:-- 652k pharo-server.sh will download, install and start a Pharo Smalltalk HTTP server this script needs bash, curl, tar, unzip, at least, only tested on Ubuntu no special permissions needed, all files will reside in /home/ubuntu/pharo-server written by Sven Van Caekenberghe - http://stfx.eu starting @ Thu Jul 28 18:50:12 UTC 2011 creating work directory /home/ubuntu/pharo-server downloading latest Pharo Core 1.3 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 15.0M 100 15.0M 0 0 2408k 0 0:00:06 0:00:06 --:--:-- 2987k extracting Archive: pharo-core.zip inflating: PharoCore-1.3/PharoCore-1.3.changes inflating: PharoCore-1.3/PharoV10.sources inflating: PharoCore-1.3/PharoCore-1.3.image downloading a recent Cog VM % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1524k 100 1524k 0 0 366k 0 0:00:04 0:00:04 --:--:-- 539k extracting downloading st-exec % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2576 100 2576 0 0 99895 0 --:--:-- --:--:-- --:--:-- 1257k creating startup script pharo-server.st starting the server Executing ./st-exec.sh pharo-server start PharoCore-1.3 Working directory /home/ubuntu/pharo-server Starting pharo-server in background /home/ubuntu/pharo-server/coglinux/bin/squeak -vm-display-null -vm-sound-null /home/ubuntu/pharo-server/PharoCore-1.3.image /home/ubuntu/pharo-server/pharo-server.st to stop the server execute /home/ubuntu/pharo-server/st-exec.sh pharo-server stop PharoCore-1.3 you can now access the server at http://localhost:1701 try curl http://localhost:1701 or try ab -k -n 1024 -c 8 http://localhost:1701/bytes done @ Thu Jul 28 18:50:23 UTC 2011 $ curl http://localhost:1701 <html> <head> <title>Zinc HTTP Components</title> <style type="text/css"> body { color: black; background: white; width: 900px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; } p { width: 600px; padding: 0 20px 10px 20px; } ul,ol { width: 600px; padding: 0 5px 5px 30px; } #logo { color: orange; font-family: Helvetica, sans-serif; font-weight: bold; font-size: 100px; } </style> </head> <body> <div id="logo">Zn</div> <h1>Zinc HTTP Components</h1> <p> Welcome to Zinc HTTP Components, a modern, open-source Smalltalk framework to deal with the HTTP networking protocol. </p> <ul> <li>Project homepage <a href="http://homepage.mac.com/svc/Zinc-HTTP-Components/">http://homepage.mac.com/svc/Zinc-HTTP-Components/</a></li> <li>SqueakSouce page <a href="http://www.squeaksource.com/ZincHTTPComponents.html">http://www.squeaksource.com/ZincHTTPComponents.html</a></li> </ul> <ul> <li>Locally available pages <a href="/help">/help</a></li> </ul> <h4>May the Source be with you!</h4> </body> </html> $ ab -k -n 1024 -c 8 http://localhost:1701/bytes This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 102 requests Completed 204 requests Completed 306 requests Completed 408 requests Completed 510 requests Completed 612 requests Completed 714 requests Completed 816 requests Completed 918 requests Completed 1020 requests Finished 1024 requests Server Software: Zinc Server Hostname: localhost Server Port: 1701 Document Path: /bytes Document Length: 64 bytes Concurrency Level: 8 Time taken for tests: 0.371 seconds Complete requests: 1024 Failed requests: 0 Write errors: 0 Keep-Alive requests: 1024 Total transferred: 243712 bytes HTML transferred: 65536 bytes Requests per second: 2761.10 [#/sec] (mean) Time per request: 2.897 [ms] (mean) Time per request: 0.362 [ms] (mean, across all concurrent requests) Transfer rate: 641.74 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 4 Processing: 0 3 29.8 0 365 Waiting: 0 3 29.8 0 365 Total: 0 3 29.8 0 367 Percentage of the requests served within a certain time (ms) 50% 0 66% 0 75% 0 80% 0 90% 0 95% 0 98% 3 99% 5 100% 367 (longest request) $ /home/ubuntu/pharo-server/st-exec.sh pharo-server pid PharoCore-1.3 Executing /home/ubuntu/pharo-server/st-exec.sh pharo-server pid PharoCore-1.3 Working directory /home/ubuntu/pharo-server 6289 $ /home/ubuntu/pharo-server/st-exec.sh pharo-server stop PharoCore-1.3 Executing /home/ubuntu/pharo-server/st-exec.sh pharo-server stop PharoCore-1.3 Working directory /home/ubuntu/pharo-server Stopping pharo-server Killing 6289 $ /home/ubuntu/pharo-server/st-exec.sh pharo-server pid PharoCore-1.3 Executing /home/ubuntu/pharo-server/st-exec.sh pharo-server pid PharoCore-1.3 Working directory /home/ubuntu/pharo-server Pid file not found: /home/ubuntu/pharo-server/pharo-server.pid Searching in process list for pharo-server No pids found! $ logout