Skip to content

Performance comparison #205

Discussion options

You must be logged in to vote

Great to hear that it helped. :)

I suppose we are reaching the limit of concurrent tasks, and in the end, we are only using one core.

It's more about OS-level concurrency than hardware-based parallelism (here is a great thread on that topic). asyncio-mqtt uses paho-mqtt. paho-mqtt uses socket. socket is a sync interface (no concurrency).

If we want OS-level concurrency, we need to use an actual async interface. E.g.: anyio.open_connection/loop.create_connection instead of socket. That's what, e.g., gmqtt does.

In a perfect world, we would have:

  • A safe interface (like asyncio-mqtt)
  • An actual async I/O backend (like gmqtt)
  • The maturity of paho-mqtt

I don't think such a library exists ye…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JoseAntonioTorre
Comment options

@frederikaalund
Comment options

Answer selected by JoseAntonioTorre
@JoseAntonioTorre
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants