How can I improve Moose performance in non-persistent CGI processes?

前端 未结 6 1321
情歌与酒
情歌与酒 2021-02-06 00:13

Moose is a fantastic object framework. The trouble is that, taken together with its dependencies, it\'s very big. Our profiling indicates that on our platform, simply

6条回答
  •  青春惊慌失措
    2021-02-06 01:02

    You could write a back end server application using Moose, and then write very small, simple CGI scripts that query the back end.

    +-------+    +--------------+
    | Small |===>|  Persistent  |
    |  CGI  |<===| Moose Server |
    +-------+  ^  +--------------+
               |
             Socket
           Connection
    

    This is more-or-less what FCGI does, so it may make more sense to just use FCGI.

    On the other hand, there may be real benefits in having a non-cgi back end server that can have ANY abstract interface bolted on as needed.

    For example, if you use TCP (or UDP) sockets, then you could have a native desktop application hit the same back end as your CGI.

    What the best fit is in your case really depends on your specific situation. Depending on the details of the situation, I can see myself deciding to use this approach or any of the approaches you outline above.

提交回复
热议问题