Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jordic
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
jordic
6y ago
with asyncio we deploy a thread per worker (loop), and a worker per core. We also move cpu bound functions to a thread pool
62.
▲
by
jordic
6y ago
I don't think people is using aiopg... (at least us). asyncpg also works with sqlalchemy (look at startlette with databases, or our own impl https://github.com/vinissimus/asyncom ) If I'm not wrong, aiopg it
63.
▲
by
jordic
6y ago
Also on the async use case, it's creating a cursor, when there is no need to use it to just fetch a row from the db (with asyncpg)
64.
▲
by
jordic
6y ago
It would be pretty nice to see the benchmark with what people is using on the async world (asyncpg + uvloop). Just taking a look on them found it's using aiopog (who is using this?) without uvloop.
65.
▲
by
jordic
6y ago
In our use case switching to asyncio it's like moving from 12 cores to 3... (And I'm pretty sure we are handling more concurrency... from 24-30 req/s to 150req/s But our workload is mostly network related (db, external s
66.
▲
by
jordic
6y ago
For me pdbpp it's a must, always installed on every venv
67.
▲
by
jordic
6y ago
Do you manage to aggregate all logs on a single place? Do you have the same environment as staging? How do you upgrade your servers? Do you have multiple teams deploying on their own components? Do you have a monitoring/metric service?
68.
▲
by
jordic
6y ago
Thought, you misunderstood my opinion, mostly that sometimes there are project constraints, usual the language.. between the python constrain asyncio it's not bad.
69.
▲
by
jordic
6y ago
yes, goroutines are fast and easy... but this thread is about python. I love both languages, and go is fast and safe, but, I also like python (it's fast developing... )
70.
▲
by
jordic
6y ago
If you need to do CPU bound computations use a thread pool.
71.
▲
by
jordic
6y ago
Since version 3.7 you don't need to touch the loop for nothing, also some old signatures had deprecated the loop param... It's almost the same as if you work with node, but with a bit more sugar (tasks, gather, wait, wait_for) Whe
72.
▲
by
jordic
7y ago
Anyway es6 classes it's just a proper way of doing Oop in js.. the prototypal thing it's so ugly...
73.
▲
by
jordic
7y ago
Most of the problems you mention could also be solved with a good test suit... I'm not against mypy.. but after working near two years with typescript.. if I have to type I prefer to do it with compiled things...
74.
▲
by
jordic
7y ago
And what's the problem on having some type hints on some func signatures?) You can read python exactly the same way (with and without type hints)....
75.
▲
by
jordic
7y ago
Don't mix things, guy! - asyncio it's one thing: From my point of view it's amazing... makes python be able to compete with nodejs or go.. (not so hard, if you work also on the browser) - mypy: that's another story, but
76.
▲
by
jordic
7y ago
100% agree with you. So happy with black and pytest. - The formatting he is proposing for multiple args on a function with double tabs it's wired... O_O - Same argument on mypy, if I want to type all variables, I perhaps will be happy
77.
▲
by
jordic
7y ago
omg I'm still missing freehand.. :/ Anyway inkscape it's a nice tool. (I had used freehand, illustrator, flash.. ) and inkscape it's fine (When I need to do some vector work I know it's there) but I mostly work on
78.
▲
by
jordic
7y ago
Haha, some scripts to manage the deployments and rollbacks, plus some other scripts to manage the environment (ansible, terraform.. ).. also some scripts to manage the machines.. log aggregations, cleanup, upgrades... Later add some crons.
79.
▲
by
jordic
7y ago
Haha, just joining them ..
80.
▲
by
jordic
7y ago
Missed the part about serving the response bellow 50ms :) Not too much traffic.. between 40/50 req/s.. and a lot of other more important things to be stored on postgres (transactions, stocks.. )
81.
▲
by
jordic
7y ago
Postgresql is awesome, but I don't see any advantage when you need to add like 40 aggregations plus joining to 10 tables.. (easy if you denormalize to elastic)
82.
▲
by
jordic
7y ago
I have been following it since a week and is awesome to see how it evolves.. PR after PR it's getting better. Yesterday used it to just wireframe a small feature. Awesome project!
83.
▲
by
jordic
7y ago
>But IDK why requests3 wasn't transferred as well, and That's thing... Who knows..
84.
▲
by
jordic
7y ago
Sorry, have you checked the source? Are these features there or only announced? Has requests added a timeout by default finally?
85.
▲
by
jordic
7y ago
The huge win against requests is that Https is fully async.. you can download 20 files in parallel without not too much effort. Throughout in python asyncio is amazing, something similar to node or perhaps better... That's the main po
86.
▲
by
jordic
7y ago
We use a lot this kind of tooling.. say, you need to check 20k URLs and you want to rate limit them.. add them to a Pg table (with state and result fields). A single thread worker that just takes a row (marks it as pending) and later update
87.
▲
by
jordic
7y ago
perhaps the only missing feature (like in flake) is to be able to bypass the formatter with a comment (to be confortable with edge cases, where readavility matters) something like: # nofmt
88.
▲
by
jordic
7y ago
I'm doing the same :/
89.
▲
by
jordic
7y ago
same here! anyway, having a default formatter is awesome!
90.
▲
by
jordic
8y ago
You made not need redux! Found lot's of projects where they plug redux an turns the project a completly mess. (connected components everywhere), actions to manage local component ui state..
More ›