CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Anyone have much experience with FastCGI?  (Read 925 times)

gleepower

  • Junior Member
  • *
  • Posts: 22
  • Karma: +1/-0
Anyone have much experience with FastCGI?
« on: 10 Nov 2019, 03:25:53 pm »
I've looked at FastCGI for writing an interpreter, how hard is the specification to implement so that it works on the various different servers? (Apache, IIS, Nginx, etc)
The beaucracy is expanding, to meet the needs of the expanding beaucracy

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 1054
  • Karma: +188/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Anyone have much experience with FastCGI?
« Reply #1 on: 11 Nov 2019, 02:55:41 pm »
Been over a decade since I dealt with it directly. The "tricky" part (if I'm remembering this properly) is that for all intents and purposes you end up writing a web socket server listening on port 9000.

Done lazily the server handles all interactions as a single thread, done properly you have to dip into multi-threaded programming to handle more than one request at a time and that too is decidedly... tricky.

The "fast" part often being that how parameters are parsed is strictly in your hands directly off the HTTP headers. That too is a PITA that can be almost as big a challenge as writing the parser for your language.
We are all, we are all, we are all FRIENDS! For today we're all brothers, tonight we're all friends. Our moment of peace in a war that never ends.

gleepower

  • Junior Member
  • *
  • Posts: 22
  • Karma: +1/-0
Re: Anyone have much experience with FastCGI?
« Reply #2 on: 12 Nov 2019, 03:00:34 pm »
I can just have an event queue I think and keep everything on a single thread (maybe with a threadpool for I/O and DB operations).

Parsing the HTTP Headers isn't too hard no? The binary format in FastCGI looks pretty nice.
The beaucracy is expanding, to meet the needs of the expanding beaucracy

 

SMF spam blocked by CleanTalk

Advertisement