Slide 1

Slide 1 text

Open source at Wongnai Codemania IIO

Slide 2

Slide 2 text

Me ● Manatsawin Hanmongkolchai ● Junior Architect at Wongnai ● Follow me on Medium at life.wongnai.com and blog.whs.in.th

Slide 3

Slide 3 text

Today's agenda ● Open source and Wongnai Infrastructure ● Open source @ Wongnai

Slide 4

Slide 4 text

Where is Wongnai ● We operate 126 vCPU (dynamically scaled) on Amazon EC2/RDS for production and development (incl. partner) use ● 20 vCPU on Google Compute Engine for development use ● All are in Singapore region

Slide 5

Slide 5 text

Avoiding cloud lock-in ● Suppose tomorrow Amazon announce that it will raises the price by 40% ● Avoiding cloud lock-in means we could move to Google Cloud (or any other) easily ● Even better if coupled with hybrid cloud solution

Slide 6

Slide 6 text

Avoiding cloud lock-in ● We have a policy not to use cloud services that is not replacable or disabled in our core systems ○ RDS: Replaced by instance on GCE ○ Elasticache: Replaced by instance on GCE ○ X-Ray: Disabled on GCP ○ Kubernetes Engine: Replaced by Kops

Slide 7

Slide 7 text

Avoiding cloud lock-in ● Use open source software alternatives for critical services: ○ ECS -> Kubernetes ○ SQS -> RabbitMQ

Slide 8

Slide 8 text

Avoiding cloud lock-in ● But sometimes it can be very expensive to build your own, so using cloud services is better ○ S3: Replacable, but instance disk space is more expensive ○ Load balancer: Replacable by instances ○ SES: Replacable by mail server, but poor deliverability

Slide 9

Slide 9 text

Avoiding cloud lock-in Pros ● Migrate between cloud providers easily when needed ● Resistant to hostile changes from cloud provider ● More visibility Cons ● Need to manually manage service ● Can be more expensive

Slide 10

Slide 10 text

Today's agenda ● Open source and Wongnai Infrastructure ● Open source @ Wongnai

Slide 11

Slide 11 text

Open source @ Wongnai ● Come visit us at github.com/wongnai

Slide 12

Slide 12 text

What we do ● Our most popular project: kube-slack ● Thumbor-text-filter, key of our new Chatbot experience ● Patches to softwares we use ● We're working on putting our internal tools out there

Slide 13

Slide 13 text

Why open sourcing? ● Why not? It's not your core business anyway ● Free improvements and testing (bug reports)

Slide 14

Slide 14 text

Why open sourcing? When you open source useful code, you attract talent. Every time a talented developer cracks open the code to one of your projects, you win. Tom Preston-Werner GitHub Co-founder

Slide 15

Slide 15 text

"But my code is bad!"

Slide 16

Slide 16 text

Improve your code quality ● When writing any code, always think that it will be open sourced ○ Don't couple it with internal infrastructure/components that you don't intend to open source ○ Produce maintainable code

Slide 17

Slide 17 text

Improve your code quality ● Contributing patches to projects help you improve yourself ○ Learn from maintainer's code review ○ Study unfamiliar, large scale codebase ○ Get to know the inner working of your system

Slide 18

Slide 18 text

Side story: my first PR ● My first PR was to Symfony/Process (PHP library) back in 2014 ● A simple three lines duck typing fix for reading zero

Slide 19

Slide 19 text

Side story: my first PR ● Turned out to be more than three lines...

Slide 20

Slide 20 text

Side story: my first PR ● Testing is not so easy either..

Slide 21

Slide 21 text

Going open source ● Don't workaround library bugs, fix it upstream.

Slide 22

Slide 22 text

Signing CLA Many projects require a CLA to be signed CLA assigns the copyright of your contribution to the host organization.

Slide 23

Slide 23 text

Going open source ● Adopting new tech could lead to potential project ideas

Slide 24

Slide 24 text

Summary ● Open source infrastructure keep vendor lock-in away ● Build your company's resume with open source ● Giving back make a healthy open source community

Slide 25

Slide 25 text

Thank you