Live data from Hacker News

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

github.com

181–190 of 192 posts

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

#181

Earlier quoted context omitted.

Last I checked, Pypy wasn’t compatible with many important packages in the Python ecosystem. As of a couple years ago, there was no trustworthy, supported package for talking to a Postgres database with Pypy because psycopg2 wasn’t supported.

When is the last time you checked ? I have run it with pandas+numpy and postgres+timescale without issue for the last year.

Several years ago now.

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

#182
post #167

Earlier quoted context omitted.

> a microbenchmark for seeing how fast the various frameworks can parse a 30000x300 dict of strings representing numbers [1]. Did you somehow miss all the other tests, even thought they are higher on the page? The important test is shown first: loading objects. I'm not trying to benchmark my wifi or my disk. The IO time is not included there on purpose. Of course a bigger application that does other things wouldn't s…

I read all the perftests in the repo. I think they nearly all parse a structure that contains a repetition of the same or similar thing a couple hundred thousand times times and the timing function returns the min and max of 5 attempts. I just picked one example for posting. Not a Python expert, but could the Pydantic tests be possibly not realistic and/or misleading because they are using kwargs in __init__ [1] to p…

How would you implement a benchmark then?

The kwargs thing is true… but I didn't design the API of pydantic. And it only happens on the small top level dictionary, not on all of them (unless it internally does it all the time).

Java has JIT, I agree that in that case keeping the output value is important. cpython isn't that smart. I honestly never tried to benchmark using pypy. I guess it could be interesting to try that.

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

#184
post #60

Earlier quoted context omitted.

For sure have room to improve but is very competitive, i will try to archive the 7 mi inthe future, this is a very young framework, i will work harder! https://www.techempower.com/benchmarks/#section=test&runid=1...

huh? waw. strange. there are 2 fibers on the benchmarks. 1 slow and 1 really fast. Same for socketify. 1 fast, 1 slow. Why is this?

in the case of socketify is CPython and PyPy running the same code, but both are really fast, in the case of fiber is without prefork and with prefork variants.

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

#185
post #121
post #80

Earlier quoted context omitted.

What libraries do you use for python webapps, at least for url routing, etc?

Not into Python, but Google suggest me this https://routes.readthedocs.io/en/latest/ for routing.

cheers! Will take a look.

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

#186
post #168

Earlier quoted context omitted.

Why does that feel hopeless to you? Running one process per core has been working well for scaling huge websites for decades at this point.

nodejs do this and actually Go fiber uses prefork to do this too

[deleted]

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

#187

Earlier quoted context omitted.

Python GIL is the problem for multithreading, but I think I have a solution to not need 8 DB pools, soon o will post about it. But yeah it's a waste

Oh, I have a pretty fresh news for you. https://github.com/python/peps/pull/2955

I wouldn't be excited about PEPs. GIL has been talked about for umpteen years.

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

#188

Earlier quoted context omitted.

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!

makes sense. Best of luck to you.

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

#189

I'm feeling old. I went back to Flask recently and keep finding everything I know is deprecated, or not best practice any more. Then I read every week that some new framework is out that is better. I'm tired of it. I end up spending more time learning new things than I do building new things! Maybe I should get off hn for a while

I worked on some REALLY big Flask projects over my carrer and I came up with my rule for it:

"Any sufficiently large Flask project contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Django."

Just sticky with Django. It's stable, well-maintaned and includes most batteries out-of-the-box.

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

#190

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…

>> However, you bring in a common misconception I'm fighting with within my company for a long time. Python is not an interpreted language. My advice to you: Stop fighting that "misconception". See the other responses to back up the idea that Python is interpreted. The existence of a Python compiler is also not relevant here, as the linked project does not list that as a supported Python variant. Let's assume that by…

Sorry, I didn't make it clear before. I'm winning. My credibility is well protected by our AWS bills.

Last year we adopted Numba for GPGPU programming. It is a Python compiler with LLVM back-end and full CUDA support. It generates the same code that NVCC (CUDA compiler for C++) does only it compiles Python code and not a C++ .cu dialect.

No one in our organization writes heterogeneous code in C++ anymore.

Post reply on HN