digitalmars.D.learn - web development in D programming
- bioinfornatics (13/13) Nov 08 2011 Dear,
- Dejan Lekic (9/13) Nov 09 2011 I am developing an implementation of the FastCGI protocol
- simendsjo (3/16) Nov 09 2011 Does Lighttpd and nginx support multiplexing? I couldn't get them to
- Andrea Fontana (7/25) Nov 09 2011 SCGI is a lot easier to implement than FASTCGI and is well-supported too
- Adam Ruppe (4/5) Nov 09 2011 What is lacking there that you need?
- Kapps (34/47) Nov 10 2011 Speaking only for lighttpd, it didn't work too well for me when I tried
- Trass3r (4/8) Nov 09 2011 There's also a project named Serenity
- Adam Ruppe (3/3) Nov 09 2011 Note that the new location for my code is on github:
- Andrew Gough (14/30) Nov 26 2011 I don't know if you're interested, but I just uploaded a bare bones
Dear, After read this thread: http://www.digitalmars.com/d/archives/digitalmars/D/learn/Web_Development_2= 7414.html and this one: http://www.digitalmars.com/d/archives/digitalmars/D/learn/How_To_Dynamic_We= b_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
Nov 08 2011
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.
Nov 09 2011
On 09.11.2011 12:58, Dejan Lekic wrote:bioinfornatics wrote:Does Lighttpd and nginx support multiplexing? I couldn't get them to multiplex in my tests.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.
Nov 09 2011
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: =20=20=20 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 ? =20=20 I am developing an implementation of the FastCGI protocol=20 (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. =20 I believe a good http server implementation would be appreciated by the==20community, but FastCGI server will make it possible to create a highly- scalable web applications using some of the well-known web servers (I use==20Lighttpd for an example). =20 Your code is usable, but not production-ready. =20
Nov 09 2011
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!)
Nov 09 2011
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.
Nov 10 2011
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.
Nov 09 2011
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?
Nov 09 2011
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 regardsI 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
Nov 26 2011