Professional Documents
Culture Documents
15 ISIS3510-EventualConnectivity
15 ISIS3510-EventualConnectivity
3.0
EVENTUAL
CONNECTIVITY
Should we handle offline
scenarios in mobile
apps?
Mobile apps are expected to run on
an environment with high
computational capabilities, local
storage, and access to a diverse set
of on-device hardware components
and sensors
How different are
web apps from
mobile apps?
Web apps are executed in a browser
that limits the access to hardware
components and computational
capabilities
Web apps are highly dependent
(often) on code that is executed at the
server side
Why do we need
apps with offline
capabilities and local
storage?
CASE STUDY 1:
Dairo is a maintenance operator for boilers. Every day,
before starting his shift, he downloads his working plan to
his tablet. Today, his first visit was at the Maliott hotel
(according to the plan)
At 8:00 am, Dairo was at the boilers room of the hotel (-2
floor). His report included photos and descriptions of the
situation. When he came back to the lobby, he taped on
the “Send report” button, at his tickets app, but the app
displayed an error dialog with the message “Wrong id
for the boilers room”
CASE STUDY 1:
This is a list of events that can help you to find
the issue:
- 8:00 am: Dairo gets into the boilers room (-2 floor)
- 8:01 am: Dairo's tablet lost connectivity
- 8:45 am: Dairo’s supervisor (Carlos) realized that the working plan
had an error, and there was a typo on the name of the hotel for the
first visit. The right name is “Marriott”
- 8:46: Carlos updated the hotel name at the centralized DB
- 9:05: Dairo left the room, and as soon as he got to the lobby the
tablet had connectivity again
- 9:06: There is an error when submitting the report data to the server
CASE STUDY 2:
Luisa is a maintenance operator for boilers. Every day,
before starting her shift, she downloads her working plan
to her tablet. Today, her first visit was at the W hotel
(according to the plan)
At 8:00 am, Luisa was at the boilers room of the hotel (-2
floor). Her report included photos and descriptions of the
situation. The report form has about 20 input fields. Before
leaving the room, the tablet turned off because the battery
was without juice. She went up stairs to plug the tablet to
an energy outlet. But, when she launched the app, all the
information was lost.
CASE STUDY 3:
Pierre is a maintenance operator for boilers. Every day,
before starting his shift, he downloads his working plan to
his tablet. Today, his first visit was at the Kapital hotel
(according to the plan)
At 8:30 am, Pierre was at the boilers room of the hotel (-2
floor). His report included photos and descriptions of the
situation. The report form has about 20 input fields. Before
leaving the room, he got a call from his supervisor, via
Skype. Carlos told him that there was a typo at the hotel’s
name. When the call was over, Pierre went back to the
tickets app, but it crashed and the report data was lost
How to enable
offline
experiences?
Apps need to combine
local storage strategies
with data retrieving and
fetching strategies
Cache: data stored locally with the
purpose of avoiding long computations/
invocations required get the requested
data
Cache (permanent): the data is always
available in the device, unless the user
deletes it or there is an over-the-air data
update
2
2. Network only:
Cache
Content
Manager
1
3. Network falling back to cache:
Cache
Content
Manager
X
3. Network falling back to cache:
X
4. Cached on network response:
2
Cache
Content
Manager
1
5. Cache then network:
Cache
Content
Manager
2
5. Cache then network:
Manager
2
6. Generic fallback:
X Cache
Content
Manager
X
6. Generic fallback:
X Cache
Content
Manager
Fallback
local
resource
RECAP of data caching + retrieving
strategies
https://drive.google.com/file/d/0B6rmz9iRQx89N0lLRlNKSnMzN2c/view
https://drive.google.com/file/d/0B6rmz9iRQx89cGkxVm42bWFXWVk/view
https://drive.google.com/file/d/0B6rmz9iRQx89SEFRNi0tS19wWTg/view
https://drive.google.com/file/d/0B6rmz9iRQx89M2VJaUtDTWZIZEU/view
ANTI-PATTERN #3
ANTI-PATTERN #4: LOST CONTENT
https://drive.google.com/file/d/0B6rmz9iRQx89TVhoM09Zdm9YanM/view
https://drive.google.com/file/d/0Bxilg6hEwsQqdE11bVNiQjYzVUk/view
https://drive.google.com/file/d/0B6rmz9iRQx89Y3lmejdiMUlyTms/view
ANTI-PATTERN #5: NON-EXISTENT RESULT
NOTIFICATION
https://drive.google.com/file/d/0B1tqnYuNn8J7XzI2V0xtSmM4NVE/view
https://drive.google.com/file/d/0B1tqnYuNn8J7czRyaWhJRm43VWM/view
https://drive.google.com/file/d/0B6rmz9iRQx89WWdTa3dzM2pOYVk/view
ANTI-PATTERN #9:UNEXPECTED RESULT FROM
BACKGROUND PROCESS