You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use twisted.internet.asyncioreactor for synapse's twisted reactor.
Description
This is part of my idea that synapse should consider moving forward, beyond, or at least next to twisted, to also use asyncio's economy of libraries and functions. With the asyncioreactor, it's possible to mix twisted and asyncio functionality with eachother.
It's also possible to use uvloop in addition to this, allowing a big IO performance boost.
Will the existing twisted-based code be stable on a new reactor based out of asyncio?
Will the reactor impact performance (negatively)?
For 1, I want to run a server along my existing one, only joining some channels, and watch out for any crashes and the like, and/or perform test benches with asyncioreactor selected.
For 2, I'd want to know what the best way is for me to collect such statistics and/or how to compare them with a normal server.
The text was updated successfully, but these errors were encountered:
This issue has been migrated from #8642.
Idea
Use
twisted.internet.asyncioreactor
for synapse's twisted reactor.Description
This is part of my idea that synapse should consider moving forward, beyond, or at least next to twisted, to also use
asyncio
's economy of libraries and functions. With theasyncioreactor
, it's possible to mixtwisted
andasyncio
functionality with eachother.It's also possible to use
uvloop
in addition to this, allowing a big IO performance boost.Some links:
asyncioreactor
: https://twistedmatrix.com/documents/current/api/twisted.internet.asyncioreactor.htmlasyncio
/twisted
intermixing: https://gist.github.com/ldjebran/4febf298232a6fd86871df25d4dc00ddDeferred.asFuture()
: https://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html#asFutureTwisted and Asyncio (blog post): https://meejah.ca/blog/python3-twisted-and-asyncio
Considerations
I have two concerns with doing this:
Will the existing twisted-based code be stable on a new reactor based out of
asyncio
?Will the reactor impact performance (negatively)?
For 1, I want to run a server along my existing one, only joining some channels, and watch out for any crashes and the like, and/or perform test benches with
asyncioreactor
selected.For 2, I'd want to know what the best way is for me to collect such statistics and/or how to compare them with a normal server.
The text was updated successfully, but these errors were encountered: