rawleyfowler / Humming-Bird

A fun and performant web application framework for Raku
MIT License
44 stars 6 forks source link

Swappable back-ends #57

Closed rawleyfowler closed 1 year ago

rawleyfowler commented 1 year ago

@tony-o Has brought up the idea of having "swappable" backends for Humming-Bird, this would be similar to Puma, Unicorn, etc, for Ruby.

This will serve as a thread for ideas, etc. Regarding it's implementation.

patrickbkr commented 1 year ago

Just a note: I have finished work on an FCGI backend for Cro. You are welcome to use / reuse it as a template for a respective HB backend. I think FCGI is a good match for HB as it's specifically designed as a slim protocol for apps to talk to webservers. HB propagates using a separate reverse proxy, so there is that.

rawleyfowler commented 1 year ago

@patrickbkr Awesome, good work! Yeah I'm going to be looking into implementing this after I get websockets working. Thanks!

patrickbkr commented 1 year ago

Ah, now that you say it, FCGI is strictly request / response. So no websockets when using FCGI. (Maybe with some evil tricks one can manage to open a second communications channel from the webserver to the app and send the websocket data through there. But that's nothing the framework should try to do.)

rawleyfowler commented 1 year ago

@patrickbkr Yeah the goal is that each backend will be able to enable/disabled certain features.

rawleyfowler commented 1 year ago

@patrickbkr Turns out this was a lot easier than I was expecting!