On Monday, 25 June 2012 at 19:27:13 UTC, mta`chrono wrote:
Hey,
that's quite cool what you did! how did you do that? do you use
fastcgi
or cgi? how do you execute your code? inside some chroot
environment or
some other kind of virtual maschine.
mta`chrono
When you click Run button on dlang.dzfl.pl, ajax makes POST
request to local process.php (can be any scripting language,
probably making it js-only could work with some iframes-hacking).
Then it requests http://dpaste.dzfl.pl API via POST and it
returns JSON with response.
http://dpaste.dzfl.pl service resides on unaffected server, while
compiler service resides on 4 (hope to add more mirrors in near
future) machines. I've implemented small load balancer in D.
Whole infrastructure is written in D and uses different
approaches, containers on linux mirrors and jails on freebsd
mirrors.
Each request has limited resources, execution time, IO access etc.
Website itself (http://dpaste.dzfl.pl) is written in PHP, but I
am thinking about switching to D in near future (not sure what
framework pick up yet, vibe.d, serenity or own implementation).
If you want to know more details, let me know