Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

How to deliver rich, real-time apps - AppsWorld 2014

586 vues

Publié le

Presentation from AppsWorld 2014 on delivering rich user experiences through reactive mobile applications

Publié dans : Logiciels
  • Soyez le premier à commenter

How to deliver rich, real-time apps - AppsWorld 2014

  1. 1. Dr Andy Piper Push Technology {DELIVERING RICH, REAL-TIME APPLICATIONS} Reappt, a Push Technology product offers enterprise grade Diffusion technology as a service.
  2. 2. Copyright Push Technology 2014 #RealTimeMobile @andyp1perDelivering Rich, Real-Time Mobile User Experiences • Dr Andy Piper • CTO at Push Technology • Ex-BEA/Oracle • Architect for WebLogic Server Core • Architect and then Engineering Director for Oracle Event Processing • Spring contributor (Spring DM) and Author • Contributed to many standards – OMG, JCP, OSGi Alliance • PhD, Cambridge, Distributed Systems • MBA, Warwick Business School
  3. 3. Copyright Push Technology 2014 #RealTimeMobile @andyp1per{What we do} Software that enables rich real-time user experiences, where the Right Content is delivered to the Right User, at the Right Time, on any device, platform or application, regardless of connectivity or location.
  4. 4. Copyright Push Technology 2014 #RealTimeMobile @andyp1perIntroduction My nightmare – the app that sometimes works Why is it frustrating?
  5. 5. Copyright Push Technology 2014 #RealTimeMobile @andyp1perThe problem with mobile 10Gbps pipe, reliable 99.9999% 2-50Mbps pipe Unreliable speed 0.5-4Mbps pipe Unreliable speed latency Internet Mobile Network Dedicated Network
  6. 6. Copyright Push Technology 2014 #RealTimeMobile @andyp1perIf only all applications worked like this…
  7. 7. Copyright Push Technology 2014 {Demo} http://demo2.pushtechnology.com/demos/dra w/
  8. 8. Copyright Push Technology 2014 #RealTimeMobile @andyp1perWhy does it work? We want UIs that engage us • Immediacy is key • Interactivity is key • Response is based on rapid, high fidelity inbound and outbound data flows We want Reactive applications!
  9. 9. Copyright Push Technology 2014 #RealTimeMobile @andyp1perThe Righteous Reactive Triangle™ UIX
  10. 10. Copyright Push Technology 2014 #RealTimeMobile @andyp1perIt’s all about the Network Interactive applications interact with something Its not all angry birds The quality of the interaction depends on connectivity and latency • That data gets through • The time it takes • The time to process • That it returns • The time to return
  11. 11. Copyright Push Technology 2014 #RealTimeMobile @andyp1perIt’s all about the Data The network is a precious, uncontrolled resource What you can control is how much you use How much you use depends on • How much data you transmit • How frequently you transmit it You may be able to cheat! • Only deal with what you can see Data often has a time dimension • The data value decay curve Its not just about what you can see • But WHEN you can see it Value Time
  12. 12. Copyright Push Technology 2014 #RealTimeMobile @andyp1perIt’s all about the User Experience Go Reactive! • http://www.reactivemanifesto.org/ • Event-driven, scalable, resilient, responsive • Latency over mobile networks (and the internet) is inevitable • Asynchronous models hide latency • Asynchronous models are better overall • Although harder to implement
  13. 13. Copyright Push Technology 2014 #RealTimeMobile @andyp1perIntroducing Velocity Voting – “Vloting™” Stream of control data from device Stream of feedback data from server Server calculates “velocity” of votes and aggregates results Aggregate results are pushed back to devices
  14. 14. Copyright Push Technology 2014 {Demo} http://demo2.pushtechnology.com/vloting
  15. 15. Copyright Push Technology 2014 #RealTimeMobile @andyp1perKey Features of the Vloting App Built reactively on an asynchronous, event-driven model Latency is obscured by asynchronicity • Consider a plane Highly interactive both individually and in aggregate Real-time data flowing in both directions Asynchronous is key
  16. 16. Copyright Push Technology 2014 #RealTimeMobile @andyp1perHow Do we Optimize the Experience?
  17. 17. Copyright Push Technology 2014 #RealTimeMobile @andyp1perOptimize the network?
  18. 18. Copyright Push Technology 2014 #RealTimeMobile @andyp1perMobile throughput Technology Download rate (bit/s) Upload rate (bit/s) Download rate (byte/s) Upload rate (byte/s) GSM CSD (2G) 14.4 kbit/s[18] 14.4 kbit/s 1.8 kB/s 1.8 kB/s HSCSD 57.6 kbit/s 14.4 kbit/s 5.4 kB/s 1.8 kB/s GPRS (2.5G) 57.6 kbit/s 28.8 kbit/s 7.2 kB/s 3.6 kB/s WiDEN 100 kbit/s 100 kbit/s 12.5 kB/s 12.5 kB/s CDMA2000 1×RTT 153 kbit/s 153 kbit/s 18 kB/s 18 kB/s EDGE (2.75G) (type 1 MS) 236.8 kbit/s 236.8 kbit/s 29.6 kB/s 29.6 kB/s UMTS 3G 384 kbit/s 384 kbit/s 48 kB/s 48 kB/s EDGE (type 2 MS) 473.6 kbit/s 473.6 kbit/s 59.2 kB/s 59.2 kB/s EDGE Evolution (type 1 MS) 1,184 kbit/s 474 kbit/s 148 kB/s 59 kB/s EDGE Evolution (type 2 MS) 1,894 kbit/s 947 kbit/s 237 kB/s 118 kB/s 1×EV-DO rev. 0 2,457 kbit/s 153 kbit/s 307.2 kB/s 19 kB/s 1×EV-DO rev. A 3.1 Mbit/s 1.8 Mbit/s 397 kB/s 230 kB/s 1×EV-DO rev. B 14.7 Mbit/s 5.4 Mbit/s 1,837 kB/s 675 kB/s HSPA (3.5G) 13.98 Mbit/s 5.760 Mbit/s 1,706 kB/s 720 kB/s 4×EV-DO Enhancements (2×2 MIMO) 34.4 Mbit/s 12.4 Mbit/s 4.3 MB/s 1.55 MB/s HSPA+ (2×2 MIMO) 42 Mbit/s 11.5 Mbit/s 5.25 MB/s 1.437 MB/s 15×EV-DO rev. B 73.5 Mbit/s 27 Mbit/s 9.2 MB/s 3.375 MB/s UMB (2×2 MIMO) 140 Mbit/s 34 Mbit/s 17.5 MB/s 4.250 MB/s LTE (2×2 MIMO) 173 Mbit/s 58 Mbit/s 21.625 MB/s 7.25 MB/s UMB (4×4 MIMO) 280 Mbit/s 68 Mbit/s 35 MB/s 8.5 MB/s EV-DO rev. C 280 Mbit/s 75 Mbit/s 35 MB/s 9 MB/s LTE (4×4 MIMO) 326 Mbit/s 86 Mbit/s 40.750 MB/s 10.750 MB/s
  19. 19. Copyright Push Technology 2014 #RealTimeMobile @andyp1perMobile latency LTE latency in ms vs latencies experienced on other connection types (smaller is better) 151 629 212 172 98
  20. 20. Copyright Push Technology 2014 #RealTimeMobile @andyp1perOptimize the network? You can’t! Bandwidth is always limited and costly Latency is often poor
  21. 21. Copyright Push Technology 2014 #RealTimeMobile @andyp1perOptimize the data? Small is beautiful Prefer compact binary protocols • HTTP not great (~300+ bytes/message), XML awful • STOMP – ~100+ bytes/message • COAP – ~4+ bytes/message • MQTT – ~10+ bytes/message Binary protocols also happen to be faster – scale better • Serialization is the killer – both for performance and the battery • Protobuf, SBE, dpt Chatty protocols also poor - setup costs can be high Burst data in large chunks - reduces TCP/IP header cost
  22. 22. Copyright Push Technology 2014 #RealTimeMobile @andyp1perMaking data smaller Information dense • Don’t send the same information more than once • Only send differences – snapshot-delta Send less • Just because you have data doesn’t mean you should send it • Just because you have bandwidth doesn’t mean you should use it • Throttle based on ability to consume • Both device and human • Throttling reduces data costs • Throttling conserves bandwidth • Being reactive means only sending data when you need to • Much more efficient
  23. 23. Copyright Push Technology 2014 #RealTimeMobile @andyp1perWhat happens when the network lets you down? It WILL let you down • Insufficient bandwidth • Inconsistent bandwidth • High latency • Loss of network on a regular basis You can’t optimize but you can respond Go Reactive! • You must respond to the conditions of the network • “Mobile sympathy™”
  24. 24. Copyright Push Technology 2014 #RealTimeMobile @andyp1perResponding to the network You must get feedback – but how? Instrumentation is key • What, when, how much? Use any and every means to understand the network conditions TCP is your friend! • Reliable in the face of congestion and packet loss • Fast connection loss detection • Back pressure is informative
  25. 25. Copyright Push Technology 2014 #RealTimeMobile @andyp1perOptimize the User Experience?
  26. 26. Copyright Push Technology 2014 #RealTimeMobile @andyp1perRich to richer User Experiences Real-time allows user experiences that would not otherwise be possible Truly rich experiences are contextual Contextual data often originates from the device itself • Location • Movement • etc. Contextual information often requires access to the native capabilities of the device • Hard to access from JavaScript • Apache Cordova is a framework that gives JavaScript access to native capabilities • Develop html/css/js apps for mobile platforms • https://cordova.apache.org
  27. 27. Copyright Push Technology 2014 #RealTimeMobile @andyp1perPutting it all together
  28. 28. Copyright Push Technology 2014 {Demo} http://demo2.pushtechnology.com/flights/
  29. 29. Copyright Push Technology 2014 #RealTimeMobile @andyp1perConclusion Rich, real-time experiences can be provided on mobile platforms through • Data optimization • Network optimization • Reactive interfaces • Contextualization Good experiences are dictated as much by what you don’t do as what you do do Products and frameworks can take the pain out of development • Cordova • Diffusion
  30. 30. Copyright Push Technology 2014 @andyp1per {Q&A}

×