Python @ Eagle Eye – How we use python at Eagle Eye Networks. – Eagle Eye Networks



Python @ Eagle Eye – How we use python at Eagle Eye Networks. – Eagle Eye Networks

0 0


python_meetup_2

Slide for 8/2014 Austin Python Meetup

On Github mcotton / python_meetup_2

Python @ Eagle Eye

How we use python at Eagle Eye Networks.

Created by Mark Cotton / @mcotton

Who am I?

I am Mark Cotton. I am a big nerd. I do programmer-y stuff. Eagle Eye Networks gives me money to programmer-y stuff. [we're hiring]

Eagle Eye Networks

Video Security in the Cloud

  • we have lots of dealers and customers
  • with Thousands of cameras
  • connected to Hundreds of bridge
  • uploading TeraBytes of video each day

Let's go back to 2012

Starting with Django

It almost writes itself

$ django-admin.py startproject mysite

The Path Less Traveled

  • Developing API first
  • Real-time data stream
  • Tweaked ORM to use LDAP
  • HTTP requests between machines

Developing API First

  • Only expose a RESTful API
  • No rendering views on the servers
  • Everyone uses the same API [web, iOS, Android]

Real-time data stream

Write smaller python clients to subscribe to poll stream for cameras. Handle as much as possible as asynchonous requests.

apidocs.eagleeyenetworks.com

Tweaked ORM to use LDAP

LDAP is document based, not relational, easily replicated and very fast on reads. Add your own indexes and relationships.

HTTP Request between machines

GRequests allows you to use Requests with Gevent to make asyncronous HTTP Requests easily. Same API we're already familiar with.

https://crate.io/packages/grequests/

Videos are Funny

THE END

Mark Cotton / @mcotton