SlideShare a Scribd company logo
|
Mobile Synchronization
Patterns for Large Volumes
of Data
|| Mobile Synchronization Patterns for Large Volumes of Data
João Pereira
Developer | Do iT Lean
@
in
joao.pereira@doilean.com
/joão-pedro-martins-pereira-8a115b120
|| Mobile Synchronization Patterns for Large Volumes of Data
Agenda
| Mobile Synchronization Patterns for Large Volumes of Data
● The Mobile Challenge
● Let’s Recap OutSystems Best Practices
● When We Can’t Follow Best Practices . . .
● Solving the Challenge!
● Patterns in Action
|| Mobile Synchronization Patterns for Large Volumes of Data
The Mobile Challenge
| Mobile Synchronization Patterns for Large Volumes of Data
● Mobile Devices are more powerful
than ever
● Mobile apps are faster and more
intuitive than ever
● Users expect your app to perform
like all other apps they use
● How can we do it with OutSystems?
|| Mobile Synchronization Patterns for Large Volumes of Data
Let’s Recap OutSystems
Best Practices
| Mobile Synchronization Patterns for Large Volumes of Data
1. Lightweight Local Database
● Design the local storage data model using only the attributes
that you need
● Transform the local data model to avoid complex queries like
having multiple JOINS
● Identify the best data synchronization patterns for your use case
and define exactly when to run them
| Mobile Synchronization Patterns for Large Volumes of Data
1.1. Lightweight Local Database Example
Server DB Local DB
| Mobile Synchronization Patterns for Large Volumes of Data
2. Control the Amount of Synchronized Data
● We can control the data fetched from the server using:
■ Sync Unit
■ Local Sync Properties
■ Only get the latest data from the server
■ Only get the data that we really need
| Mobile Synchronization Patterns for Large Volumes of Data
3. SyncUnit - Defining Synchronization Moments
| Mobile Synchronization Patterns for Large Volumes of Data
Makes a sync when the add button is Clicked
4. Use the TriggerOfflineDataSync
Synchronize Data in the Background Without Freezing the UI
| Mobile Synchronization Patterns for Large Volumes of Data
5. Avoid Multiple Server Requests
On Client Actions Consolidate Server Requests into one Action
Client Server
| Mobile Synchronization Patterns for Large Volumes of Data
● Evaluate network requirements use cases
■ Define Local Storage strategy
■ Optimize data sync moments
● Evaluate network status in runtime
■ Adapt behavior accordingly
■ Let the user know what’s happening
6. Control the Network Status
| Mobile Synchronization Patterns for Large Volumes of Data
● Corporate vs Public App
● Multiple types of devices
● Different operating systems (Android, iOS)
7. Fined Tune Data Transfers
|| Mobile Synchronization Patterns for Large Volumes of Data
When We Can’t Follow
Best Practices . . .
| Mobile Synchronization Patterns for Large Volumes of Data
1. Mobile App = Web Version
● Client Demands:
■ Must have same functionality in web and mobile
■ The Mobile App is not going to be built based on
mobile specific use cases but on the web
application
● Developer Challenge
■ Must adapt the best practices to support this
situation
| Mobile Synchronization Patterns for Large Volumes of Data
| Mobile Synchronization Patterns for Large Volumes of Data
● Cannot Create a Lightweight Device
Database
■ Requiring JOIN’s will influence performance of the
app
■ Must find ways to overcome this limitation in
terms of Sync Moments
■ Analyze the use-cases the application needs
■ Minimize sync of tables that have a high volume of
data
■ Minimize using data that have multiple joins on
Mobile App Screens
2. All Data Must Be on the Mobile App
|| Mobile Synchronization Patterns for Large Volumes of Data
Solving the Challenge!
| Mobile Synchronization Patterns for Large Volumes of Data
Controlling
Time & Matter
| Mobile Synchronization Patterns for Large Volumes of Data
● Case A - Infrequent Change
■ Treat like static data
■ Synchronize all in the first use of the
application
■ Sync only when the data changes
■ Inside of the Mobile App only sync the
tables & data that is really needed
1. Understanding Your Data
| Mobile Synchronization Patterns for Large Volumes of Data
● Case B - Frequent Change
■ Like in the previous case - sync all data in first use
■ On Local to Server, only sync the modified data
■ Syncing Modified Data - Depending on the use-
case, choose one of these scenarios
■ Last Write Wins
■ Server Always Win
■ Conflict Mechanism
■ Discard mechanism to prevent inconsistent data if
sync processes went wrong
1. Understanding Your Data
| Mobile Synchronization Patterns for Large Volumes of Data
● SyncUnit
■ Create a static entity with the tables we
need to sync
● Create a Sync Unit History
■ Keep track of tables that need sync
■ Last date the data was changed
2. Build Your Sync Mechanism
|| Mobile Synchronization Patterns for Large Volumes of Data
Patterns in Action
| Mobile Synchronization Patterns for Large Volumes of Data
● Use case – Need to have 3000 records available at the start of the
application:
■ First Use Sync Strategy – Sync all the data - must guaranty the network is 3G or
superior
■ When the tables get changed just synchronize the ones that changed
■ Sync only the data that is needed to execute the functionality that is needed on
the Mobile App
Real World Example
| Mobile Synchronization Patterns for Large Volumes of Data
● Create the SyncUnitHistory Record
■ Will be created on the CRUD – Create or
Update Actions of the tables we want to
sync
■ This table will have SyncUnitId and the Last
Updated Date
■ Used to know the date of the last changed
record of a table that we will need to sync
How to know when and what needs to be Synced?
| Mobile Synchronization Patterns for Large Volumes of Data
● Get SyncUnits To Sync:
■ Action to check which SyncUnits need
to be refreshed on your mobile app
■ Receives the Device Date and returns
the list of ids of the tables that need
to be sync
■ The action is used in the mobile
synchronization action
How to know what tables we need to Sync ?
| Mobile Synchronization Patterns for Large Volumes of Data
● Create a Control of Sync in Local Storage:
■ Sync controller in the local storage
■ This will kept track of the tables that already have
been synced and when it was done
Client-Side LastSync Controller
| Mobile Synchronization Patterns for Large Volumes of Data
Example - MaterialType table
Table with large volume of data
| Mobile Synchronization Patterns for Large Volumes of Data
● Sync of Material Type :
■ Get the Material-Types that are present on
the server
■ In the first time will get all
■ Next time is filter by date from, date to and
only the active ones
■ LocaleId is passed because app is
multilingual
■ As output we get the Server Material Types
and the total records
1. Create Sync Material-Type action
| Mobile Synchronization Patterns for Large Volumes of Data
● Sync of Material Type client side :
■ Create our Material-Type Local Storage;
■ Last Sync table to get the interval of time the
date will be get
■ Updates the controller for the sync unit
Material-Type
2. Action on client side to fill Material-Type local table
| Mobile Synchronization Patterns for Large Volumes of Data
● OfflineDataSync Action :
■ Sync the Local Data into the Server
■ If no errors occur, we start the sync of the
large volume of data tables
■ Sync the tables with less volume of data
3. Mobile synchronization process
| Mobile Synchronization Patterns for Large Volumes of Data
● Sync_LC_Check Action :
■ Check’s our connection because we
need to have network
■ Get SyncUnits to update list to
check which tables need to be sync
■ Update the sync controller Last Sync
and run the action Sync_LC_Update
4. Trigger and know which tables we going to Sync
| Mobile Synchronization Patterns for Large Volumes of Data
● Sync_LC_Update Action :
■ This action will receive as input the
SyncUnit and only update the
respective table
5. Action that Syncs the large volume of data tables
| Mobile Synchronization Patterns for Large Volumes of Data
Dealing with
Conflict
| Mobile Synchronization Patterns for Large Volumes of Data
● Use Case:
■ When multiple users can change the same
data and the mobile app can be used offline
■ You need a mechanism to determine which
data is conflicting
■ You need a screen so the user can choose the
correct data
How to Create a Conflict Screen on Your Mobile App
| Mobile Synchronization Patterns for Large Volumes of Data
● Solution:
■ Create a Static Table with the Entities name that we want to make conflict
detection and resolution
■ Then use that static entity and create one local entity that will keep the table
name and a flag if exist conflict
■ When we try to sync or update the local record into the server we need to check
if a conflict exists
■ If a conflict exists create an entry on the table of conflicts and add a record to
the list
How to Create a Conflict Screen on Your Mobile App
| Mobile Synchronization Patterns for Large Volumes of Data
1. Creating the list of Conflicts
| Mobile Synchronization Patterns for Large Volumes of Data
● Conflict Resolution:
■ After click on the list the Conflict
Element’s will appear
■ Local & Server record are serialize &
deserialize into a JSON
■ Screen less heavy and with better
performance
■ Can be optimized to choose attribute
by attribute instead of record
2. Conflict Screen on Mobile App to Compare Data
| Mobile Synchronization Patterns for Large Volumes of Data
|| Mobile Synchronization Patterns for Large Volumes of Data
Q & A
|
Thank You!
@ injoao.pereira@doilean.com / joão-pedro-martins-
pereira-8a115b120

More Related Content

What's hot

Architecture 101 + Libraries
Architecture 101 + LibrariesArchitecture 101 + Libraries
Architecture 101 + Libraries
OutSystems
 
Reactive Web Best Practices
Reactive Web Best PracticesReactive Web Best Practices
Reactive Web Best Practices
OutSystems
 
OutSystems Tips and Tricks
OutSystems Tips and TricksOutSystems Tips and Tricks
OutSystems Tips and Tricks
OutSystems
 
Hardcore CSS Made Easy
Hardcore CSS Made EasyHardcore CSS Made Easy
Hardcore CSS Made Easy
José Rosário
 
Launching a BPT Process on Entity Update
Launching a BPT Process on Entity UpdateLaunching a BPT Process on Entity Update
Launching a BPT Process on Entity Update
OutSystems
 
Hands on With Advanced Data Grid
Hands on With Advanced Data GridHands on With Advanced Data Grid
Hands on With Advanced Data Grid
OutSystems
 
REST Versioning Architecture with ASP.NET MVC Web API v1.2
REST Versioning Architecture with ASP.NET MVC Web API v1.2REST Versioning Architecture with ASP.NET MVC Web API v1.2
REST Versioning Architecture with ASP.NET MVC Web API v1.2Rodrigo Ezequiel Liberoff V
 
Multi tenancy - a practical approach
Multi tenancy - a practical approachMulti tenancy - a practical approach
Multi tenancy - a practical approach
CatarinaPereira64715
 
Training Webinar: Fitting OutSystems applications into Enterprise Architecture
Training Webinar: Fitting OutSystems applications into Enterprise ArchitectureTraining Webinar: Fitting OutSystems applications into Enterprise Architecture
Training Webinar: Fitting OutSystems applications into Enterprise Architecture
OutSystems
 
Jmeter vs loadrunner vs neoload
Jmeter vs loadrunner vs neoloadJmeter vs loadrunner vs neoload
Jmeter vs loadrunner vs neoload
pratik mohite
 
Training Webinar: Top front-end techniques for OutSystems
 Training Webinar: Top front-end techniques for OutSystems Training Webinar: Top front-end techniques for OutSystems
Training Webinar: Top front-end techniques for OutSystems
OutSystems
 
OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
 OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A... OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
OutSystemsNeo
 
Create Amazing Reports in OutSystems
Create Amazing Reports in OutSystemsCreate Amazing Reports in OutSystems
Create Amazing Reports in OutSystems
OutSystems
 
Training Webinars - Secret hacks for OutSystems 10
Training Webinars - Secret hacks for OutSystems 10Training Webinars - Secret hacks for OutSystems 10
Training Webinars - Secret hacks for OutSystems 10
OutSystems
 
Neoload
Neoload Neoload
Neoload
Kumar Gupta
 
TypeScript VS JavaScript.pptx
TypeScript VS JavaScript.pptxTypeScript VS JavaScript.pptx
TypeScript VS JavaScript.pptx
Albiorix Technology
 
CSS workshop @ OutSystems
CSS workshop @ OutSystemsCSS workshop @ OutSystems
CSS workshop @ OutSystems
Ruben Goncalves
 
Using Processes and Timers for Long-Running Asynchronous Tasks
Using Processes and Timers for Long-Running Asynchronous TasksUsing Processes and Timers for Long-Running Asynchronous Tasks
Using Processes and Timers for Long-Running Asynchronous Tasks
OutSystems
 
Extending OutSystems with Javascript
Extending OutSystems with JavascriptExtending OutSystems with Javascript
Extending OutSystems with Javascript
RitaDias72
 
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystemsTechnical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
OutSystems
 

What's hot (20)

Architecture 101 + Libraries
Architecture 101 + LibrariesArchitecture 101 + Libraries
Architecture 101 + Libraries
 
Reactive Web Best Practices
Reactive Web Best PracticesReactive Web Best Practices
Reactive Web Best Practices
 
OutSystems Tips and Tricks
OutSystems Tips and TricksOutSystems Tips and Tricks
OutSystems Tips and Tricks
 
Hardcore CSS Made Easy
Hardcore CSS Made EasyHardcore CSS Made Easy
Hardcore CSS Made Easy
 
Launching a BPT Process on Entity Update
Launching a BPT Process on Entity UpdateLaunching a BPT Process on Entity Update
Launching a BPT Process on Entity Update
 
Hands on With Advanced Data Grid
Hands on With Advanced Data GridHands on With Advanced Data Grid
Hands on With Advanced Data Grid
 
REST Versioning Architecture with ASP.NET MVC Web API v1.2
REST Versioning Architecture with ASP.NET MVC Web API v1.2REST Versioning Architecture with ASP.NET MVC Web API v1.2
REST Versioning Architecture with ASP.NET MVC Web API v1.2
 
Multi tenancy - a practical approach
Multi tenancy - a practical approachMulti tenancy - a practical approach
Multi tenancy - a practical approach
 
Training Webinar: Fitting OutSystems applications into Enterprise Architecture
Training Webinar: Fitting OutSystems applications into Enterprise ArchitectureTraining Webinar: Fitting OutSystems applications into Enterprise Architecture
Training Webinar: Fitting OutSystems applications into Enterprise Architecture
 
Jmeter vs loadrunner vs neoload
Jmeter vs loadrunner vs neoloadJmeter vs loadrunner vs neoload
Jmeter vs loadrunner vs neoload
 
Training Webinar: Top front-end techniques for OutSystems
 Training Webinar: Top front-end techniques for OutSystems Training Webinar: Top front-end techniques for OutSystems
Training Webinar: Top front-end techniques for OutSystems
 
OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
 OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A... OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
 
Create Amazing Reports in OutSystems
Create Amazing Reports in OutSystemsCreate Amazing Reports in OutSystems
Create Amazing Reports in OutSystems
 
Training Webinars - Secret hacks for OutSystems 10
Training Webinars - Secret hacks for OutSystems 10Training Webinars - Secret hacks for OutSystems 10
Training Webinars - Secret hacks for OutSystems 10
 
Neoload
Neoload Neoload
Neoload
 
TypeScript VS JavaScript.pptx
TypeScript VS JavaScript.pptxTypeScript VS JavaScript.pptx
TypeScript VS JavaScript.pptx
 
CSS workshop @ OutSystems
CSS workshop @ OutSystemsCSS workshop @ OutSystems
CSS workshop @ OutSystems
 
Using Processes and Timers for Long-Running Asynchronous Tasks
Using Processes and Timers for Long-Running Asynchronous TasksUsing Processes and Timers for Long-Running Asynchronous Tasks
Using Processes and Timers for Long-Running Asynchronous Tasks
 
Extending OutSystems with Javascript
Extending OutSystems with JavascriptExtending OutSystems with Javascript
Extending OutSystems with Javascript
 
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystemsTechnical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
 

Similar to Mobile Synchronization Patterns for Large Volumes of Data

Achieve Your State Missions with Better Data
Achieve Your State Missions with Better DataAchieve Your State Missions with Better Data
Achieve Your State Missions with Better Data
Safe Software
 
Mobile cloud sync
Mobile   cloud syncMobile   cloud sync
Mobile cloud sync
Prithiviraj Damodaran
 
A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...
A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...
A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...
Fatima Qayyum
 
UNIT I Streaming Data & Architectures.pptx
UNIT I Streaming Data & Architectures.pptxUNIT I Streaming Data & Architectures.pptx
UNIT I Streaming Data & Architectures.pptx
Rahul Borate
 
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
NITHIN S.S
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
NITHIN S.S
 
"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends
Derek Baron
 
Real Time Business Platform by Ivan Novick from Pivotal
Real Time Business Platform by Ivan Novick from PivotalReal Time Business Platform by Ivan Novick from Pivotal
Real Time Business Platform by Ivan Novick from Pivotal
VMware Tanzu Korea
 
Sea of Data
Sea of DataSea of Data
redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)
Peter Presnell
 
Automating Everything with FME
Automating Everything with FMEAutomating Everything with FME
Automating Everything with FME
Safe Software
 
Contextual apps for Tizen
Contextual apps for TizenContextual apps for Tizen
Contextual apps for Tizen
Shashwat Pradhan
 
Dimensions computation meetup
Dimensions computation meetupDimensions computation meetup
Dimensions computation meetup
Timothy Farkas
 
Patterns for Mobile and IoT backends with serverless paradigms
Patterns for Mobile and IoT backends with serverless paradigmsPatterns for Mobile and IoT backends with serverless paradigms
Patterns for Mobile and IoT backends with serverless paradigms
Vidyasagar Machupalli
 
Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...
Respa Peter
 
Big Data and User Segmentation in Mobile Context
Big Data and User Segmentation in Mobile ContextBig Data and User Segmentation in Mobile Context
Big Data and User Segmentation in Mobile Context
InMobi Technology
 
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA
 
8 Ways Utility Networks Can Meet Data Demands
8 Ways Utility Networks Can Meet Data Demands8 Ways Utility Networks Can Meet Data Demands
8 Ways Utility Networks Can Meet Data Demands
Safe Software
 
SA UNIT I STREAMING ANALYTICS.pdf
SA UNIT I STREAMING ANALYTICS.pdfSA UNIT I STREAMING ANALYTICS.pdf
SA UNIT I STREAMING ANALYTICS.pdf
ManjuAppukuttan2
 
Data in Motion - tech-intro-for-paris-hackathon
Data in Motion - tech-intro-for-paris-hackathonData in Motion - tech-intro-for-paris-hackathon
Data in Motion - tech-intro-for-paris-hackathon
Cisco DevNet
 

Similar to Mobile Synchronization Patterns for Large Volumes of Data (20)

Achieve Your State Missions with Better Data
Achieve Your State Missions with Better DataAchieve Your State Missions with Better Data
Achieve Your State Missions with Better Data
 
Mobile cloud sync
Mobile   cloud syncMobile   cloud sync
Mobile cloud sync
 
A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...
A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...
A Low-Cost IoT Application for the Urban Traffic of Vehicles, Based on Wirele...
 
UNIT I Streaming Data & Architectures.pptx
UNIT I Streaming Data & Architectures.pptxUNIT I Streaming Data & Architectures.pptx
UNIT I Streaming Data & Architectures.pptx
 
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022Enhance mobile app testing with performance-centric strategies: SauceCon 2022
Enhance mobile app testing with performance-centric strategies: SauceCon 2022
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
 
"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends"Going Offline", one of the hottest mobile app trends
"Going Offline", one of the hottest mobile app trends
 
Real Time Business Platform by Ivan Novick from Pivotal
Real Time Business Platform by Ivan Novick from PivotalReal Time Business Platform by Ivan Novick from Pivotal
Real Time Business Platform by Ivan Novick from Pivotal
 
Sea of Data
Sea of DataSea of Data
Sea of Data
 
redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)redpill Mobile Case Study (Salvation Army)
redpill Mobile Case Study (Salvation Army)
 
Automating Everything with FME
Automating Everything with FMEAutomating Everything with FME
Automating Everything with FME
 
Contextual apps for Tizen
Contextual apps for TizenContextual apps for Tizen
Contextual apps for Tizen
 
Dimensions computation meetup
Dimensions computation meetupDimensions computation meetup
Dimensions computation meetup
 
Patterns for Mobile and IoT backends with serverless paradigms
Patterns for Mobile and IoT backends with serverless paradigmsPatterns for Mobile and IoT backends with serverless paradigms
Patterns for Mobile and IoT backends with serverless paradigms
 
Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...
 
Big Data and User Segmentation in Mobile Context
Big Data and User Segmentation in Mobile ContextBig Data and User Segmentation in Mobile Context
Big Data and User Segmentation in Mobile Context
 
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
 
8 Ways Utility Networks Can Meet Data Demands
8 Ways Utility Networks Can Meet Data Demands8 Ways Utility Networks Can Meet Data Demands
8 Ways Utility Networks Can Meet Data Demands
 
SA UNIT I STREAMING ANALYTICS.pdf
SA UNIT I STREAMING ANALYTICS.pdfSA UNIT I STREAMING ANALYTICS.pdf
SA UNIT I STREAMING ANALYTICS.pdf
 
Data in Motion - tech-intro-for-paris-hackathon
Data in Motion - tech-intro-for-paris-hackathonData in Motion - tech-intro-for-paris-hackathon
Data in Motion - tech-intro-for-paris-hackathon
 

More from OutSystems

Innovating at the Speed of Business in the High-Bandwidth World of Digital Media
Innovating at the Speed of Business in the High-Bandwidth World of Digital MediaInnovating at the Speed of Business in the High-Bandwidth World of Digital Media
Innovating at the Speed of Business in the High-Bandwidth World of Digital Media
OutSystems
 
Beyond “Location”: Informing Real-Estate Decisions Through Innovative Technology
Beyond “Location”: Informing Real-Estate Decisions Through Innovative TechnologyBeyond “Location”: Informing Real-Estate Decisions Through Innovative Technology
Beyond “Location”: Informing Real-Estate Decisions Through Innovative Technology
OutSystems
 
Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...
Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...
Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...
OutSystems
 
From Core Systems to Mobile Apps: Digital Transformation from the Inside-Out
From Core Systems to Mobile Apps: Digital Transformation from the Inside-OutFrom Core Systems to Mobile Apps: Digital Transformation from the Inside-Out
From Core Systems to Mobile Apps: Digital Transformation from the Inside-Out
OutSystems
 
Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...
Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...
Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...
OutSystems
 
Fast and Furious: Modernizing Clinical Application
Fast and Furious: Modernizing Clinical ApplicationFast and Furious: Modernizing Clinical Application
Fast and Furious: Modernizing Clinical Application
OutSystems
 
Enrich Visually Google Map Information With Layers
Enrich Visually Google Map Information With LayersEnrich Visually Google Map Information With Layers
Enrich Visually Google Map Information With Layers
OutSystems
 
Unattended OutSystems Installation
Unattended OutSystems InstallationUnattended OutSystems Installation
Unattended OutSystems Installation
OutSystems
 
The 4-Layer Architecture in Practice
The 4-Layer Architecture in PracticeThe 4-Layer Architecture in Practice
The 4-Layer Architecture in Practice
OutSystems
 
Speed up Development by Turning Web Blocks Into First-Class Citizens
Speed up Development by Turning Web Blocks Into First-Class CitizensSpeed up Development by Turning Web Blocks Into First-Class Citizens
Speed up Development by Turning Web Blocks Into First-Class Citizens
OutSystems
 
Service Actions
Service ActionsService Actions
Service Actions
OutSystems
 
Responsive Ui with Realtime Database
Responsive Ui with Realtime DatabaseResponsive Ui with Realtime Database
Responsive Ui with Realtime Database
OutSystems
 
RADS - Rapid Application Design Sprint
RADS - Rapid Application Design SprintRADS - Rapid Application Design Sprint
RADS - Rapid Application Design Sprint
OutSystems
 
Pragmatic Innovation
Pragmatic InnovationPragmatic Innovation
Pragmatic Innovation
OutSystems
 
Troubleshooting Dashboard Performance
Troubleshooting Dashboard PerformanceTroubleshooting Dashboard Performance
Troubleshooting Dashboard Performance
OutSystems
 
No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...
No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...
No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...
OutSystems
 
Neo in Wonderland: Essential Tools for an Outsystems Architect
Neo in Wonderland: Essential Tools for an Outsystems ArchitectNeo in Wonderland: Essential Tools for an Outsystems Architect
Neo in Wonderland: Essential Tools for an Outsystems Architect
OutSystems
 
Measure Customer Experience of Your OutSystems Web and Mobile Applications
Measure Customer Experience of Your OutSystems Web and Mobile ApplicationsMeasure Customer Experience of Your OutSystems Web and Mobile Applications
Measure Customer Experience of Your OutSystems Web and Mobile Applications
OutSystems
 
Link Users to Your Specific Page in a Mobile App With Deeplinks
Link Users to Your Specific Page in a Mobile App With DeeplinksLink Users to Your Specific Page in a Mobile App With Deeplinks
Link Users to Your Specific Page in a Mobile App With Deeplinks
OutSystems
 
Testing With OutSystems
Testing With OutSystemsTesting With OutSystems
Testing With OutSystems
OutSystems
 

More from OutSystems (20)

Innovating at the Speed of Business in the High-Bandwidth World of Digital Media
Innovating at the Speed of Business in the High-Bandwidth World of Digital MediaInnovating at the Speed of Business in the High-Bandwidth World of Digital Media
Innovating at the Speed of Business in the High-Bandwidth World of Digital Media
 
Beyond “Location”: Informing Real-Estate Decisions Through Innovative Technology
Beyond “Location”: Informing Real-Estate Decisions Through Innovative TechnologyBeyond “Location”: Informing Real-Estate Decisions Through Innovative Technology
Beyond “Location”: Informing Real-Estate Decisions Through Innovative Technology
 
Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...
Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...
Beyond Digital Transformation: A Mandate for Disruptive Innovation in the Age...
 
From Core Systems to Mobile Apps: Digital Transformation from the Inside-Out
From Core Systems to Mobile Apps: Digital Transformation from the Inside-OutFrom Core Systems to Mobile Apps: Digital Transformation from the Inside-Out
From Core Systems to Mobile Apps: Digital Transformation from the Inside-Out
 
Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...
Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...
Orchestrating the Art of the Impossible Using Low-Code to Automate Manual Wor...
 
Fast and Furious: Modernizing Clinical Application
Fast and Furious: Modernizing Clinical ApplicationFast and Furious: Modernizing Clinical Application
Fast and Furious: Modernizing Clinical Application
 
Enrich Visually Google Map Information With Layers
Enrich Visually Google Map Information With LayersEnrich Visually Google Map Information With Layers
Enrich Visually Google Map Information With Layers
 
Unattended OutSystems Installation
Unattended OutSystems InstallationUnattended OutSystems Installation
Unattended OutSystems Installation
 
The 4-Layer Architecture in Practice
The 4-Layer Architecture in PracticeThe 4-Layer Architecture in Practice
The 4-Layer Architecture in Practice
 
Speed up Development by Turning Web Blocks Into First-Class Citizens
Speed up Development by Turning Web Blocks Into First-Class CitizensSpeed up Development by Turning Web Blocks Into First-Class Citizens
Speed up Development by Turning Web Blocks Into First-Class Citizens
 
Service Actions
Service ActionsService Actions
Service Actions
 
Responsive Ui with Realtime Database
Responsive Ui with Realtime DatabaseResponsive Ui with Realtime Database
Responsive Ui with Realtime Database
 
RADS - Rapid Application Design Sprint
RADS - Rapid Application Design SprintRADS - Rapid Application Design Sprint
RADS - Rapid Application Design Sprint
 
Pragmatic Innovation
Pragmatic InnovationPragmatic Innovation
Pragmatic Innovation
 
Troubleshooting Dashboard Performance
Troubleshooting Dashboard PerformanceTroubleshooting Dashboard Performance
Troubleshooting Dashboard Performance
 
No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...
No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...
No API? No Problem! Let the Robot Do Your Work! Web Scraping and Automation W...
 
Neo in Wonderland: Essential Tools for an Outsystems Architect
Neo in Wonderland: Essential Tools for an Outsystems ArchitectNeo in Wonderland: Essential Tools for an Outsystems Architect
Neo in Wonderland: Essential Tools for an Outsystems Architect
 
Measure Customer Experience of Your OutSystems Web and Mobile Applications
Measure Customer Experience of Your OutSystems Web and Mobile ApplicationsMeasure Customer Experience of Your OutSystems Web and Mobile Applications
Measure Customer Experience of Your OutSystems Web and Mobile Applications
 
Link Users to Your Specific Page in a Mobile App With Deeplinks
Link Users to Your Specific Page in a Mobile App With DeeplinksLink Users to Your Specific Page in a Mobile App With Deeplinks
Link Users to Your Specific Page in a Mobile App With Deeplinks
 
Testing With OutSystems
Testing With OutSystemsTesting With OutSystems
Testing With OutSystems
 

Recently uploaded

Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 

Recently uploaded (20)

Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 

Mobile Synchronization Patterns for Large Volumes of Data

  • 2. || Mobile Synchronization Patterns for Large Volumes of Data João Pereira Developer | Do iT Lean @ in joao.pereira@doilean.com /joão-pedro-martins-pereira-8a115b120
  • 3. || Mobile Synchronization Patterns for Large Volumes of Data Agenda
  • 4. | Mobile Synchronization Patterns for Large Volumes of Data ● The Mobile Challenge ● Let’s Recap OutSystems Best Practices ● When We Can’t Follow Best Practices . . . ● Solving the Challenge! ● Patterns in Action
  • 5. || Mobile Synchronization Patterns for Large Volumes of Data The Mobile Challenge
  • 6. | Mobile Synchronization Patterns for Large Volumes of Data ● Mobile Devices are more powerful than ever ● Mobile apps are faster and more intuitive than ever ● Users expect your app to perform like all other apps they use ● How can we do it with OutSystems?
  • 7. || Mobile Synchronization Patterns for Large Volumes of Data Let’s Recap OutSystems Best Practices
  • 8. | Mobile Synchronization Patterns for Large Volumes of Data 1. Lightweight Local Database ● Design the local storage data model using only the attributes that you need ● Transform the local data model to avoid complex queries like having multiple JOINS ● Identify the best data synchronization patterns for your use case and define exactly when to run them
  • 9. | Mobile Synchronization Patterns for Large Volumes of Data 1.1. Lightweight Local Database Example Server DB Local DB
  • 10. | Mobile Synchronization Patterns for Large Volumes of Data 2. Control the Amount of Synchronized Data ● We can control the data fetched from the server using: ■ Sync Unit ■ Local Sync Properties ■ Only get the latest data from the server ■ Only get the data that we really need
  • 11. | Mobile Synchronization Patterns for Large Volumes of Data 3. SyncUnit - Defining Synchronization Moments
  • 12. | Mobile Synchronization Patterns for Large Volumes of Data Makes a sync when the add button is Clicked 4. Use the TriggerOfflineDataSync Synchronize Data in the Background Without Freezing the UI
  • 13. | Mobile Synchronization Patterns for Large Volumes of Data 5. Avoid Multiple Server Requests On Client Actions Consolidate Server Requests into one Action Client Server
  • 14. | Mobile Synchronization Patterns for Large Volumes of Data ● Evaluate network requirements use cases ■ Define Local Storage strategy ■ Optimize data sync moments ● Evaluate network status in runtime ■ Adapt behavior accordingly ■ Let the user know what’s happening 6. Control the Network Status
  • 15. | Mobile Synchronization Patterns for Large Volumes of Data ● Corporate vs Public App ● Multiple types of devices ● Different operating systems (Android, iOS) 7. Fined Tune Data Transfers
  • 16. || Mobile Synchronization Patterns for Large Volumes of Data When We Can’t Follow Best Practices . . .
  • 17. | Mobile Synchronization Patterns for Large Volumes of Data 1. Mobile App = Web Version ● Client Demands: ■ Must have same functionality in web and mobile ■ The Mobile App is not going to be built based on mobile specific use cases but on the web application ● Developer Challenge ■ Must adapt the best practices to support this situation
  • 18. | Mobile Synchronization Patterns for Large Volumes of Data
  • 19. | Mobile Synchronization Patterns for Large Volumes of Data ● Cannot Create a Lightweight Device Database ■ Requiring JOIN’s will influence performance of the app ■ Must find ways to overcome this limitation in terms of Sync Moments ■ Analyze the use-cases the application needs ■ Minimize sync of tables that have a high volume of data ■ Minimize using data that have multiple joins on Mobile App Screens 2. All Data Must Be on the Mobile App
  • 20. || Mobile Synchronization Patterns for Large Volumes of Data Solving the Challenge!
  • 21. | Mobile Synchronization Patterns for Large Volumes of Data Controlling Time & Matter
  • 22. | Mobile Synchronization Patterns for Large Volumes of Data ● Case A - Infrequent Change ■ Treat like static data ■ Synchronize all in the first use of the application ■ Sync only when the data changes ■ Inside of the Mobile App only sync the tables & data that is really needed 1. Understanding Your Data
  • 23. | Mobile Synchronization Patterns for Large Volumes of Data ● Case B - Frequent Change ■ Like in the previous case - sync all data in first use ■ On Local to Server, only sync the modified data ■ Syncing Modified Data - Depending on the use- case, choose one of these scenarios ■ Last Write Wins ■ Server Always Win ■ Conflict Mechanism ■ Discard mechanism to prevent inconsistent data if sync processes went wrong 1. Understanding Your Data
  • 24. | Mobile Synchronization Patterns for Large Volumes of Data ● SyncUnit ■ Create a static entity with the tables we need to sync ● Create a Sync Unit History ■ Keep track of tables that need sync ■ Last date the data was changed 2. Build Your Sync Mechanism
  • 25. || Mobile Synchronization Patterns for Large Volumes of Data Patterns in Action
  • 26. | Mobile Synchronization Patterns for Large Volumes of Data ● Use case – Need to have 3000 records available at the start of the application: ■ First Use Sync Strategy – Sync all the data - must guaranty the network is 3G or superior ■ When the tables get changed just synchronize the ones that changed ■ Sync only the data that is needed to execute the functionality that is needed on the Mobile App Real World Example
  • 27. | Mobile Synchronization Patterns for Large Volumes of Data ● Create the SyncUnitHistory Record ■ Will be created on the CRUD – Create or Update Actions of the tables we want to sync ■ This table will have SyncUnitId and the Last Updated Date ■ Used to know the date of the last changed record of a table that we will need to sync How to know when and what needs to be Synced?
  • 28. | Mobile Synchronization Patterns for Large Volumes of Data ● Get SyncUnits To Sync: ■ Action to check which SyncUnits need to be refreshed on your mobile app ■ Receives the Device Date and returns the list of ids of the tables that need to be sync ■ The action is used in the mobile synchronization action How to know what tables we need to Sync ?
  • 29. | Mobile Synchronization Patterns for Large Volumes of Data ● Create a Control of Sync in Local Storage: ■ Sync controller in the local storage ■ This will kept track of the tables that already have been synced and when it was done Client-Side LastSync Controller
  • 30. | Mobile Synchronization Patterns for Large Volumes of Data Example - MaterialType table Table with large volume of data
  • 31. | Mobile Synchronization Patterns for Large Volumes of Data ● Sync of Material Type : ■ Get the Material-Types that are present on the server ■ In the first time will get all ■ Next time is filter by date from, date to and only the active ones ■ LocaleId is passed because app is multilingual ■ As output we get the Server Material Types and the total records 1. Create Sync Material-Type action
  • 32. | Mobile Synchronization Patterns for Large Volumes of Data ● Sync of Material Type client side : ■ Create our Material-Type Local Storage; ■ Last Sync table to get the interval of time the date will be get ■ Updates the controller for the sync unit Material-Type 2. Action on client side to fill Material-Type local table
  • 33. | Mobile Synchronization Patterns for Large Volumes of Data ● OfflineDataSync Action : ■ Sync the Local Data into the Server ■ If no errors occur, we start the sync of the large volume of data tables ■ Sync the tables with less volume of data 3. Mobile synchronization process
  • 34. | Mobile Synchronization Patterns for Large Volumes of Data ● Sync_LC_Check Action : ■ Check’s our connection because we need to have network ■ Get SyncUnits to update list to check which tables need to be sync ■ Update the sync controller Last Sync and run the action Sync_LC_Update 4. Trigger and know which tables we going to Sync
  • 35. | Mobile Synchronization Patterns for Large Volumes of Data ● Sync_LC_Update Action : ■ This action will receive as input the SyncUnit and only update the respective table 5. Action that Syncs the large volume of data tables
  • 36. | Mobile Synchronization Patterns for Large Volumes of Data Dealing with Conflict
  • 37. | Mobile Synchronization Patterns for Large Volumes of Data ● Use Case: ■ When multiple users can change the same data and the mobile app can be used offline ■ You need a mechanism to determine which data is conflicting ■ You need a screen so the user can choose the correct data How to Create a Conflict Screen on Your Mobile App
  • 38. | Mobile Synchronization Patterns for Large Volumes of Data ● Solution: ■ Create a Static Table with the Entities name that we want to make conflict detection and resolution ■ Then use that static entity and create one local entity that will keep the table name and a flag if exist conflict ■ When we try to sync or update the local record into the server we need to check if a conflict exists ■ If a conflict exists create an entry on the table of conflicts and add a record to the list How to Create a Conflict Screen on Your Mobile App
  • 39. | Mobile Synchronization Patterns for Large Volumes of Data 1. Creating the list of Conflicts
  • 40. | Mobile Synchronization Patterns for Large Volumes of Data ● Conflict Resolution: ■ After click on the list the Conflict Element’s will appear ■ Local & Server record are serialize & deserialize into a JSON ■ Screen less heavy and with better performance ■ Can be optimized to choose attribute by attribute instead of record 2. Conflict Screen on Mobile App to Compare Data
  • 41. | Mobile Synchronization Patterns for Large Volumes of Data
  • 42. || Mobile Synchronization Patterns for Large Volumes of Data Q & A
  • 43. | Thank You! @ injoao.pereira@doilean.com / joão-pedro-martins- pereira-8a115b120

Editor's Notes

  1. My name is João Pereira Last year I was in your place So im so glad to be making this presentation
  2. The Mobile Challenge Let’s Recap OutSystems Best Practices When We Can’t Follow Best Practices . . . Solving the Challenge! Patterns in Action
  3. Mobile Devices are more powerful than ever Mobile apps are faster and more intuitive than ever Users expect your app to perform like all other apps they use How can we do it with OutSystems
  4. Design the local storage data model using only the attributes that you need, instead of all attributes of the corresponding server entity. Consider denormalizing the local data model to avoid complex queries like having multiple JOINS. Identify the best data synchronization patterns for your use case and define exactly when to run them.
  5. To explain better the OutSystems Best Practice I created a small DB and a concept of an App that got the objective of having a platform where clients find car dealers which have cars in stock; The car dealers can add cars to his stock The clients can search by car dealer or model they want to buy Process of denormalization Simplify the connection between tables and minimize the amount of information
  6. We can control the data fetched from the server using; Sync Unit –several flows of synchornization Local Sync Properties – Create a local entity to keep track of the last synchronization moment Only get the latest data from the server – Compare the LastSycnOn from that sync unit with the CreatedOn, UpdatedOn and DeletedOn attributes from the server DB to know which records to fetch
  7. This image represents the third best practice using the sync unit to define the moments we want to sync our DB between local and server As you can see we define 3 moments 1. Get New Stock – On the Menu of the application the user clicks on a buttons or slides and refresh the list of car with the more recent 2. Remove sold cars , when a Car dealer changes the status of the car to available to sold 3. When the Owner of car dealers add new Change the image to more general information ;
  8. TriggerOfflineDataSync – explanation Devemos antecipar qual a informação que o utilizador precisa antes da mesma ser utilizada para assim obter uma fluidez dentro da aplicação
  9. As you know each server action called inside cliente actions executes a request to the server so if we call several server actions inside cliente action that will leave to open and close multiple requests in the same action that is going to be less performance that use like the exemple above one server action inside a cliente actions. Is visible that in that server action know it’s no problem use more than one This need to be applied to normal client actions of the app as well to our synchronization actions that will get and sync all the information we need
  10. Evaluate network requirements and use cases - If the application needs to be online or offline To evaluate the data sync moments Adapt behavior according to network strength, including offline Check how long we got to do the sync actions The moments we must sync all the information of the app. ############################################################# Evaluate network requirements use cases Define Local Storage strategy Optimize data sync moments Evaluate network status in runtime Adapt behavior accordingly Let the user know what’s happening
  11. Find the Optimal Value of Records to BULK Create According to the Different Processing Capabilities of Each Device Talk about 2 diferente scenarios – 1 . Corporate Use , 2. Target is the world B – B B – E
  12. After I recap you some of the OutSystems Best Pratices I will show you that they don’t work for every situation and that sometimes we cannot use them
  13. Must have same functionalities in web and mobile; The Data model cannot suffer the changes we want to have a lightweight database on the mobile app; The Mobile App is not going to be built base on the specific use cases but on the Web App We need to adapt the best practices the best we can on this situation When you ever Put the boss with the tie photo
  14. Have JOIN’s that will influence the performance of the application; Must think ways to overcome this limitation in terms of Sync Moments and how to do it; Analyze with are the use-cases the application needs Try to minimize sync of tables that got a high volume of data . Find strategies to sync the information the minimum times possible In the Mobile App Screens minimize the data that have multiple joins . So if we need the data that have multiple joins try to use only that information on the mobile screen
  15. How did you solve it ? In this part of the presentation we are going to show how to overcome the difficulties when we can’t use the best practices and have a huge database to manage in the local storage and need to sync a huge flow of data between Web and Mobile
  16. In the case of not changes frequently; Take care of this tables like lookup; Just need be synchronize all in the first use of the application; When this tables get changes just synchronize the ones that real change and not all Sync only the data that is neded to execute all the functionalities that are really need on the mobile AppCase A - Infrequent Change Treat like static data Synchronize all in the first use of the application Sync only when the data changes Inside of the Mobile App only sync the tables & data that is really needed
  17. Like in the previous case in the first use we need to sync all the tables; When modified the data only sync the modified back to the server; Choose well what information we want to override choosing one of this scenarios (Last Write Wins, Server always Win or Conflict Mechanism Detection) If we don’t have a good network, we must have a mechanism that discard a sync that was not fully completed in order to not have inconsistent data in our application
  18. Create a Sync Unit History Keep track of tables that need sync Last date the data was changed SyncUnit Create a static entity with the tables we need to sync
  19. Patterns in Action – I’m going to present you the real cases scenarios we use some strategies like the sync unit as table selector and how we do the sync of a big volume database
  20. In the case of not changes frequently; Take care of this tables like lookup; Just need be synchronize all in the first use of the application; When this tables get changes just synchronize the ones that real change and not all Sync only the data that is needed to execute all the functionalities that are really need on the mobile App The data doesn’t change a lot
  21. Inside the Core of the tables we want to sync was created: Static table called Sync Unit that contain all the tables we want to sync to the mobile app (SyncUnit.Label = MaterialType) A new table called SyncUnitHistory that will have the static Id from the previous table and the Last Updated Date The records of the SycnUnitHistory are going to be created on the actions of Created or Updated a entity we want to sync to mobile
  22. Also in the Core module was created a action to see what are the sync units that needs to sync data This action receives the Device Date and returns the list of id’s of the tables that needs to be sync Is going to be used on the mobile synchronization action
  23. As we done in the previous step, we create a control sync server table We need to create a LastSync table at will got the SyncUnit Id and the date from and date to of the Last Sync made on the device
  24. Client actions and server actions created to do the sync: Was created a new module in the Mobile App to manage the Local Storage and Sync actions to use in the APP All Local Tables are in this module Going to present the example to one table Material Type that got a dependency that is Material Type with a List of values, that is called Material Type LOV Dependency
  25. This action will get the Material Types that are present on the server In the first time will get all but on the next time is filter by date from, date to and only the active ones Because the application is multilingual, we need to pass the LocaleId we want to get the data As output we got the Server Material Types and the total records just to control how many data was sync at that time
  26. This an action will create our Material Type that is going to be at the Local Storage Used the Last Sync table to get the interval of time we are going to get the data In the end updates the controller for the sync unit Material Type
  27. This action will first check our connection because we need to make sure we got a good connection to sync large volumes of data and we going to use server-side actions The next step is using our Get SyncUnits to update list to check which tables need to be sync After get the list we update the sync controller Last Sync and run the action Sync_LC_Update
  28. This action will receive as input the SyncUnit and only update that respective table Then will run the Sync of Material Type on this case that we talk on the previous slide
  29. When multiple users can change the same data and the mobile app can be used offline How to create the data of conflict ? Where we choose the correct data ?
  30. Create a Static Table with the Entities name that we want to make conflict detection and resolution Then use that static entity and create one local that will keep the table name and a flag if exist conflict When we try to sync the local record into the server we need to check if a conflict exists If a conflict exists create an entry on the table of conflicts and add a record to a list
  31. Situation when we can check the conflict: When we try to save the record if we got internet connection, we can compare with the information that are present in the server at the moment When we try to sync the local data and put them into the server will check if that records was change In any of this cases is created a list with the table name and the number of conflicts that exist at that moment
  32. When we click in element of the previous list will appear a detail screen so the user can choose the server data or local data This data will get the Local record and the Server record and serialize & deserialize then into a JSON That process will make the screen less heavy and with better performance Can be optimized to choose attribute by attribute instead of record ##################################################################################################### I hope you enjoyed this presentation and next time you face this kind of challenge you remember what we talk about today !
  33. I hope you enjoyed this presentation and next time you face this kind of challenge you remember what we talk about today !