how we use python at bitbucket

14
MARK ADAMS SOFTWARE DEVELOPER BITBUCKET @MARKADAMS How we use Python at Bitbucket (tldr; We use it for everything)

Upload: mark-adams

Post on 12-Apr-2017

366 views

Category:

Software


2 download

TRANSCRIPT

Page 1: How we use Python at Bitbucket

MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS

How we use Python at Bitbucket(tldr; We use it for everything)

Page 2: How we use Python at Bitbucket

W H AT I S B I T B U C K E T

What is Bitbucket?

•Distributed code hosting•Perfect for individuals or teams• Git or Mercurial• Free for 5 users +Unlimited private repositories

Try it out! - http://bitbucket.org

Page 3: How we use Python at Bitbucket

• Main web application https://bitbucket.org

• REST APIhttps://api.bitbucket.org

Web Tier

Page 4: How we use Python at Bitbucket

• HA Proxy TCP load balancing

• Nginx SSL Termination

• PostgreSQLRelational database

• RedisCaching

Web Tier

Page 5: How we use Python at Bitbucket

C E L E RY

Distributed Tasks• Celery• Used for asynchronous event processing

• Sending notifications• Updating pull requests• Updating activity feed

• RabbitMQ used as the message broker

Page 6: How we use Python at Bitbucket

O R O C H I

Orochi• Translated “8-branched giant snake"• Abstraction library for Git and Mercurial• Written entirely in Python• Simplifies the interaction with repositories

Git & Hg have similarities:• Both store your code• Both have commits• Both have branches

Django Celery

Orochi

Storage Layer

Page 7: How we use Python at Bitbucket

G I T + H G O P E R AT I O N S

Git & Hg Operations

• HTTP• WSGI apps - One for Git, One for Hg

• SSH• OpenSSH - Customized!• Launches another process (conq) to

perform authentication and execute DVCS operations

Page 8: How we use Python at Bitbucket

Can you guess what language?

Page 9: How we use Python at Bitbucket

Nope, Go

Page 10: How we use Python at Bitbucket

But really Python

Page 11: How we use Python at Bitbucket

We dogfood our stuff!

Page 12: How we use Python at Bitbucket
Page 13: How we use Python at Bitbucket

Feedback?

MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS

Page 14: How we use Python at Bitbucket

We’re hiring!

MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS