Slide 1

Slide 1 text

Heroku 2015: A Year in Review

Slide 2

Slide 2 text

Terence Lee @hone02

Slide 3

Slide 3 text

Agenda ● Heroku ● Postgres featuring @leinweber ● Ruby ● Ruby Core featuring @_ko1

Slide 4

Slide 4 text

Heroku

Slide 5

Slide 5 text

Button

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

README.md [![Deploy](https://www.herokucdn.com/deploy/button.png)] (https://heroku.com/deploy)

Slide 8

Slide 8 text

app.json { "name": "ruby-websockets-chat-demo", "description": "A template for getting started with the WebSockets on Heroku using Ruby.", "website": "...", "success_url": "/", "addons": ["rediscloud"], "env": {}, "scripts": {} }

Slide 9

Slide 9 text

Github Integration

Slide 10

Slide 10 text

Elements

Slide 11

Slide 11 text

PX Dynos in Europe ● 6GB ● not multitenant

Slide 12

Slide 12 text

Cedar-14 Stack based off of Ubuntu 14.04 LTS

Slide 13

Slide 13 text

Cedar-14 Stack Migration $ heroku stack:set cedar-14 -a example-app … $ git commit -m "update to cedar-14" --allow-empty … $ git push heroku master …

Slide 14

Slide 14 text

Cedar will be retired on Nov 4, 2015

Slide 15

Slide 15 text

2 Factor Auth

Slide 16

Slide 16 text

http git

Slide 17

Slide 17 text

WebSockets enabled by default

Slide 18

Slide 18 text

Dashboard

Slide 19

Slide 19 text

Heroku Postgres

Slide 20

Slide 20 text

PostgreSQL 9.4 $ heroku addons:add heroku-postgresql --version=9.4

Slide 21

Slide 21 text

JSON Support postgres=# CREATE TABLE rubies (id serial, data json); CREATE TABLE postgres=# INSERT INTO rubies (data) VALUES postgres-# ('{"engine":"ruby","version":"2.2.2"}'); INSERT 0 1 postgres=# SELECT * FROM rubies; id | data ----+------------------------------------------------------------------------- 1 | {"engine":"ruby","version":"2.2.2"} (1 row)

Slide 22

Slide 22 text

JSONB Support postgres=# CREATE TABLE rubies (id serial, data jsonb); CREATE TABLE postgres=# INSERT INTO rubies (data) VALUES postgres-# ('{"engine":"ruby","version":"2.2.2"}'); INSERT 0 1 postgres=# SELECT * FROM rubies id | data ----+------------------------------------------------------------------------- 1 | {"engine":"ruby","version":"2.2.2"} (1 row)

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

create_table :rubies do |t| t.jsonb :data end

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

PG Backups heroku pgbackups -> heroku pg:backups

Slide 27

Slide 27 text

PGBackups $ heroku pg:backups schedule \ HEROKU_POSTGRESQL_GOLD --at="02:00 PDT"

Slide 28

Slide 28 text

pg:diagnose

Slide 29

Slide 29 text

Expensive Queries

Slide 30

Slide 30 text

$ heroku addons:create \ heroku- postgresql:standard-4 \ --fork CHARCOAL --fast

Slide 31

Slide 31 text

Ruby Updates

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Ruby 1.9.3 support has also ended

Slide 35

Slide 35 text

Ruby 2.2 support on Day 0. Christmas 2014

Slide 36

Slide 36 text

Built 55 Rubies across two stacks

Slide 37

Slide 37 text

Puma is now recommended

Slide 38

Slide 38 text

JRuby ● JDK8 Support ● JRuby 9k pre

Slide 39

Slide 39 text

Ruby Core

Slide 40

Slide 40 text

Heroku Matz team Mission of Heroku Matz team Design new Ruby and improve quality of MRI Three full time Ruby core developers in Japan named “Matz team”

Slide 41

Slide 41 text

Yukihiro Matz Matsumoto Original creator of Ruby “I’m father of Ruby” • Direct new Ruby • mruby • Streem

Slide 42

Slide 42 text

Nobuyoshi Nobu Nakada Patch monster “Fix Ruby, break Ruby, and fix Ruby”

Slide 43

Slide 43 text

Nobuyoshi Nobu Nakada Patch monster

Slide 44

Slide 44 text

Koichi Sasada (ko1) Low-level maintainer “Speed is all” •Original YARV developer since 2004/01 •YARV: Yet Another RubyVM •Introduced into Ruby (MRI) 1.9.0 and later •Introduce “Generational” and “Incremental” GC

Slide 45

Slide 45 text

Ruby 2.2 Heroku Matz team and Ruby core team Recent achievement

Slide 46

Slide 46 text

Ruby 2.2 •Some new features (see NEWS) •Internal improvements •Symbol GC •Incremental GC •Using frozen string objects •Fast keyword parameters Rails users love!

Slide 47

Slide 47 text

Ruby 2.2 Fast keyword parameters “Keyword parameters” introduced in Ruby 2.0 is useful, but slow!! x30 slower

Slide 48

Slide 48 text

Ruby 2.2 Fast keyword parameters x14 faster!! But still x2 times slower compare with normal dispatch

Slide 49

Slide 49 text

Ruby 2.3 Next version will be released the end of this year Catch me and give me your feedback later http://www.flickr.com/photos/adafruit/8483990604

Slide 50

Slide 50 text

Schedule Today (Wednesday) 4:10-5:30: Open Source Help Desk from the core teams of Rails, RSpec, memory_profiler Tomorrow (Thursday) 3:20-4:20: Book Signing with Schneems (while supplies last)

Slide 51

Slide 51 text

Resources ● https://blog.heroku.com/archives/2014/8/7/heroku-button ● https://blog.heroku.com/archives/2014/12/4/general-availability-of- performance-dynos-in-europe ● https://blog.heroku. com/archives/2014/11/4/cedar_14_now_generally_available ● https://blog.heroku.com/archives/2014/9/25/two-factor-authentication-ga ● https://blog.heroku. com/archives/2014/12/5/http_git_now_generally_available ● https://blog.heroku.com/archives/2014/7/7/websockets_now_ga ● https://blog.heroku.com/archives/2014/8/5/new-dashboard-and-metrics- beta

Slide 52

Slide 52 text

Resources ● https://blog.heroku.com/archives/2015/1/8/postgres-9-4-on-heroku ● https://blog.heroku.com/archives/2015/1/13/new-dataclips ● https://blog.heroku.com/archives/2015/3/11/pgbackups-levels-up ● https://blog.heroku.com/archives/2014/8/12/pg-diagnose ● https://devcenter.heroku.com/articles/deploying-rails-applications-with-the- puma-web-server

Slide 53

Slide 53 text

Thank You