Ina Android currently uses the Messenger API to provide IPC to the PatchService. However, this method of interfacing with PatchService doesn't support multithreading, meaning that patch operations must occur sequentially. This doesn't seem too bad on the surface considering Ina's fast patching speed, but those results assume that the entire patch is accessible immediately. When patching on-the-fly from, say, a network stream, all other patching operations are blocked until the first completes, drastically slowing down the process of updating multiple apps from the network simultaneously, which is the exact use case of Accrescent.
We should support multithreaded patching by default to resolve this issue. To do so, we should migrate away from the Messenger API to a custom AIDL interface since AIDL explicitly supports multithreading.
Ina Android currently uses the
MessengerAPI to provide IPC to thePatchService. However, this method of interfacing withPatchServicedoesn't support multithreading, meaning that patch operations must occur sequentially. This doesn't seem too bad on the surface considering Ina's fast patching speed, but those results assume that the entire patch is accessible immediately. When patching on-the-fly from, say, a network stream, all other patching operations are blocked until the first completes, drastically slowing down the process of updating multiple apps from the network simultaneously, which is the exact use case of Accrescent.We should support multithreaded patching by default to resolve this issue. To do so, we should migrate away from the
MessengerAPI to a custom AIDL interface since AIDL explicitly supports multithreading.