OFS: An Overlay File System for Cloud-Assisted Mobile Applications
Jianchen Shan, Nafize R. Paiker, Xiaoning Ding, Narain Gehani, Reza Curtmola, Cristian Borcea
OFS: An Overlay File System for Cloud-Assisted Mobile Applications - - PowerPoint PPT Presentation
OFS: An Overlay File System for Cloud-Assisted Mobile Applications Jianchen Shan, Nafize R. Paiker, Xiaoning Ding, Narain Gehani, Reza Curtmola, Cristian Borcea Mobile apps need cloud assistance Mobile devices have limited resources
Jianchen Shan, Nafize R. Paiker, Xiaoning Ding, Narain Gehani, Reza Curtmola, Cristian Borcea
– Threads: CloneCloud [EuroSys ’11], COMET [OSDI ’12] – Procedures: MAUI [MobiSys ’10], ThinkAir [Infocom ’12] – Objects: Sapphire [OSDI ’14]
2
Cloud
Mobile 3 Read the photo from mobile
– Read and write files on both mobile and cloud – May require strong consistency (always read latest copy) – Long I/O latency due to transferring the file over network
3
– COMET [OSDI ’12]
– MAUI [MobiSys ’10], ThinkAir [Infocom ’12], CloneCloud [EuroSys ’11], Sapphire [OSDI ’14]
4
– Close → migrate → reopen
5
– Access remote files as though they were local – Maintain file sessions during task offloading
– Ensure correct execution of tasks distributed across mobile and cloud
– Provide low latency with little network overhead to save energy and network bandwidth
– Require minimal privileges in addition to those needed to run tasks – No need to save to-be-accessed files before application runs
6
– Doesn’t need system-wide management – Can work with any native file system – Doesn’t incur costly context switches
– Strong consistency (delayed-update policy) – Location transparency (file session management) – Low overhead (low latency file access, low overhead consistency maintenance) – Ease of deployment (application level)
7
8
Local Offloading middleware Offloaded task Standard file I/O interface Offloading middleware Local O Mobile app Standard file I/O interface OFS Block buffer
Cloud Mobile device
OFS Block buffer
Consistency
tasks in application
cache blocks read from remote files through network
Block buffer Block buffer
9
Buffer management Session management Local/remote access switch Standard file I/O interface to app To native file systems Block buffer Consistency management To other devices Interface to task
middleware
Upper layer: library linked with application Lower layer: app-level runtime service in middleware
10
Buffer Session management Local/remote access switch Standard file I/O interface to app
Interface to task
middleware Attached with application OFS middleware
file system or OFS
11
Buffer management Session management Local/remote access switch Standard file I/O interface to app cy To other devices Interface to task
middleware Attached with application OFS middleware
unfinished file sessions will be correctly set up
12
management To native file systems Block buffer Consistency management To other devices task middleware
management
13
Buffer management Session management To native file systems Block buffer Consistency management To other devices Interface to task
middleware OFS middleware
14
Storage L h Session Manager Consistency Manager Buffer Manager OFS Middleware User App al/Remote Switch ession Manager Consistency Manager Buffer Manager OFS Middleware Cloud Storage
Mobile Cloud
Take and store photo Is it remote? Store the photo locally no
Offload heavy workload thread from mobile to the cloud
15
OFS Middleware OFS Middleware Local Storage Cloud Storage ssion Resume S p Update the photo Is it remote?yes Update file state Display the photo
Mobile Cloud Migrate the thread back to mobile from cloud
Load file blocks Maintain consistency between cloud and mobile If any of the file blocks in block buffer are invalid, fetch valid copies from cloud and return file blocks
16
User App Consistency Manager Buffer Manager OFS Middleware User App Local/Remote Switch Consistency Manager Buffer Manager OFS Middleware Cloud Storage
Mobile Cloud
Destroy Session Destroy Session Update file state
17
Local Storage
18
T Cloud Mobile
– Combination of write-invalidate and write-update
w w w R
19
w
Invalidate
…
Update
w w w R w
Invalidate
… …
Update
20
write-update, and NFS
derived from U. of Buffalo’s PhoneLab testbed
– Thread offloading: offload complete threads – Procedure offloading: offload parts of threads
– Average read and write latency – Average I/O latency – Network overhead – Mobile device active time
21
Thread offloading Procedure offloading
invalidate, and NFS
thread offloading
22
invalidate and NFS
workloads
Thread offloading Procedure offloading 23
24
Procedure offloading
task-offloading to the cloud
25
transparency
small network overhead
running cloud-assisted apps
procedure offloading
26
27
28
– Strong consistency
application development
– Low access latency and network overhead
– Relaxed consistency
29
– Combination of write-invalidate and write-update – Invalidate duplicates and then update them when they are about be to read
T Cloud Mobile w w w w w w w w w w w w w w w Overwritten counter = Overwritten threshold = 1 2 3 R R R R R R R
Invalidate Invalidate update Invalidate update Invalidate miss hit hit miss hit miss hit
3 2 1 2 1
update update Invalidate
2 1 2 1 3 2 1 1 1
Invalidate
30
– Combination of write-invalidate and write-update – Invalidate duplicates; update them when they are about be to read
T Cloud Mobile w w w w w w w w w w w w w w w R R R R R R R
Invalidate Miss Hit Hit Miss Hit Miss Hit Invalidate Update Invalidate Update Invalidate Update Invalidate Update Invalidate
31
Thread offloading Procedure offloading
write latency and network overhead
32
Thread offloading Procedure offloading
the overwrite threshold and update duplicates to minimize buffer misses
33