Live data from Hacker News

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

github.com

21–30 of 192 posts

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

#22

Earlier quoted context omitted.

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.

I see, but like i said any performance focused Python framework are native (C/C++), so i will never be able to compare any Python framework with Golang framework ever.

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

#23
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.

pydandic-core [0] will hopefully solve this issue (written in Rust)

[0] -- https://github.com/pydantic/pydantic-core

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

#24

What is Django Meinheld? They mention it in their benchmarks.

Django is an WebFramework, Meinheld is an WSGI Server framework.

https://github.com/django/django

https://github.com/mopemope/meinheld

So django meinheld is basically saying that i used Django served by meinheld in that benchmark.

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

#25

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 evidenc…

You are missing the forrest for the trees.

When people refer to a language, most often they are using it as a synecdoche to refer to the whole language ecosystem and not just the the formal language definition.

If you look at the Python ecosystem, it is most definitely interpreted.

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

#26
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…

> 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.

well, a real world test would be both servers parsing 100kb json payload in each message

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

#27

Earlier quoted context omitted.

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.

The title seems accurate and appropriate to me. If I were selecting a framework for performance I might chose this framework, which I would use through Python, rather than a Go framework that I would program in Go. It's a framework, you use it with Python, and the performance is good (apparently, I didn't check).

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

#28
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…

> 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. well, a real world test would be both servers parsing 100kb json payload in each message

that would be an JSON benchmark not right? raw throughput is more useful to test WebServers, but JSON performance is also important, but i think is another benchmark. PyPy do very well in JSON too take a look https://www.techempower.com/benchmarks/#section=test&runid=1...

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

#29

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 evidenc…

For all practical purposes, a programming language is defined by it's general real world implementation, and not it's specification. Maybe not so much for computer scientists, but for programmers, Python is interpreted with some JIT alternatives and C++ is compiled.

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

#30
I looked at the tests. There is nothing significant going on when creating response in http server for example. Just spit "hello world". So it appears to be a test of C++ uWebSockets and uSockets libraries vs for example native Go implementation. Do something serious in request handler using Python and then see what happens.
Post reply on HN