rt4 - the whole sordid story

265
[email protected] http://bestpractical.com RT 4 (Request Tracker 4.0)

Upload: jesse-vincent

Post on 17-May-2015

4.398 views

Category:

Technology


3 download

DESCRIPTION

Building RT 4 took a lot more work than we'd expected. In the end, we learned some useful lessons and ended up with a great product.

TRANSCRIPT

Page 1: RT4 - The whole sordid story

[email protected]://bestpractical.com

RT 4(Request Tracker 4.0)

Page 2: RT4 - The whole sordid story

Hi, I'm Jesse Vincent

From Boston, MA in the US

Perl Hacker

Current Perl 5 “pumpking”

Android Hacker (K-9 Mail)

Kindle Hacker (Savory)

Former Perl 6 project manager

Page 3: RT4 - The whole sordid story

Finding me

@obra

[email protected]

facebook.com/jesse.vincent

Page 4: RT4 - The whole sordid story

Hi I'm Jesse

Original Author of RT

Partner at Best Practical

RT project lead

Page 5: RT4 - The whole sordid story

(That just I don't get to code much anymore)

Page 6: RT4 - The whole sordid story

Best Practical

We make RT

We sell support

We sell training

We sell consulting

We sell custom development

Page 7: RT4 - The whole sordid story

Our offices

Boston, MA

Moscow, Russia

Hangzhou, China

Pinglin, Taiwan

Page 8: RT4 - The whole sordid story

(We're 11 people)

Page 9: RT4 - The whole sordid story

RT: Request Tracker

General purpose ticketing system

Page 10: RT4 - The whole sordid story

GNU GPLv2

Page 11: RT4 - The whole sordid story

Continuousdevelopmentsince 1996

Page 12: RT4 - The whole sordid story

O(100) downloadsevery day

Page 13: RT4 - The whole sordid story

What is a ticketing system?

Page 14: RT4 - The whole sordid story

It keeps track of whatneeds to get done

Page 15: RT4 - The whole sordid story
Page 16: RT4 - The whole sordid story

It keeps track of whatgot done

Page 17: RT4 - The whole sordid story
Page 18: RT4 - The whole sordid story

...along with lots of metadata

Page 19: RT4 - The whole sordid story
Page 20: RT4 - The whole sordid story

...and business logic

Page 21: RT4 - The whole sordid story

...and access control

Page 22: RT4 - The whole sordid story

...It's just a TODO list

Page 23: RT4 - The whole sordid story

On some very serious drugs

Page 24: RT4 - The whole sordid story
Page 25: RT4 - The whole sordid story

not

Page 26: RT4 - The whole sordid story
Page 27: RT4 - The whole sordid story

Important properties ofticketing systems

● Everything has a unique ID● Everything has a timestamp● History can't be edited or erased

Page 28: RT4 - The whole sordid story

What do you use a ticketing system for?

Network operations

Bug tracking

Call center

Helpdesk

Customer service

Work orders

Accounts Payable

Accounts Receivable

Vacation rentals

Youth counselling

Workflow

Page 29: RT4 - The whole sordid story

What we use RT for

Page 30: RT4 - The whole sordid story

Bug Tracking

Page 31: RT4 - The whole sordid story

Bronze/Silver/Gold support

Page 32: RT4 - The whole sordid story

Customer Development

Page 33: RT4 - The whole sordid story

Resumes

Page 34: RT4 - The whole sordid story

Inbound Sales Inquiries

Page 35: RT4 - The whole sordid story

Sales Leads

Page 36: RT4 - The whole sordid story

Accounts Payable

Page 37: RT4 - The whole sordid story

Accounts Receivable

Page 38: RT4 - The whole sordid story

Who uses RT?

Page 39: RT4 - The whole sordid story
Page 40: RT4 - The whole sordid story

Who else uses RT?

http://requesttracker.wikia.com/wiki/RTUsers

Page 41: RT4 - The whole sordid story

RT Scales

Page 42: RT4 - The whole sordid story

It scales down

Page 43: RT4 - The whole sordid story

(for testing or development)

Page 44: RT4 - The whole sordid story

Run RT on your laptop

Page 45: RT4 - The whole sordid story

SQLite

Page 46: RT4 - The whole sordid story

Standalone web server

Page 47: RT4 - The whole sordid story

It scales up

Page 48: RT4 - The whole sordid story

Largest RT I know about

Page 49: RT4 - The whole sordid story

40,000-70,000 tickets

Page 50: RT4 - The whole sordid story

...every day

Page 51: RT4 - The whole sordid story

(Nearly 1 ticket/second)

Page 52: RT4 - The whole sordid story

Multiple front-end app servers

Page 53: RT4 - The whole sordid story

Big database server with hot standby

Page 54: RT4 - The whole sordid story

Designed to be hookableand pluggable

Page 55: RT4 - The whole sordid story

Plugins

Page 56: RT4 - The whole sordid story

● rt-action-linearescalate

● rt-action-notifygroup

● rt-ajaxyreplypage

● rt-authen-bitcard

● rt-authen-openid2

● rt-bugtracker

● rt-bugtracker-public

● rt-condition-complex

● rt-crypt-smime

● rt-extension-activityreports

● rt-extension-activityreports-billing

● rt-extension-addadminccsonqueuechange

● rt-extension-attributewalker

● rt-extension-captcha

● rt-extension-cloneticket-withdata

● rt-extension-commandbyemail

● rt-extension-commandbymail

● rt-extension-commentoncreate

● rt-extension-customfield-hideemptyvalues

● rt-extension-datediscordian

● rt-extension-extractcustomfieldvalues

● rt-extension-formtools

● rt-extension-jsgantt

● rt-extension-ldapimport

● rt-extension-log-memoryusage

● rt-extension-menubarsearches

● rt-extension-mergeusers

● rt-extension-mergeusershistory

● rt-extension-nagios

● rt-extension-notificationmatrix

● rt-extension-priorityasstring

● rt-extension-quickcalls

● rt-extension-quickdelete

● rt-extension-quickupdate

● rt-extension-reportspam

● rt-extension-rt_cpan_org

● rt-extension-spawnlinkedticketinqueue

● rt-extension-utils

● rtfm

● rtfm-extension-articletemplate

● rtir

● rtx-calendar

● rtx-emailcompletion

● rtx-ticketlist-transactions

● rtx-workflowbuilder

Page 57: RT4 - The whole sordid story

(and a bunch more created by RT users)

Page 58: RT4 - The whole sordid story

RT 4.0

Page 59: RT4 - The whole sordid story

Now available?

Page 60: RT4 - The whole sordid story

Not quite

Page 61: RT4 - The whole sordid story

Christmas 2010:

4.0.0RC1

Page 62: RT4 - The whole sordid story

March 24, 2011:

4.0.0 RC7

Page 63: RT4 - The whole sordid story

Release next week?

Page 64: RT4 - The whole sordid story

hcchien has been askingme to do a talk on RT4

since at least 2006.

Page 65: RT4 - The whole sordid story

I've been promising “next year” for 5 years.

Page 66: RT4 - The whole sordid story

We started RT4 inSeptember 2007

Page 67: RT4 - The whole sordid story

I named it 3.999-DANGEROUS

Page 68: RT4 - The whole sordid story

In literature, they call that foreshadowing

Page 69: RT4 - The whole sordid story

I do public RT trainingsa few times a year

Page 70: RT4 - The whole sordid story

I talk about RT's history

Page 71: RT4 - The whole sordid story

These are the slides I use

Page 72: RT4 - The whole sordid story

A Brief History of RT

Page 73: RT4 - The whole sordid story

RT 0.9 (1996)

● Designed for use at a single company

● 2 sysadmins● 30 users

Page 74: RT4 - The whole sordid story

RT 1.0 (1999)

● Same as RT 0.9

+ a bit more courage● Used at hundeds of companies● Dozens of CSRs● Thouands of requests per day● Intense guilt

Page 75: RT4 - The whole sordid story

RT 2.0 (2001)● Total rewrite● Just after Jesse escaped Microsoft● DBIx::SearchBuilder● Abstraction● Whole new UI● No more frames● “Keywords”

Page 76: RT4 - The whole sordid story

RT 3.0 (2003)

● Overhauled web interface● Extension mechanisms● Internationalization● Custom fields● Cleaner internals● Tests

Page 77: RT4 - The whole sordid story

RT 3.2 (2004)

● New search UI● Spreadsheet / RSS output● Outgoing mail preview and logging● UI improvements● No major structural changes● More tests

Page 78: RT4 - The whole sordid story

RT 3.4 (2005)

● Reimplemented Custom Fields● Custom fields on users, groups

transactions● Generalized Transaction system● Faster, Faster, Faster● Prettier● Even more tests

Page 79: RT4 - The whole sordid story

RT 3.6 (2006)

● All-CSS layout and styling● Customizable homepage● Built in charts and reports● Ticket "reminders"● Comprehensive test coverage● Cleaner code

Page 80: RT4 - The whole sordid story

RT 3.8 (2008)

● More user preferences● Timezones● Theme● Ticket history order● New configuration system● Even more tests

Page 81: RT4 - The whole sordid story

RT 3.8 (continued)

● “Favorite” tickets● Ticket relationship graphs● Branded queues● iCal feeds● PGP support

Page 82: RT4 - The whole sordid story

RT 4.0 (2008?)

Page 83: RT4 - The whole sordid story

Never trust a vendor who makes promises about unreleased products

Page 84: RT4 - The whole sordid story

That's really what it said!

Page 85: RT4 - The whole sordid story

It was sort of a joke

Page 86: RT4 - The whole sordid story

...little did I know

Page 87: RT4 - The whole sordid story

All Taiwanese know that4 is very unlucky

Page 88: RT4 - The whole sordid story

You're supposedto just skip 4

Page 89: RT4 - The whole sordid story

Nobody warned me

Page 90: RT4 - The whole sordid story

...until last night!

Page 91: RT4 - The whole sordid story

In my culture, 6 is the unlucky number.

Page 92: RT4 - The whole sordid story
Page 93: RT4 - The whole sordid story

Along came 2006

Page 94: RT4 - The whole sordid story

We started thinkingabout building RT 4.0

Page 95: RT4 - The whole sordid story

RT is big

Page 96: RT4 - The whole sordid story

http://www.flickr.com/photos/swiv/4426214075/

Page 97: RT4 - The whole sordid story

RT is big

Page 98: RT4 - The whole sordid story

http://www.flickr.com/photos/daymin/4715213393/

Page 99: RT4 - The whole sordid story

RT is complex

Page 100: RT4 - The whole sordid story

http://www.flickr.com/photos/18909153@N08/5241036226/

Page 101: RT4 - The whole sordid story

RT is complex

Page 102: RT4 - The whole sordid story
Page 103: RT4 - The whole sordid story

RT is old

Page 104: RT4 - The whole sordid story

http://www.flickr.com/photos/jpott/5326081706/

Page 105: RT4 - The whole sordid story

RT is old

Page 106: RT4 - The whole sordid story

http://www.flickr.com/photos/paulgissane/163290720

Page 107: RT4 - The whole sordid story

What would we change?

Page 108: RT4 - The whole sordid story

Modernize the API

Page 109: RT4 - The whole sordid story

Remove insane features

Page 110: RT4 - The whole sordid story

Use a framework!

Page 111: RT4 - The whole sordid story

Jifty

Page 112: RT4 - The whole sordid story

AJAX

Page 113: RT4 - The whole sordid story

Modern API

Page 114: RT4 - The whole sordid story

Lots of testing affordances

Page 115: RT4 - The whole sordid story

Plack

Page 116: RT4 - The whole sordid story

Automatic Database Schema Management

Page 117: RT4 - The whole sordid story

UI Helpers

Page 118: RT4 - The whole sordid story

So, we started refactoring

Page 119: RT4 - The whole sordid story

Not a from-scratch rewrite

Page 120: RT4 - The whole sordid story

..but pretty close

Page 121: RT4 - The whole sordid story

No deadline

Page 122: RT4 - The whole sordid story

"It'll be ready when it's ready"

Page 123: RT4 - The whole sordid story

No fixed deliverable

Page 124: RT4 - The whole sordid story

"We want it to be good"

Page 125: RT4 - The whole sordid story

So, we went to work.

Page 126: RT4 - The whole sordid story

What went wrong?

Page 127: RT4 - The whole sordid story

We moved files around

Page 128: RT4 - The whole sordid story

Git made that sort of ok

Page 129: RT4 - The whole sordid story

We decided to modernizeour coding style

Page 130: RT4 - The whole sordid story

We started renamingclasses and methods

Page 131: RT4 - The whole sordid story

RT's API was oldand InterCapped

Page 132: RT4 - The whole sordid story

The modern perl worldis prettier_looking

Page 133: RT4 - The whole sordid story

We built refactoring tools

Page 134: RT4 - The whole sordid story

We ported thefull test suite

Page 135: RT4 - The whole sordid story

RT 3.6/3.7 were still inactive development

Page 136: RT4 - The whole sordid story

We were fixing lots of bugs in 3.6

Page 137: RT4 - The whole sordid story

It was a constant battleto merge forward

Page 138: RT4 - The whole sordid story

3 years in, RT 3.999 was largely "done"

Page 139: RT4 - The whole sordid story

60% of the code of RT 3.8

Page 140: RT4 - The whole sordid story

Almost the samefeature set as RT 3.8.0

Page 141: RT4 - The whole sordid story

Almost the sametest suite as 3.8.0

Page 142: RT4 - The whole sordid story

Much cleaner

Page 143: RT4 - The whole sordid story

Ran on Jifty

Page 144: RT4 - The whole sordid story

Ran on Plack

Page 145: RT4 - The whole sordid story

New "Ticket Lifecycles" system

Page 146: RT4 - The whole sordid story

Much of the UI portedto Template::Declare

Page 147: RT4 - The whole sordid story

It was a lot better

Page 148: RT4 - The whole sordid story

It killed off lots of badold API decisions

Page 149: RT4 - The whole sordid story

...but mostly better forRT's developers

Page 150: RT4 - The whole sordid story

2627 commits

Page 151: RT4 - The whole sordid story

3 years of development

Page 152: RT4 - The whole sordid story

1484 files changed, 174558 insertions(+), 319761 deletions(-)

Page 153: RT4 - The whole sordid story

3.999 was different than 3.8 in some important ways

Page 154: RT4 - The whole sordid story

The API was recognizably the same

Page 155: RT4 - The whole sordid story

3.999 was better than 3.8 insome important ways

Page 156: RT4 - The whole sordid story

The API was 100% incompatible

Page 157: RT4 - The whole sordid story

There were lots and lots of reasons to make the change

Page 158: RT4 - The whole sordid story

There are lots and lots of RT extensions out there.

Page 159: RT4 - The whole sordid story

We've done at least 75

Page 160: RT4 - The whole sordid story

There are more on CPAN

Page 161: RT4 - The whole sordid story

Just about every RT instance has some local customizations

Page 162: RT4 - The whole sordid story

RT has been downloaded about 100 times every day

Page 163: RT4 - The whole sordid story

For the past 5+ years

Page 164: RT4 - The whole sordid story

How many of you have ever customized or extended

some software?

Page 165: RT4 - The whole sordid story

Guess what happens whenyou change an API?

Page 166: RT4 - The whole sordid story

Ever had an API changebreak your customization?

Page 167: RT4 - The whole sordid story

RT has many users

Page 168: RT4 - The whole sordid story

They rely on many, manyRT extensions

Page 169: RT4 - The whole sordid story

● rt-action-linearescalate

● rt-action-notifygroup

● rt-ajaxyreplypage

● rt-authen-bitcard

● rt-authen-openid2

● rt-bugtracker

● rt-bugtracker-public

● rt-condition-complex

● rt-crypt-smime

● rt-extension-activityreports

● rt-extension-activityreports-billing

● rt-extension-addadminccsonqueuechange

● rt-extension-attributewalker

● rt-extension-captcha

● rt-extension-cloneticket-withdata

● rt-extension-commandbyemail

● rt-extension-commandbymail

● rt-extension-commentoncreate

● rt-extension-customfield-hideemptyvalues

● rt-extension-datediscordian

● rt-extension-extractcustomfieldvalues

● rt-extension-formtools

● rt-extension-jsgantt

● rt-extension-ldapimport

● rt-extension-log-memoryusage

● rt-extension-menubarsearches

● rt-extension-mergeusers

● rt-extension-mergeusershistory

● rt-extension-nagios

● rt-extension-notificationmatrix

● rt-extension-priorityasstring

● rt-extension-quickcalls

● rt-extension-quickdelete

● rt-extension-quickupdate

● rt-extension-reportspam

● rt-extension-rt_cpan_org

● rt-extension-spawnlinkedticketinqueue

● rt-extension-utils

● rtfm

● rtfm-extension-articletemplate

● rtir

● rtx-calendar

● rtx-emailcompletion

● rtx-ticketlist-transactions

● rtx-workflowbuilder

Page 170: RT4 - The whole sordid story

We broke all of them

Page 171: RT4 - The whole sordid story

(all the extensions)

Page 172: RT4 - The whole sordid story

(all the users)

Page 173: RT4 - The whole sordid story

RT 3.999 had 40% lesscode than RT 3.8

Page 174: RT4 - The whole sordid story

RT 3.999 lookedjust like RT 3.8

Page 175: RT4 - The whole sordid story

RT 3.999 had almost thesame features as 3.8

Page 176: RT4 - The whole sordid story

...with one really big change

Page 177: RT4 - The whole sordid story

RT 3.x has a systemcalled “Scrips”

Page 178: RT4 - The whole sordid story

Scrips let you buildcustom business logic

Page 179: RT4 - The whole sordid story

They're sort of like“if...then...” statements

Page 180: RT4 - The whole sordid story

They can fire after any update

Page 181: RT4 - The whole sordid story

RT's approvals systemuses Scrips

Page 182: RT4 - The whole sordid story

RT's email-sending rulesuse Scrips

Page 183: RT4 - The whole sordid story

They're really powerful

Page 184: RT4 - The whole sordid story

...but not omnipotent

Page 185: RT4 - The whole sordid story

Scrips are unchangedsince RT 2.0

Page 186: RT4 - The whole sordid story

We decided to replaceScrips in RT 3.999

Page 187: RT4 - The whole sordid story

I wanted a simplemacro language

Page 188: RT4 - The whole sordid story

clkao built the backend

Page 189: RT4 - The whole sordid story

“I'm not building a stupid macro language. If we're doing this, it should support eval and apply”

Page 190: RT4 - The whole sordid story

We created lorzy

Page 191: RT4 - The whole sordid story

It was a lispy language

Page 192: RT4 - The whole sordid story

...with named, typed parameters

Page 193: RT4 - The whole sordid story

We ripped out Scrips and dropped in lorzy

Page 194: RT4 - The whole sordid story

Greenspun's Tenth Rule

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

Page 195: RT4 - The whole sordid story

...at least we did it on purpose?

Page 196: RT4 - The whole sordid story

So, have I sold RT 3.999 to you?

Page 197: RT4 - The whole sordid story

I don't like hurting users.

Page 198: RT4 - The whole sordid story

I don't like hurting customers.

Page 199: RT4 - The whole sordid story

Last summer, we threw away3 years of work.

Page 200: RT4 - The whole sordid story

[sad panda]

Page 201: RT4 - The whole sordid story

What'd we learn?

Page 202: RT4 - The whole sordid story

Second system syndromehurts a lot

Page 203: RT4 - The whole sordid story
Page 204: RT4 - The whole sordid story

. o O { My problem is that I actually have users

I don't want to alienate }

Page 205: RT4 - The whole sordid story

A working test suite is not a magic bullet

Page 206: RT4 - The whole sordid story

Incremental updates vs

gut renovation

Page 207: RT4 - The whole sordid story

Got a working system?

Page 208: RT4 - The whole sordid story

Make the smallest changethat could possibly work

Page 209: RT4 - The whole sordid story

Build for your users

Page 210: RT4 - The whole sordid story

When we do client work, they say that they want high-quality software last week for almost

free.

Page 211: RT4 - The whole sordid story

"Good, fast and cheap, pick any two"

Page 212: RT4 - The whole sordid story

Turns out that youmust pick two.

Page 213: RT4 - The whole sordid story

Last summer, we startedRT4 over again

Page 214: RT4 - The whole sordid story

What'd we do differentthis time?

Page 215: RT4 - The whole sordid story

We were workingfor a customer

Page 216: RT4 - The whole sordid story

The customer wantedRT 3.8...

Page 217: RT4 - The whole sordid story

...with a lot of extensions.

Page 218: RT4 - The whole sordid story

They wanted to pay us to integrate those extensions.

Page 219: RT4 - The whole sordid story

We had a deadline

Page 220: RT4 - The whole sordid story

We had a fixed set of deliverables

Page 221: RT4 - The whole sordid story

We had a mostly fixed set of deliverables

Page 222: RT4 - The whole sordid story

We got to work

Page 223: RT4 - The whole sordid story

The client wanted frequentbeta releases

Page 224: RT4 - The whole sordid story

The new RT 3.9 needed tobe deployable at any time

Page 225: RT4 - The whole sordid story

Lots of topic branches

Page 226: RT4 - The whole sordid story

We started pulling in work we'd already done as core features

Page 227: RT4 - The whole sordid story

RTFM became Articles

Page 228: RT4 - The whole sordid story

Stock answers

Page 229: RT4 - The whole sordid story

Really useful

Page 230: RT4 - The whole sordid story

Lots of folks don't install it

Page 231: RT4 - The whole sordid story

So, now you don't get a choice

Page 232: RT4 - The whole sordid story

Lifecycles

Page 233: RT4 - The whole sordid story

Originally built for 3.999 & backported to 3.8

Page 234: RT4 - The whole sordid story

Mobile Interface

Page 235: RT4 - The whole sordid story
Page 236: RT4 - The whole sordid story

Date custom fields

Page 237: RT4 - The whole sordid story

IP address custom fields

Page 238: RT4 - The whole sordid story

Full-text search for MySQL, Postgres and Oracle

Page 239: RT4 - The whole sordid story

Gmail-style foldingof ticket history

Page 240: RT4 - The whole sordid story
Page 241: RT4 - The whole sordid story

Some new features, we built from scratch

Page 242: RT4 - The whole sordid story

New auditing anddebugging tools

Page 243: RT4 - The whole sordid story

A brand new visual theme

Page 244: RT4 - The whole sordid story

A brand new theme editor

Page 245: RT4 - The whole sordid story
Page 246: RT4 - The whole sordid story

A new permissions editor UI

Page 247: RT4 - The whole sordid story
Page 248: RT4 - The whole sordid story

Dropdown and radio-button custom fields

Page 249: RT4 - The whole sordid story

Autocompleters for usersand email addresses

Page 250: RT4 - The whole sordid story

Ported to Plack

Page 251: RT4 - The whole sordid story

Some stuff, you'd never notice

Page 252: RT4 - The whole sordid story

Overhauled how wedo boilerplate code

Page 253: RT4 - The whole sordid story

(Fewer files change.They change less)

Page 254: RT4 - The whole sordid story

Cut down our use of autoconf

Page 255: RT4 - The whole sordid story

Made the test suite much faster

Page 256: RT4 - The whole sordid story

Eliminated "noise"from the test suite

Page 257: RT4 - The whole sordid story

Successfully deliveredto customer

Page 258: RT4 - The whole sordid story

Since then, we've been stabilizing, fixing bugs and

improving docs

Page 259: RT4 - The whole sordid story

RC 1 came out just after christmas

Page 260: RT4 - The whole sordid story

RC 7 came out last week

Page 261: RT4 - The whole sordid story

We're very, very close.

Page 262: RT4 - The whole sordid story

Try out RT4

http://bestpractical.com/rt/download.html

http://bestpractical.com/rt/git.html

Page 263: RT4 - The whole sordid story

Release Candidate means we think it's ready for production

Page 264: RT4 - The whole sordid story

If it breaks, email [email protected]

Page 265: RT4 - The whole sordid story

Thank you!

Questions?