Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Even though we have a lot of web technologies now, why are all WFS and WPS still cgi based? PHP allows tp read from postgres or other db's and HTML5Canvas or SVG can render the maps on the web. C++/Java Web Toolkits are available now which can talk to GDAL. But still, if we need a WPS, it uses cgi. Can anyone answer why?

share|improve this question
    
They are not all CGI based. –  CaptDragon Nov 20 '12 at 15:04
    
which are not CGI based? –  rashad Nov 20 '12 at 15:07
    
None of the ones I've ever created are CGI based. They are .net/WCF or Java based. As tmcw points out in his answer, GeoServer is not CGI based, neither is ArcGIS server. –  CaptDragon Nov 20 '12 at 15:51
    
rashad: Are you sure you understand what CGI is? It's a way for a web-server to pass requests on to other applications. It can be slower in some cases but it has nothing to do with HTML5Canvas or SVG. PHP can be used as a CGI. There are CGI for C++ and Java. CGI has its uses when you want a web server in front of your application. –  Sean Nov 25 '12 at 3:20
    
Why one need to write CGI? because you need a server call right? If we have binding for GDAL and such libraries in PHP then we dont need to use CGI call to some script which reads GDAL. I took GDAL as an example. Because only thing mapserver(correct me if I am wrong) needs from a CGI is reading GIS data(shp or whatever) parsing mapfile can be done in PHP or using other web technologies and most of languages PHP/Python had binding for GD and AGG(default in python). Mapserver uses GD for rendering it to Image file(PNG/JPEG) –  rashad Nov 26 '12 at 6:38

2 Answers 2

up vote 4 down vote accepted

why are all WFS and WPS still cgi based?

They are not.

HTML5Canvas or SVG can render the maps on the web.

Canvas and SVG are browser technologies for drawing. WFS and WPS are server protocols for retrieval and processing.

Non-cgi WFS/WPS: GeoServer, FeatureServer, ESRI tools, GeoTools. These are in Java, Python, and C++.

share|improve this answer

Perhaps your concern comes from the fact that CGI is an obsolete technology. However there are improvements like FastCGI or SCGI that work fine. First class HTTP servers like lighttpd or nginx can use these technologies for serving dynamic content.

I have set up WMS and WFS services with MapServer, lighttpd and FastCGI, and this combination has worked correctly.

share|improve this answer
    
yes thats exactly what i had in mind when i mentioned CGI. I agree FastCGI is better but honestly I am not a fan. why do we need cgi,fcgi to do GIS data reading and processing? we have python extension for GRASS,GDAL etc and for drawing maps we have HTML5 –  rashad Nov 20 '12 at 20:49
    
mapserver generates a temporary images in backend. Also a PNG/JPEG image read write will have a bit load because of their compression algorithm. WFS services use GML for most of the transaction because web mapping libs are limited with their supported formats –  rashad Nov 20 '12 at 20:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.