oscon 2014 - the epic battle: scala at paypal

Post on 25-May-2015

461 Views

Category:

Engineering

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

From my presentation at OSCON 2014 http://www.oscon.com/oscon2014/public/schedule/detail/37779 Abstract: There’s only one way to do it here at PayPal – with a framework. Everything you’ll ever need is done if you stay inside the lines. Imagine my reaction when I joined PayPal with Scala and high hopes. We have many reasons to avoid the monolithic framework, so we were going against the grain from day 1. My team came on to “shake things up” and we’ve been doing just that. We brought Scala to PayPal, built small components to defeat “framework-itis” and generally pissed some people off. Now we want to open source the stuff we’re building. I’m going to talk about our challenges so far, and how we overcame them. I’ll have tales (both funny and sad) to tell about my experience so far, and I’ll share plenty of lessons learned along the way.

TRANSCRIPT

The Epic BattleScala @ PayPal

A semi-sarcastic illustrated journey

Sr. MTS, PayPal!github.com/arschles!

@arschles

Aaron Schlesinger

PSA Slide

• I’m good at writing software

• This talk is about things I’ve noticed when I wasn’t writing software

• All opinions are mine only

History

• StackMob acquired by PayPal

• We write Scala servers at scale

• We’ve felt the pain

It Might Suck to Code at PayPal

We’re Getting Better

Good PeopleDon’t (yet) do their best work

If you feel like you aren’t in control of your destiny, you will give up and accept whatever situation you are in.

Learned Helplessness

http://youarenotsosmart.com/2009/11/11/learned-helplessness/

The FrameworkLH @ PayPal

FrameworksDo it all, one line of code!

Unless you can’t. Then you’re f**cked.

Needz Moar Frameworks

We Live with Failure

• Real != Ideal

• Just say no

• Walk away

The Trump Card

ComponentsBuild out

Unix Philosophy

DocumentationExplain your component in 1 sentence

Spring FrameworkIntroduction

!The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level:

Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.

!Features

!Dependency Injection

Aspect-Oriented Programming including Spring's declarative transaction management Spring MVC web application and RESTful web service framework

Foundational support for JDBC, JPA, JMS Much more...

!

http://projects.spring.io/spring-framework/

Spray Framework

spray is an open-source toolkit for building REST/HTTP-based integration layers on top of Scala and Akka. Being asynchronous, actor-based, fast, lightweight, modular and testable it's a great way to connect your Scala applications to the

world. !

PSA SlideSpring is a great framework that’s battle tested by a bunch of huge,

successful companies that make tons of money. It obviously has huge value!

!Also, there are smart people behind it and they deserve tons of

recognition for building a great framework. !

I’m picking on Spring here for illustrative purposes.

Meatspace Frameworks

Communication != Meetings

I Don’t Believe YouUnless it’s Working Code

Communicate With Code

I want people to talk about the code they’ve written

InnerSource

Inner SourceThink outside the firewall!

My Trust Issues

Open Source

Krakenkrakenjs.com

KrakenGlue code

KrakenBYOF

PayPal-Isms• Tightly coupled with Security

• Tightly coupled with Ops

• Tightly coupled with deployment

• Tightly coupled with monitoring

• Tightly coupled with logging

My Team Will Do Better

Open Sourcing Our ScalaStealing ideas from Kraken

BundlingStuff my team knows works, has support, has community

Beyond BundlingGet experience, be opinionated

Being Opinionated• Enforce Style Guidelines

• Use the Type System

• Enforce Compiler Warnings

• Make Failing Builds Critical

• Use the Best Testing Frameworks

• Have Real Time Statistics

• Demand Non-Blocking I/O

• Use Akka Properly (that’s another talk)

• Profile Regularly

Being OpinionatedMy team is being “confident” on purpose.

We’re ready to be wrong.

I WantTo have a voice in the Scala Community

I WantThe community to make my team better

I WantFame and fortune for me and my colleagues

That’s it

github.com/arschles @arschles

arschles.github.io I exist in person too

LogisticsIn case you care

Scala$NAME

top related