how we use python at bitbucket
TRANSCRIPT
MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS
How we use Python at Bitbucket(tldr; We use it for everything)
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
• Main web application https://bitbucket.org
• REST APIhttps://api.bitbucket.org
Web Tier
• HA Proxy TCP load balancing
• Nginx SSL Termination
• PostgreSQLRelational database
• RedisCaching
Web Tier
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
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
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
Can you guess what language?
Nope, Go
But really Python
We dogfood our stuff!
Feedback?
MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS
We’re hiring!
MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS