基于 CGI-BIN 的 Web 开发的主要缺点是什么?
我很幸运没有进行任何基于 cgi-bin .cgi 的 Web 开发。 但一般来说,那些经历过的人似乎并不会“怀念”那些日子。
我最近加入的一个项目在处理需要与具有基于 CGI-BIN 的 API 的遗留系统进行通信的页面时存在性能问题。 该系统是 COGNOS 7。
迄今为止,我收到的反馈是“COGNOS 很慢”,但其他人报告 COGNOS 取得了巨大成功,我认为这更多地与通过 CGI-BIN 的访问有关,而不是与 COGNOS 的性能有关。以及它本身。
综上所述,导致基于 CGI-BIN 的 Web 开发性能不佳、困难等的主要问题是什么......
I was fortunate enough to not do any cgi-bin .cgi based web development. But generally those who have do not seem to 'miss' those days.
A project I recently joined has a performance issue when dealing with the pages that need to communicate to a legacy system that has a CGI-BIN based API. That system is COGNOS 7.
The feedback I received to date is that 'COGNOS is slow' but others have reported great success with COGNOS, I am thinking it has more to do with the access via CGI-BIN and not the performance of COGNOS in and of itself.
All that said what are the main issues that made CGI-BIN based web development non-performant, difficult, etc...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
基于 CGI-BIN 的系统的基本架构问题是每个 HTTP 请求都需要服务器启动一个新进程。 这会以多种方式影响性能:
The fundamental architectural issue with CGI-BIN based systems is that each HTTP request requires the server to start a new process. This affects performance in a number of ways:
对我来说,CGI 最大的痛苦是我的 CGI 程序每次启动时都必须“学习”所有内容。 当然,如果他们不断地奔跑,情况就不会如此……
For me the biggest pain with CGI is that my CGI programs have to "learn" everything each time they start up. If they were running constantly that wouldn't be the case, of course...
恕我直言,主要缺点与所有较低级别的编码都具有相同的缺点 - 您必须在实现域中编程,而不是在问题域中编程。 最终结果的核心是相同的 - 基于 HTTP 请求将 HTTP 响应发送到客户端。 然而,从编程的角度来看,达到这一点要困难得多。
The main disadvantage, IMHO, was the same disadvantage that all lower-level coding has - instead of programming in the problem domain, you had to program in the implementation domain. The end result was, at its core, identical - an HTTP response was sent to a client based on an HTTP request. However, getting to that point was a lot trickier from a programming perspective.
Apache 针对各种语言对此有多种解决方案(例如 mod_perl),以便脚本仅被调用一次,然后保存在内存中以便快速检索。 仍然有大量 GCI 协议驱动的站点,如果编码和设置良好,其中许多都可以以相当低的延迟运行。
Apache has several solutions to this for various languages (e.g. mod_perl) so that a script is only invoked once, then held in memory for fast retrieval. There are still plenty of GCI-protocol driven sites out there, many of which run with reasonably low latency, if well-coded and set up.