Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building enterprise applications using open source

804 views

Published on

Building enterprise geospatial web and mobile applications using open source. Presented at Maps Camp #mapscamp conference 2016.

Published in: Technology
  • Be the first to comment

Building enterprise applications using open source

  1. 1. Building enterprise applications with open source Peter Batty Ubisense @pmbatty
  2. 2. • Brief background on our customers • Our software stack and how we got there • Business models • Simplicity • Field applications, online and offline OVERVIEW
  3. 3. Photo by whalt - http://flic.kr/p/7D7rd Figure 11: Conduits in an Undergr  Underground utility boxes are the structures that provide a conduits, examples of underground utility boxes include m configurations of underground utility boxes can be created seen below and to its right the butterfly diagram managed 19.Customers: utilities and telcos Photo by ☺ Lee J Haywood - http://flic.kr/p/7iX7f5
  4. 4. Sample cable data Detailed asset maps from Smallworld
  5. 5. Sample cable data Detailed asset maps from Smallworld, with live customer status overlaid
  6. 6. Sample cable data Detailed asset maps from Smallworld, with live customer status overlaid
  7. 7. Sample cable data Detailed asset maps from Smallworld, with live customer status overlaid
  8. 8. SAMPLE CUSTOMER • Large communications company with 6 million subscribers across ~20 states • 23 geographic regions created for offline use – from one common master database • Offline databases vary from 136MB to 22GB • Incremental updates applied to all offline databases nightly • 5000 online users, ~400 offline users active so far, growing to 2000 • Weekly features updated ~2.3m total, ~250,000 largest region
  9. 9. Smallworld
  10. 10. flic.kr/p/7rnNAD flic.kr/p/7NEJzF Pervasive and Simple Location is now in consumer applications
  11. 11. Software stack Version 1
  12. 12. Software stack Version 2
  13. 13. Software stack Version 3
  14. 14. Functionality Cost Support Terms PredictabilityFlexibility
  15. 15. BUSINESS MODELS • Sell support, services • e.g. Boundless • Sell hosting • e.g. CartoDB, MapBox • Hybrid closed and open source • Google, Safe, Ubisense
  16. 16. SIMPLICITY
  17. 17. We are building applications for the 95%of people in an organization who are not GIS users
  18. 18. 20 “Deciding what not to do is as important as deciding what to do”
  19. 19. TOPICS • Familiarity • Panning and zooming • Search (including queries) • Minimal layers • Focused applications • Network links • Rather than “trace”
  20. 20. FIELD APPLICATIONS ONLINE AND OFFLINE
  21. 21. DEMO OVERVIEW This presentation features screen shots that step through a demo of Ubisense myWorld for damage assessment.The demo features two separate users: Operations center user, with overview of situation, including data from all field users Damage assessor with laptop in the field, capturing damage assessment data
  22. 22. Operations Center Operations center overview map – currently all is quiet, no damage shown
  23. 23. Damage Assessor in Field Currently online (wireless) WiFi is on Damage assessment user in the field, currently in online mode (with wireless connection)
  24. 24. Damage Assessor in Field Create damage pointDamage assessor creates damage assessment point in the field
  25. 25. Damage Assessor in Field Damage point is created in local database and displayed on map on laptop
  26. 26. Operations Center Syncs to operations center within ~1 minute, damage point displayed and overview map updated
  27. 27. Damage Assessor in Field Offline WiFi is off Back in the field, we are now in offline mode (wireless connection is lost). Google Map has disappeared here.
  28. 28. Damage Assessor in Field Now we are displaying OpenStreetMap as an offline map instead of Google (which can’t be used offline)
  29. 29. Damage Assessor in Field In offline mode, we can continue to display maps, select objects, and search for assets
  30. 30. Damage Assessor in Field We can also continue to create damage points while in offline mode (which are stored locally)
  31. 31. Damage Assessor in Field We have now created two more damage points offline
  32. 32. Operations Center Back in the operations center, we still just see the single damage point at the moment
  33. 33. Damage Assessor in Field Online WiFi is on Now the field laptop has a network connection again and is back online, so the damage data can sync
  34. 34. Operations Center The data has synced and so we now see three damage points back in the operations center.
  35. 35. Operations Center We can report on the damage points and get aggregate information
  36. 36. Field users can also use tablets like iPad or Android, which support taking photos.
  37. 37. Take a photo on the iPad
  38. 38. Operations Center Operations Center also gets immediate visibility of photo (assuming user online) Photos can also be emailed in from any smart phone
  39. 39. OFFLINE REQUIREMENTS • Cross platform • Android, iOS,Windows 7 onwards (and web) • Need ability to sync large datasets (gigabytes) for some situations • In other situations may be able to use smaller datasets (for single job, like walking an electrical circuit)
  40. 40. DATABASE SYNC • Sync of bulk GIS data • Initially read only for short term applications • Typically want to do nightly over non-cellular connection • Time critical data like damage assessment • Want to sync as soon as possible (two way) • Needs to connect / disconnect / sync transparently
  41. 41. APPROACHESTO MOBILE DEVELOPMENT
  42. 42. THREE ARCHITECTURESTRIED PostGIS Mapfish Offline storage SpatiaLite JavaScript Replication Caching
  43. 43. ARCHITECTURE 1
 LAPTOP REPLICA PostGIS Mapfish Windows (or Linux or Mac) only Use identical software stack to main server Need custom replication - haven’t found PostgreSQL replication for sometimes disconnected model Pros: Simplest to implement Cons: Laptop only, heavyweight
  44. 44. REPLICA CONCEPT Master database Local database Potentially multiple gigabytes 
 (raster tiles) Incremental update is important Full or partial (spatial) replica
  45. 45. ARCHITECTURE 2 CORDOVA REPLICA • Have our web application running offline 
 on Android and iOS • Replaced PostGIS with SQLite - for geometry and attributes, and also tiles • Wrote JavaScript wrappers to replace (basic) MapFish services offline • Refactored code so small number of classes contain differences between online and offline - tile and database access
  46. 46. ARCHITECTURE PostGIS MapFish (REST API) SQLite (mbTiles) Tile server myWorld client Leaflet myWorld server (Python) SpatiaLite JavaScript wrappers SQLite (mbTiles) Tile server myWorld client Leaflet myWorld server (JavaScript) ONLINE OFFLINE
  47. 47. CAUTION WITH IOS • Apple terms and conditions regarding approval and software distribution can be a major pain • All code, and all changes, need to be reviewed by Apple - even for testing (this has tightened up recently, since they bought TestFlight) • If you need custom apps for individual customers there is a separate Enterprise Developer Program orVolume Purchase Program, which each have their own complications
  48. 48. “ADVANCED HYBRID” APPROACH Higher level HTML & JavaScript code Includes myWorld core, plus any applications and customizations Sync common code package to each device as needed Use Cordova to create single executable for each platform (Electron on Windows 7) Low level code Handles data storage and access using SQLite, and Web View which is a container for HTML & JavaScript code
  49. 49. ARCHITECTURE 3 HTML5 OFFLINE • Cache smaller amounts of data using
 HTML5 offline capabilities • More dynamic and easier to deploy
 than bulk replication
  50. 50. HTML5 SUMMARY • Tried various approaches including caching individual tiles, caching mbTiles files and reading then with sql.js, caching geoJSON • LargeLocalStorage was a useful library • Worked reasonably well for small data volumes • But a number of issues including limitations on data size, inconsistency across browsers, general flakiness, and inability to manage offline data directly within the application
  51. 51. OFFLINE SUMMARY • It will be great when we have universal wireless coverage! • Today, offline is still harder than you would hope • Large scale robust sync for enterprises is not rocket science, but a lot of detailed work to do well • HTML5 caching has a lot of promise, is workable in some scenarios today, but still not quite fully baked • We have gone with Cordova which gives you much more control over local storage, and most of the benefits of HTML5
  52. 52. OVERALL SUMMARY • We have built a very robust enterprise web and mobile geospatial product based on open source foundations including PostGIS, GeoServer, Leaflet, SpatiaLite and Cordova • We have completed large implementations in several top 10 utility and telecommunications companies, in conservative IT environments • Our experience with all the open source technology we’ve used has been great
  53. 53. ?

×