Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
November 09, 2011 web development in D programming | ||||
---|---|---|---|---|
| ||||
Dear, After read this thread: http://www.digitalmars.com/d/archives/digitalmars/D/learn/Web_Development_27414.html and this one: http://www.digitalmars.com/d/archives/digitalmars/D/learn/How_To_Dynamic_Web_Rendering_26770.html I am a little disapointed, so if you have many request for a web page this lib http://arsdnet.net/dcode/ is usable or not ? If they are any other method to do a web application in D2 programming do not hesitate and tell to me which lib used. Thanks Kind regards |
November 09, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to bioinfornatics | bioinfornatics wrote: > > I am a little disapointed, so if you have many request for a web page this lib http://arsdnet.net/dcode/ is usable or not ? > I am developing an implementation of the FastCGI protocol (http://www.fastcgi.com) in D2 with the main goal go have multiplexing support. However the development is slow due to the lack of time. I believe a good http server implementation would be appreciated by the community, but FastCGI server will make it possible to create a highly- scalable web applications using some of the well-known web servers (I use Lighttpd for an example). Your code is usable, but not production-ready. |
November 09, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic | On 09.11.2011 12:58, Dejan Lekic wrote:
> bioinfornatics wrote:
>
>>
>> I am a little disapointed, so if you have many request for a web page
>> this lib http://arsdnet.net/dcode/ is usable or not ?
>>
>
> I am developing an implementation of the FastCGI protocol
> (http://www.fastcgi.com) in D2 with the main goal go have multiplexing
> support. However the development is slow due to the lack of time.
>
> I believe a good http server implementation would be appreciated by the
> community, but FastCGI server will make it possible to create a highly-
> scalable web applications using some of the well-known web servers (I use
> Lighttpd for an example).
>
> Your code is usable, but not production-ready.
>
Does Lighttpd and nginx support multiplexing? I couldn't get them to multiplex in my tests.
|
November 09, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to bioinfornatics | > I am a little disapointed, so if you have many request for a web page > this lib http://arsdnet.net/dcode/ is usable or not ? > > If they are any other method to do a web application in D2 programming > do not hesitate and tell to me which lib used. There's also a project named Serenity http://www.digitalmars.com/d/archives/digitalmars/D/Serenity_web_framework_-_early_feedback_wanted_125473.html But it hasn't been updated in months nor is it mature. Adam uses his code in production and also provides FastCGI support. |
November 09, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic Attachments:
| SCGI is a lot easier to implement than FASTCGI and is well-supported too
from webservers.
I've just developed a SCGI web-service in D over lighttpd.
Il giorno mer, 09/11/2011 alle 11.58 +0000, Dejan Lekic ha scritto:
> bioinfornatics wrote:
>
> >
> > I am a little disapointed, so if you have many request for a web page this lib http://arsdnet.net/dcode/ is usable or not ?
> >
>
> I am developing an implementation of the FastCGI protocol (http://www.fastcgi.com) in D2 with the main goal go have multiplexing support. However the development is slow due to the lack of time.
>
> I believe a good http server implementation would be appreciated by the community, but FastCGI server will make it possible to create a highly- scalable web applications using some of the well-known web servers (I use Lighttpd for an example).
>
> Your code is usable, but not production-ready.
>
|
November 09, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to bioinfornatics | Note that the new location for my code is on github: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff What disappointed you, by the way? |
November 09, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic | Dejan Lekic wrote:
> Your code is usable, but not production-ready.
What is lacking there that you need?
I know a few parts of it aren't ideal, but I haven't found them to be big problems in practice (which is why I haven't changed it yet!)
|
November 10, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic | Speaking only for lighttpd, it didn't work too well for me when I tried it (using FCGI). First off, it does not seem to support multiplexing. As well as that, it had no way I could figure out for handling concurrent requests.
So, the way every single request goes is:
Lighttpd opens a connection with your FCGI handler.
Lighttpd sends a request.
You receive the request.
You handle the request.
You send a response.
Lighttpd closes the connection, and sends the user the response.
Lighttpd opens a new connection and sends the next request.
Overall, it was quite bad performance (it's of course possible that I was doing something wrong, but many hours of googling and testing could not figure out a solution). My basic test gave me about 75 requests / second on my test machine. I ended up writing my own server, which, in comparison to the 75 page loads per second or so I got with lighttpd, gives me around 1000. The difference is that mine supports concurrent requests, instantiating an instance of each Page per thread, and directly calls the D code instead of sending a request over the network / to a different process (this is something that will need to have the option of being changed though, to support multiple servers, and change a dynamic page without shutting down the whole server to recompile). The server is not ready for release yet though, and is just an example to demonstrate inefficiencies/scaling in lighttpd for FCGI. It works well for PHP AFAIK, but I think it handles that directly with a plugin. It would also be possible to write such a plugin for D, and is likely a better alternative than making your own server.
I think lighttpd 2.0 may fix some of these issues though, including concurrency, and provides a new protocol that sends the Http requests directly. If so, that would likely be a good thing to use.
I also think Apache doesn't support multiplexing or concurrent requests, but this is something I could very likely be wrong on.
On 09/11/2011 5:58 AM, Dejan Lekic wrote:
> bioinfornatics wrote:
>
>>
>> I am a little disapointed, so if you have many request for a web page
>> this lib http://arsdnet.net/dcode/ is usable or not ?
>>
>
> I am developing an implementation of the FastCGI protocol
> (http://www.fastcgi.com) in D2 with the main goal go have multiplexing
> support. However the development is slow due to the lack of time.
>
> I believe a good http server implementation would be appreciated by the
> community, but FastCGI server will make it possible to create a highly-
> scalable web applications using some of the well-known web servers (I use
> Lighttpd for an example).
>
> Your code is usable, but not production-ready.
>
|
November 26, 2011 Re: web development in D programming | ||||
---|---|---|---|---|
| ||||
Posted in reply to bioinfornatics | On Wed, 09 Nov 2011 03:22:37 +0100 bioinfornatics <bioinfornatics@fedoraproject.rog> wrote: > Dear, > After read this thread: > http://www.digitalmars.com/d/archives/digitalmars/D/learn/Web_Development_27414.html > and this one: > http://www.digitalmars.com/d/archives/digitalmars/D/learn/How_To_Dynamic_Web_Rendering_26770.html > > I am a little disapointed, so if you have many request for a web page this lib http://arsdnet.net/dcode/ is usable or not ? > > If they are any other method to do a web application in D2 programming do not hesitate and tell to me which lib used. > > Thanks > > Kind regards > I don't know if you're interested, but I just uploaded a bare bones HTTP implementation to https://github.com/goughy/d/http4d Its very bare bones, but allows embedded processing of HTTP requests both synchronously and asynchronously, although there is no mechanism for routing - that's left up to the implementer. There is more work to do around large posts (eg file uploads) and supporting chunked outbound transfers, but its usable. I'd appreciate some feedback if you have time. -- Andrew Gough M: 0408 596 656 andrew@goughy.org |
Copyright © 1999-2021 by the D Language Foundation