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

Real-time Tracking and Mapping of Geographic Objects by Ragi Burhum

Real-time Tracking and Mapping of Geographic Objects by Ragi Burhum

PyCon 2013

March 17, 2013
Tweet

More Decks by PyCon 2013

Other Decks in Technology

Transcript

  1. Real-time Tracking and Mapping
    of Geographic Objects
    Ragi Burhum
    @rburhum
    [email protected]

    View Slide

  2. AmigoCloud
    We Synchronize Map Data
    -
    offline/online
    -
    edit

    View Slide

  3. If you have tried this
    before, this may
    seem familiar…

    View Slide

  4. Licensing Issues
    -
    Password-protected Site
    -
    Asset Tracking or similar
    -
    Map Data Provider’s (Navteq, TomTom/TeleAtlas,
    etc) Business Model

    View Slide

  5. View Slide

  6. Most People See This

    View Slide

  7. View Slide

  8. View Slide

  9. Examples of Free/Open Datasets
    Out There

    View Slide

  10. OpenStreetMap

    View Slide

  11. NAIP

    View Slide

  12. SRTM

    View Slide

  13. Natural Earth Data

    View Slide

  14. Map Renderers
    (Mapnik, MapServer, GeoServer)
    +
    Style
    File

    View Slide

  15. View Slide

  16. Client-side Map JS Library

    View Slide

  17. “Normal” GeoStack
    Nginx
    Gunicorn (Django)
    TileStache
    Memcached
    Mapnik
    PostgreSQL/PostGIS
    Data Storage
    Web / Mobile
    Client (OpenLayers)
    Varnish (80)

    View Slide

  18. https://gist.github.com/RBURHUM/4559323

    View Slide

  19. http://tilestache.org/doc/

    View Slide

  20. View Slide

  21. A good real-time
    tracking solution
    requires a stateful
    connection

    View Slide

  22. Polling is BAD

    View Slide

  23. Server-Side Events
    Instead of having [N] clients polling every [X] time
    interval, how about the server notifying you

    View Slide

  24. View Slide

  25. Publisher/Subscriber Queue
    One of the queues
    (RabbitMQ, Redis, etc)
    M3 M2 M1
    M4
    Publisher
    Subscriber
    Subscriber
    Subscriber

    View Slide

  26. Celery is awesome!
    from tasks import myCustomTask
    myCustomTask.do_work(my_data)
    myCustomTask.do_work.delay(my_data)

    View Slide

  27. “Normal” GeoStack
    Nginx
    Gunicorn (Django)
    TileStache
    Memcached
    Mapnik
    PostgreSQL/PostGIS
    Data Storage
    Web / Mobile
    Client (OpenLayers)
    Varnish (80)

    View Slide

  28. “Real-time” GeoStack
    Nginx
    Gunicorn (Django)
    TileStache
    Memcached
    Mapnik
    PostgreSQL/PostGIS
    Data Storage
    Web / Mobile
    Client (OpenLayers,
    Socket IO)
    Varnish (80)
    Celery with RabbitMQ
    Node.js with Socket IO

    View Slide

  29. Demo
    http://abuse.amigocloud.com

    View Slide

  30. View Slide

  31. Ragi Burhum
    @rburhum
    [email protected]
    m
    If you are in the Bay Area and like Geo:
    http://www.meetup.com/geomeetup

    View Slide