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
Any async io function over trait AsyncSeek can be turned into a sans-io FSM.
I think that's a fact - just calling future.poll(..) on a clever object that pauses on seek and read calls is enough to simulate an ArchiveFsm.
So for example async_zip::ZipFileReader can be made into a sync sans-io interface with a wrapper.
Therefore, my open questions are:
Which paradigm is easier to write in Rust? sans-io or async?1
Which paradigm is faster to execute? sans-io or async?
Can we clone the EntryFsm state to remember decompressor state in the middle of 100 GB file with sans-io? 2
Can we serialize/save the EntryFsm state into JSON and resume it later with sans-io?3
Any async io function over trait
AsyncSeek
can be turned into a sans-io FSM.I think that's a fact - just calling
future.poll(..)
on a clever object that pauses on seek and read calls is enough to simulate an ArchiveFsm.So for example async_zip::ZipFileReader can be made into a sync sans-io interface with a wrapper.
Therefore, my open questions are:
Some answers are already in video fasterthanlime: The case for sans-io
Footnotes
async fn is actually an FSM https://users.rust-lang.org/t/serde-async-state-machine/99648 ↩
DecompressorOxide implements Clone ↩
async_zip ZipFileReader implements Clone, but not Serialize ↩
The text was updated successfully, but these errors were encountered: