June 25, 2012
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


June 25, 2012
On Monday, 25 June 2012 at 14:43:34 UTC, nazriel wrote:
> Hi!
>
> I am polishing up this stuff:
> http://dlang.dzfl.pl/
>
> I would love to hear your opinion on those.
>
>
> Best regards,
> Damian 'nazriel' Ziemba

FYI: Someone somewhere has that up on their demo site. Don't know why it hasn't been activated.
June 25, 2012
On Monday, 25 June 2012 at 20:34:39 UTC, Jesse Phillips wrote:
> FYI: Someone somewhere has that up on their demo site. Don't know why it hasn't been activated.

You mean Adam Ruppe's take on executable code snippets?

David
June 26, 2012
On Monday, 25 June 2012 at 21:26:01 UTC, David Nadlinger wrote:
> On Monday, 25 June 2012 at 20:34:39 UTC, Jesse Phillips wrote:
>> FYI: Someone somewhere has that up on their demo site. Don't know why it hasn't been activated.
>
> You mean Adam Ruppe's take on executable code snippets?
>
> David

Yeah, that would be the one. It allows for editing too though.
June 26, 2012
Am 25.06.2012 22:25, schrieb nazriel:
> If you want to know more details, let me know
> 

Oh cool. That's great!

textarea -> JSON -> AJAX -> PHP Script -> ....... -> Load Balancer -> Chroot jail -> D Compiler.


How do you perform interation between php and you load balancer?
June 26, 2012
On Monday, 25 June 2012 at 20:34:39 UTC, Jesse Phillips wrote:
> On Monday, 25 June 2012 at 14:43:34 UTC, nazriel wrote:
>> Hi!
>>
>> I am polishing up this stuff:
>> http://dlang.dzfl.pl/
>>
>> I would love to hear your opinion on those.
>>
>>
>> Best regards,
>> Damian 'nazriel' Ziemba
>
> FYI: Someone somewhere has that up on their demo site. Don't know why it hasn't been activated.

Nice! Any links?

Well, to be honest, I was working mainly on http://dpaste.dzfl.pl but I was asked if I wanna integrate http://dlang.org with it, so here it is.
June 26, 2012
On Tuesday, 26 June 2012 at 15:02:14 UTC, mta`chrono wrote:
> Am 25.06.2012 22:25, schrieb nazriel:
>> If you want to know more details, let me know
>> 
>
> Oh cool. That's great!
>
> textarea -> JSON -> AJAX -> PHP Script -> ....... -> Load Balancer ->
> Chroot jail -> D Compiler.
>
>
> How do you perform interation between php and you load balancer?

Actually it is:
textarea -> Ajax -> PHP Script -> JSON -> http://dpaste.dzfl.pl -> Load Balancer -> Target Jail -> JSON back to http://dpaste.dzfl.pl -> JSON -> PHP Script -> Your output window :D

Load balancer has list of available mirrors, it randomizes this list and in foreach loop tries to connect to host, if it success it just returns, otherwise it continues until it success. When Chroot Jail, has too many connections OR resources for Compiler infrastructure are out, its just cut outs socket connection, so balancer goes forwards and connects to another one.

Here you can see it in action:
http://dpaste.dzfl.pl/66612383

Copy example, create new paste and click couple of times "Compile".
I have Linux and FreeBSD mirrors so its showes how requests are forwarded

June 27, 2012
That's crazy shit yeha xD... and php and load balancer do communication via TCP/UNIX socket? some kind of protocol?
June 27, 2012
On 26 June 2012 16:55, nazriel <damian@dzfl.pl> wrote:
> On Tuesday, 26 June 2012 at 15:02:14 UTC, mta`chrono wrote:
>>
>> Am 25.06.2012 22:25, schrieb nazriel:
>>>
>>> If you want to know more details, let me know
>>>
>>
>> Oh cool. That's great!
>>
>> textarea -> JSON -> AJAX -> PHP Script -> ....... -> Load Balancer -> Chroot jail -> D Compiler.
>>
>>
>> How do you perform interation between php and you load balancer?
>
>
> Actually it is:
> textarea -> Ajax -> PHP Script -> JSON -> http://dpaste.dzfl.pl -> Load
> Balancer -> Target Jail -> JSON back to http://dpaste.dzfl.pl -> JSON -> PHP
> Script -> Your output window :D
>
> Load balancer has list of available mirrors, it randomizes this list and in foreach loop tries to connect to host, if it success it just returns, otherwise it continues until it success. When Chroot Jail, has too many connections OR resources for Compiler infrastructure are out, its just cut outs socket connection, so balancer goes forwards and connects to another one.
>
> Here you can see it in action: http://dpaste.dzfl.pl/66612383
>
> Copy example, create new paste and click couple of times "Compile".
> I have Linux and FreeBSD mirrors so its showes how requests are forwarded
>

What happened to GDC and LDC compiler options?  ;~)

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
June 27, 2012
On Wednesday, 27 June 2012 at 13:44:43 UTC, Iain Buclaw wrote:
> On 26 June 2012 16:55, nazriel <damian@dzfl.pl> wrote:
>> On Tuesday, 26 June 2012 at 15:02:14 UTC, mta`chrono wrote:
>>>
>>> Am 25.06.2012 22:25, schrieb nazriel:
>>>>
>>>> If you want to know more details, let me know
>>>>
>>>
>>> Oh cool. That's great!
>>>
>>> textarea -> JSON -> AJAX -> PHP Script -> ....... -> Load Balancer ->
>>> Chroot jail -> D Compiler.
>>>
>>>
>>> How do you perform interation between php and you load balancer?
>>
>>
>> Actually it is:
>> textarea -> Ajax -> PHP Script -> JSON -> http://dpaste.dzfl.pl -> Load
>> Balancer -> Target Jail -> JSON back to http://dpaste.dzfl.pl -> JSON -> PHP
>> Script -> Your output window :D
>>
>> Load balancer has list of available mirrors, it randomizes this list and in
>> foreach loop tries to connect to host, if it success it just returns,
>> otherwise it continues until it success. When Chroot Jail, has too many
>> connections OR resources for Compiler infrastructure are out, its just cut
>> outs socket connection, so balancer goes forwards and connects to another
>> one.
>>
>> Here you can see it in action:
>> http://dpaste.dzfl.pl/66612383
>>
>> Copy example, create new paste and click couple of times "Compile".
>> I have Linux and FreeBSD mirrors so its showes how requests are forwarded
>>
>
> What happened to GDC and LDC compiler options?  ;~)

I want to try to release http://dpaste.dzfl.pl beta soon and officially announce service, while
GDC and LDC requires some more work from me (mainly writing scripts for automatic building).

I really would love to see ready binaries for Debian (Linux in overall) and FreeBSD but probably won't happen :p

Not sure why, but I have small problems with building both, GDC and LDC on FreeBSD, both on my server and local vm.

In short words:
So as for now, I removed them from list. But they will be back.