Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Conquer the Network - Techorama 2017

Conquer the Network - Techorama 2017

Session delivered at Techorama 2017 in Antwerp. This session is about patterns and components that can be used to make your Xamarin app more resilient against network hiccups, low bandwidth, etc.

Roy Cornelissen

May 23, 2017
Tweet

More Decks by Roy Cornelissen

Other Decks in Programming

Transcript

  1. CHARLES / FIDDLER or any network monitor NETWORK LINK CONDITIONER

    https://developer.apple.com/download/more/?q=Additional%20Tools ANDROID EMULATOR
  2. WHAT IF §… the user Pulls-to-Refresh immediately after the screen

    is opened? §… or Pulls-to-Refresh many times consecutively? §… the same screen requests the same image multiple times? §… the user navigates away from the screen before loading completes? §… a screen does many requests? some requests are more equal than others
  3. WHAT DO YOU DO? deal with errors How often? At

    what interval? What if the server is already busy? Fail fast in case of downstream errors RETRY CIRCUIT BREAKER
  4. DON’T LOSE USER DATA deal with errors this also applies

    to the server! 1. RETRY 2. SAVE DATA LOCALLY 3. RETRY LATER
  5. yay! ü Less coding: Refit ü Speed: § Native network

    stack § Local caching: Akavache ü Work offline: Connectivity Plugin ü Prioritize requests: Fusillade ü Deal with errors: Polly
  6. recommended reading Improving HTTP Performance in Xamarin Applications Jonathan Peppers

    http://jonathanpeppers.com/Blog/improving-http-performance-in-xamarin-applications Disconnected Mobile Device Seminar Frank Krueger https://blog.xamarin.com/the-disconnected-mobile-device-seminar Resilient Network Services with Mobile Xamarin Apps Rob Gibbens http://arteksoftware.com/resilient-network-services-with-xamarin Eight Fallacies of Distributed Computing Gareth Wilson https://blog.fogcreek.com/eight-fallacies-of-distributed-computing-tech-talk