www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - FastCGI?

reply Marcio <mqmnews123 sglebs.com> writes:
	Has anybody done any FastCGI server with D?

	Basically a server app that listens on a port, understands the FastCGI 
protocol, and serves requests. Something that can be put behind Apache, 
either on Windows or Linux.

	I'd like to play with something like that if the libs are available.

	Thanks,

marcio
Mar 14 2006
parent reply Dejan Lekic <dejan nu6.org> writes:
Hello Marcio,
I am 90% done with FastCGI implementation in D - I also need it for writing
web applications in D on my lighttpd web server. :)
It will be released under modified BSD license.

Kind regards

Dejan
Mar 14 2006
parent reply Brad Anderson <brad dsource.dot.org> writes:
Dejan Lekic wrote:
 Hello Marcio,
 I am 90% done with FastCGI implementation in D - I also need it for writing
 web applications in D on my lighttpd web server. :)
 It will be released under modified BSD license.
 
 Kind regards
 
 Dejan
That's sweet. Any way I could get you to host it on dsource.org? I am using FastCGI as the replacement for mod_python with the Trac system at dsource, and some D extensions would be cool to have as well. BA
Mar 14 2006
parent reply Dejan Lekic <dejan nu6.org> writes:
Brad, I have my own server for hosting open-source projects, open for almost
anything. Thanks for Your offer. :) All my projects are there, and my
friends' projects as well. :) 

With dfcgi (that is the name of the project) you'll be able to write
web-applications in easy, elegant way.

After dfcgi i will go to the next step - XHTML templating and development of
some nice, flexible web app. framework.

Kind regards

Dejan Lekic
  http://dejan.lekic.org
Mar 14 2006
next sibling parent reply Kyle Furlong <kylefurlong gmail.com> writes:
Dejan Lekic wrote:
 Brad, I have my own server for hosting open-source projects, open for almost
 anything. Thanks for Your offer. :) All my projects are there, and my
 friends' projects as well. :) 
 
 With dfcgi (that is the name of the project) you'll be able to write
 web-applications in easy, elegant way.
 
 After dfcgi i will go to the next step - XHTML templating and development of
 some nice, flexible web app. framework.
 
 Kind regards
 
 Dejan Lekic
   http://dejan.lekic.org
Have you considered collaborating with Eric? He is also interested in getting a web development framework off the ground.
Mar 14 2006
parent reply Dejan Lekic <dejan nu6.org> writes:
I do not know who Eric is, but from my point, every cooperation on this is
very much apriciated.
Mar 14 2006
parent reply pragma <pragma_member pathlink.com> writes:
In article <dv7mpm$1a41$2 digitaldaemon.com>, Dejan Lekic says...
I do not know who Eric is, but from my point, every cooperation on this is
very much apriciated.
That would be me. ;) (My apologies if any of this is old hat: I have no idea what frame of experience you're coming from -- total brain dump to follow) I have DSP (D servlet pages) on the back-burner right now as I concentrate on DDL - DSP requires it to make dynamic servlets work in D. The objective of the project is to have Java Servlet like capabilities, so you can code in D directly on a page embedded (or not) within markup. The major drawback here is that it requires specalized server support, as a stand-alone server. As for a fast-CGI module, that would be a nice testbed for a common framework that I'd be more than happy to throw behind DSP; so provided you open your development, some of your code might find a home there too! For dishing up pages, D now has much more of what's needed than it did two years ago when I started with all this. All the XML, logging, parsing, localization, conversion and unicode handling stuff is now available under Mango and ICU. Database access is (almost) completely unified under DDBI. The DDL project (thanks Lars!) has even contributed a nifty ArgParser under DDL that is currently making the rounds - feel free to use it for FastCGI. So what's missing from web-enabled D? Take a look at the sweeping (overkill?) runtime support that PHP provides. If you need something more than just "meat and potatoes" runtime support, you could probably use some of the very same C libs that PHP is utilizing to cover all the gaps. The only problem with this model, is it requires some kind of conversion/thunk to avoid GC issues when interfacing with legacy libraries. Also, as PHP has demonstrated, it'll trend toward a non-uniform (read: expert system) function reference unless it's kept in check from the start. - EricAnderon at yahoo
Mar 14 2006
parent reply Dejan Lekic <dejan nu6.org> writes:
Hello Eric, nice to meet You. :)
I agree on almost everything You've written in Your post. DSP could easily
use dfcgi and everyone would be happy. Even though I am more GUI and
client/server developer, I would like to be able to do web development with
D as well, that is why I work on FastCGI implementation. The second reason
for it is that my server runs LIGHTTPD (http://www.lighttpd.net), which is
IMHO the best web server at the moment. Lighty (lighttpd) uses FastCGI, and
my PHP runs on it as php-fcgi...
I do not like ASP/PHP/JSP approach at all - i like to separate HTML (design)
and source code. My experience says to me that having code in HTML leads to
possible maintainance headaches. :) Anyway, dfcgi will soon be there for
testing.
Mar 14 2006
next sibling parent "Unknown W. Brackets" <unknown simplemachines.org> writes:
Honestly, most everyone does, using PHP or otherwise - as long as they 
know what they're doing.

-[Unknown]


 i like to separate HTML (design)
 and source code. My experience says to me that having code in HTML leads to
 possible maintainance headaches. :)
Mar 14 2006
prev sibling next sibling parent Kyle Furlong <kylefurlong gmail.com> writes:
Dejan Lekic wrote:
 Hello Eric, nice to meet You. :)
 I agree on almost everything You've written in Your post. DSP could easily
 use dfcgi and everyone would be happy. Even though I am more GUI and
 client/server developer, I would like to be able to do web development with
 D as well, that is why I work on FastCGI implementation. The second reason
 for it is that my server runs LIGHTTPD (http://www.lighttpd.net), which is
 IMHO the best web server at the moment. Lighty (lighttpd) uses FastCGI, and
 my PHP runs on it as php-fcgi...
 I do not like ASP/PHP/JSP approach at all - i like to separate HTML (design)
 and source code. My experience says to me that having code in HTML leads to
 possible maintainance headaches. :) Anyway, dfcgi will soon be there for
 testing.
 
I'm glad you two got to meet, hopefully collaboration will yield a magnitude better fruit. Dejan, I just wanted to make sure you were aware that all the projects Eric was talking about are hosted on www.dsource.org.
Mar 14 2006
prev sibling parent pragma <pragma_member pathlink.com> writes:
In article <dv8181$1mm5$1 digitaldaemon.com>, Dejan Lekic says...
Hello Eric, nice to meet You. :)
I agree on almost everything You've written in Your post. DSP could easily
use dfcgi and everyone would be happy. Even though I am more GUI and
client/server developer, I would like to be able to do web development with
D as well, that is why I work on FastCGI implementation. The second reason
for it is that my server runs LIGHTTPD (http://www.lighttpd.net), which is
IMHO the best web server at the moment. Lighty (lighttpd) uses FastCGI, and
my PHP runs on it as php-fcgi...
Awesome. I'll have to check out lighttpd sometime. As for DSP using fastCGI, that might be an excellent approach for the days ahead until DDL is ready for prime-time.
I do not like ASP/PHP/JSP approach at all - i like to separate HTML (design)
and source code. My experience says to me that having code in HTML leads to
possible maintainance headaches. :) 
I'll admit that the approach has its detractors, but its really all in how you use it. Ideally, I'd like something like DSP to allow for pure .d pages to be served up the same as .dsp pages with embedded markup. That way, the heavy coding is in all the "code-behind" .d pages with .dsp scripts being mostly markup with whatever glue is needed to talk to the rest of the app.
 Anyway, dfcgi will soon be there for testing.
Can't wait! - EricAnderton at yahoo
Mar 15 2006
prev sibling parent reply "keks (Jan Winkelmann)" <keks unstable.nl> writes:
Dejan Lekic schrieb:
 Brad, I have my own server for hosting open-source projects, open for almost
 anything. Thanks for Your offer. :) All my projects are there, and my
 friends' projects as well. :) 
 
 With dfcgi (that is the name of the project) you'll be able to write
 web-applications in easy, elegant way.
 
 After dfcgi i will go to the next step - XHTML templating and development of
 some nice, flexible web app. framework.
 
 Kind regards
 
 Dejan Lekic
   http://dejan.lekic.org
Hey, I'll just grab the old thread out again. I am interested in FastCGI, too and would like to know the project's status. I checked out dejan.lekic.org but couldn't find anything concerning FastCGI. Did you dump the project or just don't host it anymore? do you still have the src? First I was about to learn FastCGI with C++, but then I heard about D as the C++ without the "yikes". Or does anyone else still have the lib? Best regards, keks || Jan Winkelmann
Jul 30 2008
parent reply "Chris R. Miller" <lordSaurontheGreat gmail.com> writes:
keks (Jan Winkelmann) wrote:
 anymore? do you still have the src? First I was about to learn FastCGI =
 with C++, but then I heard about D as the C++ without the "yikes".
Oh Walter, that's a quote worth the DMD homepage! "C++ without the=20 'yikes!'" suits D perfectly!
 Or does anyone else still have the lib?
FastCGID is still a registered project on DSource IIRC:=20 http://dsource.org/projects/fastcgid (formulating URL from memory, that=20 link might be dead)
Jul 30 2008
parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Chris R. Miller Wrote:

 keks (Jan Winkelmann) wrote:
 anymore? do you still have the src? First I was about to learn FastCGI 
 with C++, but then I heard about D as the C++ without the "yikes".
Oh Walter, that's a quote worth the DMD homepage! "C++ without the 'yikes!'" suits D perfectly!
 Or does anyone else still have the lib?
FastCGID is still a registered project on DSource IIRC: http://dsource.org/projects/fastcgid (formulating URL from memory, that link might be dead)
The link is: http://dsource.org/projects/fastcgi4d
Jul 30 2008
parent "keks (Jan Winkelmann)" <keks unstable.nl> writes:
Robert Fraser schrieb:
 Chris R. Miller Wrote:
 
 keks (Jan Winkelmann) wrote:
 anymore? do you still have the src? First I was about to learn FastCGI 
 with C++, but then I heard about D as the C++ without the "yikes".
Oh Walter, that's a quote worth the DMD homepage! "C++ without the 'yikes!'" suits D perfectly!
 Or does anyone else still have the lib?
FastCGID is still a registered project on DSource IIRC: http://dsource.org/projects/fastcgid (formulating URL from memory, that link might be dead)
The link is: http://dsource.org/projects/fastcgi4d
Great, thank you! I'll put a link on various sites, so google gives it a higher rank, I don't think I would have found it without your help. Thanks! Best regards, keks || Jan Winkelmann
Jul 30 2008