Web interface with FastCGI or with direct HTTP?

Let’s assume I want (for fun at start) to play with some new DSL (domain specific language) idea. And I really want its user[s] (probably only me at first) to interact thru a web interface. I’ll probably implement it in C++ (probably using LLVM).

Should I use an HTTP server library (like libonion or microhttpd) to talk directly HTTP or should I use FastCGI? I could also use libraries doing both like cppcms or wt…

In particular, I am noticing that several recent web frameworks (Opa, Ocsigen, …) do not have any FastCGI interface but only HTTP one….
(but Ur/Web seems to have both)

So my feeling is that FastCGI is really out of fashion….

Any opinions on that? Do you know recently started project using FastCGI ?
(and what about SCGI?)

2

I’ve considered many implementations, with different types of connection methods, and this is how I view the choice.

From a developer perspective FastCGI IS out of style, in the same way they would consider C. from a developer perspective accomplishing the task can be done through simpler ways.

From an implementation perspective, HTTP isn’t a perfect replacement, however there is enough overlap so that they could be used to solve the same goals. BUT really this question is about implementation and architecture, and not a developer focused question, so I’ll answer it from systems engineering side.

Despite what I’ve unfortunately read in developer blogs, FastCGI CAN be a better choice when utilized in the proper circumstances. It separates a large complicated concern, that otherwise must be implemented higher up the stack.

For example, It allows you to avoid creating a robust web server inside your framework/language. A huge task if you actually care about quality, but very doable if you slap it together like most. So it’s ironically easier to roll it all up in a spaghetti ball, then cleanly separate that part. This is why so many avoid FastCGI, because they could only implement it by almost wrapping HTTP anyway, due to their bad architectural choices.

Since you didn’t get more detailed about how ambitious your plan, I can’t really give you great recommendations. Let me suggest a few things to investigate, that are not the common slap together python node style.

Read about the implementation details of ,
php-fpm

If you want to do a more appserver model, do it right, read about
uwsgi

Few notes:

So my feeling is that FastCGI is really out of fashion….

Telling this is like to tell that TCP/IP is out of fashion in days of HTTP.

FastCGI is the protocol between web application and the web server – however it does not mean that you need to use it directly from your application.

Should I use an HTTP server library (like libonion or microhttpd) to talk directly HTTP or should I use FastCGI? I could also use libraries doing both like cppcms or wt…

See if you want to develop even a simple web site it is very hard to do it using HTTP alone – there are many factors to handle – this is why there are web frameworks that solve the problem for you, more than that many stuff like static files handing and some security considerations are passed to web server and the framework itself.

So I’d recommend you to use Web framework like CppCMS that allows to implement web application using C++ easily – so basically you work on busyness logic, the rest web framework does for you.

And as a bounce you get support of HTTP, FastCGI, SCGI protocols and you can use either your internal web server or any industry standard protocol with powerful web server.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật