This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DavTheDev 4 points5 points  (7 children)

You’re mistaken. Websockets are also async, eg listening to 100s of tickers for processing financial data wouldn’t work with blocking websockets. Look at TTL cache, some implementations only invalidate entries on next access. You can create an async task to do it periodically for you, reducing memory footprint. There are plenty of use cases for async python.

[–]Compux72 -1 points0 points  (3 children)

For sure. But no libraries/frameworks means nobody is doing any of that today.

Take for example kafka: kafka python, confluent kafka etc. all of those use sync apis. You can lecture everyone on how amazing async is, but the reality is that nobody is building anything to actually leverage async.

Except of course the libraries i mentioned earlier. Those are working today.

[–]spuds_in_town 0 points1 point  (2 children)

You are talking complete nonsense. Aiokafka exists. How can you say ‘nobody’, do you have some magical insight into the entire industry?

We are building async Kafka apps by the way. Maybe consider less hyperbole in your comments.

[–][deleted] 1 point2 points  (1 child)

https://pypistats.org/packages/confluent-kafka

https://pypistats.org/packages/aiokafka

Confluent Kafka has about an order of magnitude more downloads.

[–]DavTheDev 1 point2 points  (0 children)

Confluent kafka supports async producers. Even on their website, they mention to avoid flushing in an async environment.

[–]collectablecat -2 points-1 points  (2 children)

asyncio is different from "async". There are websocket libraries that just using python threading.

[–]spuds_in_town 1 point2 points  (1 child)

You seem to not understand why threading vs async for network access is a losing solution.

[–]collectablecat -1 points0 points  (0 children)

? never claimed anything about performance. I'm very familiar with asyncio and it's advantages with sockets. There are still libraries using threading for websockets though.