Live data from Hacker News

Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

github.com

11–20 of 192 posts

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#12
Others point out that calling it a Python framework might be disingenuous, but only if your goal is to compare programming languages.

If you're a web developer, trying to pick a framework for websockets, you probably don't care that the Python framework is a libuv wrapper, while to Go framework is native.

So well done, I guess? I am really happy to see library authors taking performance seriously!

EDIT: This is assuming the benchmark is actually fair. I haven't looked at it, but it's not uncommon for benchmarks to be comparing apples and oranges.

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#13
Good point! However, you bring in a common misconception I'm fighting with within my company for a long time. Python is not an interpreted language. There is no such thing as an "interpreted language", a language is just a set or rules and keywords. Everything you can fit into Backus–Naur form is already a language even if it doesn't have any implementation nor compiler neither interpreter.

Just as a piece of evidence, there are interpreted C++ (http://www.artificialworlds.net/wiki/IGCC/IGCC) and AOT Python (https://github.com/exaloop/codon) implementations.

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#14
post #4

Earlier quoted context omitted.

Would a framework like uvicorn/fastapi be able to achieve similar performance if it were backed by libuv (as opposed to e.g. asyncio)?

Pydantic is unreasonably slow for big datastructures, though. For simple performance tests with simple requests/response it's probably fast. But with lots of the data marshalling happening in python some things are really slow in real life use cases.

Yeah i have a lot of things to do, to minimize this types of things. But Caching Tools that never cross GIL will boost a lot of performance in real life scenarios too. See https://github.com/cirospaciari/socketify.py/issues/60 I plan to create an native Redis cache and memcache too.

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#15
post #12

Others point out that calling it a Python framework might be disingenuous, but only if your goal is to compare programming languages. If you're a web developer, trying to pick a framework for websockets, you probably don't care that the Python framework is a libuv wrapper, while to Go framework is native. So well done, I guess? I am really happy to see library authors taking performance seriously! EDIT: This is assum…

Python framework because is an framework for python, like most performance focused frameworks for python, this uses a lot of native code. uvicorn uses uvloop that is an wrapper for libuv.

Web developer dont care if the framework is written in native or it is an wrapper, developers just want something that works in a nice way :D

The benchmarks are in https://github.com/TechEmpower/FrameworkBenchmarks

EDIT: some preliminary results https://www.techempower.com/benchmarks/#section=test&runid=1...

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#16
Fiber is built on FastHTTP. If you know Go top "frameworks" performance characteristics then you would know that you are actually comparing HTTP implementations - ala whether framework is based on FastHTTP or Go standard library HTTP implementation. Framework own % there is for the top 5 almost non-existent.

I would assume this is same case where - what ever Socketify is based on (pythons transport layer), is compared to FastHTTP. and mention of Fiber is click-bate.

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#17

Fiber is built on FastHTTP. If you know Go top "frameworks" performance characteristics then you would know that you are actually comparing HTTP implementations - ala whether framework is based on FastHTTP or Go standard library HTTP implementation. Framework own % there is for the top 5 almost non-existent. I would assume this is same case where - what ever Socketify is based on (pythons transport layer), is compare…

socketify is based on uWebSockets (C++) uWebSockets is comparad to FastHTTP and socketify adds a lot of features on top.

The benchmarks are TechEmPower plaintext https://github.com/TechEmpower/FrameworkBenchmarks

preliminary results here: https://www.techempower.com/benchmarks/#section=test&runid=1...

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#18
post #8

Wonder when a techempower benchmark will comeout

You can see the preliminaries results here https://www.techempower.com/benchmarks/#section=test&runid=1...

Why do you think the Fortunes results are not that competitive? I would have expected the python pg drivers to be very mature.

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#19
post #12

Others point out that calling it a Python framework might be disingenuous, but only if your goal is to compare programming languages. If you're a web developer, trying to pick a framework for websockets, you probably don't care that the Python framework is a libuv wrapper, while to Go framework is native. So well done, I guess? I am really happy to see library authors taking performance seriously! EDIT: This is assum…

Python framework because is an framework for python, like most performance focused frameworks for python, this uses a lot of native code. uvicorn uses uvloop that is an wrapper for libuv. Web developer dont care if the framework is written in native or it is an wrapper, developers just want something that works in a nice way :D The benchmarks are in https://github.com/TechEmpower/FrameworkBenchmarks EDIT: some prelim…

Go developers might though. A go library that requires native is a pretty big reason to avoid. Similarly a headline “c framework that uses libuv is faster than go fiber” wouldn’t cause an eye blink.

So the concern is the title you used to get to the front page not the actual implementation.

Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3

#20

Earlier quoted context omitted.

You can see the preliminaries results here https://www.techempower.com/benchmarks/#section=test&runid=1...

Why do you think the Fortunes results are not that competitive? I would have expected the python pg drivers to be very mature.

asyncio and python async is very slow, that's why i'm planning to build alternatives to it too!
Post reply on HN