基于 CGI-BIN 的 Web 开发的主要缺点是什么?

发布于 2024-07-11 15:12:58 字数 318 浏览 10 评论 0原文

我很幸运没有进行任何基于 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

轻许诺言 2024-07-18 15:12:59

基于 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:

  • It's expensive to start the process, as the OS pages in the program, sets up the process, etc.
  • Resources can not be shared across requests, so that any DB connections, etc. have to be set up with each request
  • User session state can not be preserved in memory, so it has to be persisted with each request
晨曦慕雪 2024-07-18 15:12:59

对我来说,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...

风轻花落早 2024-07-18 15:12:59

恕我直言,主要缺点与所有较低级别的编码都具有相同的缺点 - 您必须在实现域中编程,而不是在问题域中编程。 最终结果的核心是相同的 - 基于 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.

百变从容 2024-07-18 15:12:59

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文