Introducing Erlang to OpenX Anthony Molinaro Sunday, September 22, - - PowerPoint PPT Presentation

introducing erlang to openx
SMART_READER_LITE
LIVE PREVIEW

Introducing Erlang to OpenX Anthony Molinaro Sunday, September 22, - - PowerPoint PPT Presentation

Introducing Erlang to OpenX Anthony Molinaro Sunday, September 22, 13 What is OpenX? An Open Source PHP ad server. A global company with a SAAS enterprise ad server featuring an integrated ad exchange. Both Sunday, September 22,


slide-1
SLIDE 1

Introducing Erlang to OpenX

Anthony Molinaro

Sunday, September 22, 13

slide-2
SLIDE 2

What is OpenX?

  • An Open Source PHP ad server.
  • A global company with a SAAS enterprise

ad server featuring an integrated ad exchange.

  • Both

Sunday, September 22, 13

slide-3
SLIDE 3

What is OpenX?

  • An Open Source PHP ad server.
  • A global company with a SAAS enterprise

ad server featuring an integrated ad exchange.

  • Both

Sunday, September 22, 13

slide-4
SLIDE 4

What is OpenX?

  • An Open Source PHP ad server.
  • A global company with a SAAS enterprise

ad server featuring an integrated ad exchange written largely in Erlang.

  • Both

Sunday, September 22, 13

slide-5
SLIDE 5

1998-2007

Sunday, September 22, 13

slide-6
SLIDE 6

2008

Sunday, September 22, 13

slide-7
SLIDE 7

2009

Sunday, September 22, 13

slide-8
SLIDE 8

2010

Sunday, September 22, 13

slide-9
SLIDE 9

2011

Sunday, September 22, 13

slide-10
SLIDE 10

2012

Sunday, September 22, 13

slide-11
SLIDE 11

Early 2013

Sunday, September 22, 13

slide-12
SLIDE 12

What languages are currently used?

  • 14-15 services in Erlang
  • 7-8 services in Java
  • 2 services in HTML/Javascript
  • 2 services in Python
  • 2 services in PHP

Sunday, September 22, 13

slide-13
SLIDE 13

How did a PHP shop end up with so much Erlang?

  • Architecture
  • Tools
  • Evangelism

Sunday, September 22, 13

slide-14
SLIDE 14

How did a PHP shop end up with so much Erlang?

  • Architecture
  • Tools
  • Evangelism

Sunday, September 22, 13

slide-15
SLIDE 15

Architecture

  • Cloud based
  • Generic hardware
  • Automated bootstrap and deployment
  • Package oriented development
  • Fault tolerant

Sunday, September 22, 13

slide-16
SLIDE 16

Architecture

  • Service based
  • Loosely coupled
  • Single purpose components
  • Pools of components
  • Polyglot

Sunday, September 22, 13

slide-17
SLIDE 17

How did a PHP shop end up with so much Erlang?

  • Architecture
  • Tools
  • Evangelism

Sunday, September 22, 13

slide-18
SLIDE 18

Cross Language Communication

  • thrift
  • RPC between most components
  • protobuf
  • RTB and Riak
  • lwes
  • Logging and monitoring

Sunday, September 22, 13

slide-19
SLIDE 19

Cross Language Build/ Packaging

  • framewerk
  • Provides templates for code layout
  • Pluggable build system, but currently

most templates based on autotools

  • Targets for compiling, testing and

packaging

  • Common commands across languages
  • Enforces versioning and reproducibility

Sunday, September 22, 13

slide-20
SLIDE 20

How did a PHP shop end up with so much Erlang?

  • Architecture
  • Tools
  • Evangelism

Sunday, September 22, 13

slide-21
SLIDE 21

Evangelism

  • If possible ‘fix’ the game via architecture

and tooling choices

  • Find a project that showcases the

technology

  • Make sure the project succeeds
  • Make sure to share work
  • Make it easy for others - tools!

Sunday, September 22, 13

slide-22
SLIDE 22

Making Erlang Easy

  • Developing and Packaging (framewerk)
  • fw-template-erlang
  • erlrc integration
  • fw-template-erlang-rebar
  • turn thirdparty erlang projects into

packages a single command line

  • best for NIFs and ports

Sunday, September 22, 13

slide-23
SLIDE 23

Making Erlang Easy

  • Running
  • erlrc - integrates with packaging system

to create boot scripts and hot code load

  • n package installation/removal
  • erlstart - start/stop and connect to an

erlang node

  • erlnode - integrate with Red Hat services

Sunday, September 22, 13

slide-24
SLIDE 24

Challenges

  • Hiring is almost impossible.
  • Operations have unfamiliar systems to

manage

  • Developers have new concepts and

patterns.

  • You are often breaking new ground.

Sunday, September 22, 13

slide-25
SLIDE 25

How did Erlang help OpenX developers?

  • Fits the service model really well.
  • “Let it crash” philosophy and supervision

trees meant crashes were rarely fatal.

  • The

VM scales really well across multiple cores.

  • Functional aspects lead to easy to test and

easier to read code and often faster to develop

Sunday, September 22, 13

slide-26
SLIDE 26

How did Erlang help OpenX?

  • 250+ Billion monthly ad transactions
  • 12+ Billion daily bids
  • Thousands of machines in 5 colos
  • ~300 employees
  • $150M+ revenue in 2012

Sunday, September 22, 13

slide-27
SLIDE 27

Questions?

  • anthony.molinaro@openx.com
  • https://github.com/djnym

Sunday, September 22, 13