an overview on the reddot ruby conf 2016, singapore

65
Ruby Conf 2016 An Overview

Upload: nascenia-it

Post on 16-Jan-2017

159 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: An overview on the Reddot Ruby Conf 2016, Singapore

Ruby Conf 2016 An Overview

Page 2: An overview on the Reddot Ruby Conf 2016, Singapore
Page 3: An overview on the Reddot Ruby Conf 2016, Singapore

How busy we were for Ruby Conf?

Page 4: An overview on the Reddot Ruby Conf 2016, Singapore
Page 5: An overview on the Reddot Ruby Conf 2016, Singapore
Page 6: An overview on the Reddot Ruby Conf 2016, Singapore
Page 7: An overview on the Reddot Ruby Conf 2016, Singapore
Page 8: An overview on the Reddot Ruby Conf 2016, Singapore

Where are we lagging behind?

Page 9: An overview on the Reddot Ruby Conf 2016, Singapore
Page 10: An overview on the Reddot Ruby Conf 2016, Singapore

Let’s Start ...

Page 11: An overview on the Reddot Ruby Conf 2016, Singapore

N.B. No question will be entertained

Page 12: An overview on the Reddot Ruby Conf 2016, Singapore

Yukihiro (Matz) MatsumotoCreator of Ruby, Heroku

Page 13: An overview on the Reddot Ruby Conf 2016, Singapore

Ruby Typing

Page 14: An overview on the Reddot Ruby Conf 2016, Singapore

Understanding the philosophy of Matz

Page 15: An overview on the Reddot Ruby Conf 2016, Singapore

Don’t care about small things

Page 16: An overview on the Reddot Ruby Conf 2016, Singapore

Static vs Dynamic

Page 17: An overview on the Reddot Ruby Conf 2016, Singapore

Dynamic typing leads to a design policy

Page 18: An overview on the Reddot Ruby Conf 2016, Singapore

Duck Typing

Page 19: An overview on the Reddot Ruby Conf 2016, Singapore
Page 20: An overview on the Reddot Ruby Conf 2016, Singapore

If it walks like a duck

Page 21: An overview on the Reddot Ruby Conf 2016, Singapore

Quack like a duck

Page 22: An overview on the Reddot Ruby Conf 2016, Singapore

It is a duck

Page 23: An overview on the Reddot Ruby Conf 2016, Singapore
Page 24: An overview on the Reddot Ruby Conf 2016, Singapore

We don’t care about the structure

Page 25: An overview on the Reddot Ruby Conf 2016, Singapore

We just care about how it behaves

Page 26: An overview on the Reddot Ruby Conf 2016, Singapore

Duck typing allow us to ignore the internals

Page 27: An overview on the Reddot Ruby Conf 2016, Singapore

Lower mental cost in development

Page 28: An overview on the Reddot Ruby Conf 2016, Singapore

Duck typing enhances flexibility

Page 29: An overview on the Reddot Ruby Conf 2016, Singapore

But there are some drawbacks of dynamic

typing

Page 30: An overview on the Reddot Ruby Conf 2016, Singapore

Drawbacks of dynamic typing1. Errors only found in run time

2. Bad error messages

3. Without proper coverage, you may miss some kind of type error

4. Less documentation

Page 31: An overview on the Reddot Ruby Conf 2016, Singapore

Matz don’t want to specify types

Page 32: An overview on the Reddot Ruby Conf 2016, Singapore

But we also need better documentation

Page 33: An overview on the Reddot Ruby Conf 2016, Singapore

Contradiction!

Page 34: An overview on the Reddot Ruby Conf 2016, Singapore

We want something similar to static typing, that allows

duck typing

Page 35: An overview on the Reddot Ruby Conf 2016, Singapore

Static Typing with Duck Typing

Page 36: An overview on the Reddot Ruby Conf 2016, Singapore

Static Typing with Duck Typing

GO

Page 37: An overview on the Reddot Ruby Conf 2016, Singapore

Matz is calling it ‘Soft Typing’

Page 38: An overview on the Reddot Ruby Conf 2016, Singapore

Typing mechanism that provides reasonable

feedback to programmers accustomed to dynamically

typed-languages.

Page 39: An overview on the Reddot Ruby Conf 2016, Singapore

We will have it in Ruby 3!

Page 40: An overview on the Reddot Ruby Conf 2016, Singapore

Release date of Ruby 3?

Page 41: An overview on the Reddot Ruby Conf 2016, Singapore
Page 42: An overview on the Reddot Ruby Conf 2016, Singapore

Grzegorz WitekLead Software Engineer, Kaligo

Page 43: An overview on the Reddot Ruby Conf 2016, Singapore

Your API is too slow!

Page 44: An overview on the Reddot Ruby Conf 2016, Singapore

Is lack of speed a bug?

Page 45: An overview on the Reddot Ruby Conf 2016, Singapore
Page 46: An overview on the Reddot Ruby Conf 2016, Singapore

Long way of request

Page 47: An overview on the Reddot Ruby Conf 2016, Singapore

Where are your users?

Page 48: An overview on the Reddot Ruby Conf 2016, Singapore
Page 49: An overview on the Reddot Ruby Conf 2016, Singapore
Page 50: An overview on the Reddot Ruby Conf 2016, Singapore
Page 51: An overview on the Reddot Ruby Conf 2016, Singapore

Dynamic content acceleration

Page 52: An overview on the Reddot Ruby Conf 2016, Singapore

Determine what is slow!

Page 53: An overview on the Reddot Ruby Conf 2016, Singapore

Measure Performance

gem ‘ruby-prof’gem ‘rack-mini-profiler’

Page 54: An overview on the Reddot Ruby Conf 2016, Singapore
Page 55: An overview on the Reddot Ruby Conf 2016, Singapore
Page 56: An overview on the Reddot Ruby Conf 2016, Singapore

Measure always in production mode

Page 57: An overview on the Reddot Ruby Conf 2016, Singapore

Rely on database

Page 58: An overview on the Reddot Ruby Conf 2016, Singapore

Where is your cache?

Page 59: An overview on the Reddot Ruby Conf 2016, Singapore

Redis on separate machine - FastRedis on same machine - Faster

Application memory - Fastest

Page 60: An overview on the Reddot Ruby Conf 2016, Singapore

Upgrade the libraries

Page 61: An overview on the Reddot Ruby Conf 2016, Singapore

Move processing to background

Page 62: An overview on the Reddot Ruby Conf 2016, Singapore

Desperate Measure - Extract part of the

applicationRewrite in GO

Page 63: An overview on the Reddot Ruby Conf 2016, Singapore

Goodies

Page 64: An overview on the Reddot Ruby Conf 2016, Singapore
Page 65: An overview on the Reddot Ruby Conf 2016, Singapore

Thank you all!