S
S
SKEPTIC2020-04-19 22:28:41
Python
SKEPTIC, 2020-04-19 22:28:41

Your web server in Python?

Nothing to do. I decided to write a web server in python and sockets. I've already written a little. So far, the html seems to work well. So far, it is single-threaded and synchronous. At the same time I get acquainted with http.
What I wanted to ask.

Will it be at least somehow fast and applicable in real projects, if written in a non-critical way?
Is it asynchronous to write the whole thing? Multithreaded? I so understood that it is better asynchronously.
I look forward to your advice.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2020-04-19
@pro100chel

Do not listen to those who say that you suffer from garbage!
Yes, asynchronously - that's for sure.
Multithreaded, but not multiprocessed!
1. Be sure not to forget to create both there and there a custom priority queue for processing requests for specific "masks" for headers, etc.
2. Provide in advance the sharding of the architecture in breadth and depth.
3. Don't forget: gzip content compression, multi-type authorization, and OpenSSL.

D
Dr. Bacon, 2020-04-19
@bacon

Only to understand how protocols work and how everything works, for real projects you don’t have enough knowledge to “write in a non-critical way”, so that it is “at least somehow fast”.

E
Eugene Pedya, 2020-04-24
@fpinger

I recommend you the following book "TWISTED FIRST-HAND"
https://dmkpress.com/catalog/computer/programming/... Eventfulness
, asynchrony, etc. in your context.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question