Your SlideShare is downloading. ×
0
Reaching for the cloud
3 ways that the cloud will change the way you develop software
Atlassian

NirajBhawnani
What is the cloud?
What is the cloud?
• Remote servers run applications and store your data
• Accessible over the internet
• Users need not c...
Atlassian & the cloud
Who is Atlassian?
• We build software tools for issue tracking, collaboration,
continuous integration, and source control
Who is Atlassian?
• Founded in 2002 by 2
Sydney-siders
• ~600 employees in:
Who is Atlassian?

Atlassian’s Vietnamese Team, November 2013
• Atlassian started selling software for customers to install
on their own servers
• Customers would keep asking if we had...
• 41,150 VMs
• 5,640 CPU cores
• 58 TB RAM
• 368 TB Disk
Why is everything
moving to the cloud?
Why move to the cloud?
• Great for business. One time payments become regular
payments
Confluence BTF vs. OnDemand
100 use...
Why move to the cloud?
• Cheaper for customers – no staff or hardware required
Confluence BTF vs. OnDemand
100 user licens...
Why move to the cloud?
• Always accessible via the internet
• Full control of the application server environment
Delivering software to
the cloud
Traditional delivery pipeline

Production
Merge code

Build Release

Manual Task
Automatic Task

QA Verification

Staging ...
Continuous Delivery Pipeline

Production
Merge code

Manual Task
Automatic Task

Continuous Integration
(Build & Test)
How will the cloud
change the way you
build software?
1. Incremental delivery
Incremental Delivery
• Waterfall model does not work for cloud software
• Deliver features in small increments instead of ...
Incremental Delivery
• Start with a Minimum Viable Product (MVP)
• Simplest version of the feature that still adds value f...
Incremental Delivery
• Then deliver incrementally in order of importance
• V1/MVP: Upload and view standard definition pho...
What to do when the
MVP is too big?
Feature Switches
• Atlassian calls them “dark features”
• Wrap the feature in some condition and provide a way to
switch t...
Feature Switches
• Also allows us to deploy features to a subset of users
• Can be used to test more risky features withou...
2. Automation
Automated Testing
• Since there might not be a manual verification step, we
must write a lot of automated tests to verify ...
Automated Testing
• Automated tests need to run for every commit on every
branch
• Branches can be merged automatically or...
Automated Testing
• Check in code
• Build runs:
• Unit tests
• Integration tests

• Merge code
Unit Tests
• Used to test individual units of source code in isolation
• Can run very very fast
• Might miss some bugs
• E...
Integration Tests
• Tests the whole product by functionality
• Runs slowly
• Selenium tests to drive the UI
• Hamcrest/JUn...
Smoke Tests
• Similar to integration tests
• Runs on one or more staging servers with real data that
has been upgraded
• V...
Selenium
• Test code sends commands to Selenium Server
• Selenium Server starts a browser
• Selenium Server sends commands...
Selenium
• Since you need to write a lot of tests, you need to reuse
as much code as possible
• Write “page objects” that ...
Selenium
• Example code (Selenium with page objects):
@Test
public void testQuickSearchWithResults()
{
viewPage = product....
Automated Deployment
• Deployments happen very frequently:
•
•
•

: 25/day
: 1/day
: 1/week

• Updates need to be fast and...
3. Analytics
Analytics
• Collect usage data from all instances and users in a
centralised place
• This can be a very large amount of da...
Analytics
• Query the data to answer important questions:
• What features are people using?
• What features are people not...
Analytics
• You should come up with the list of questions before you
ship the feature. Why?
Analytics
• You should come up with the list of questions before you
ship the feature. Why?
• To answer some kinds of ques...
Atlassian Analytics
• Leverages the existing events system
• Support for client-side events
• Reporting via Graphite or Ap...
Atlassian Analytics
Product
instance
Product
instance

Product
instance

UDP

Analytics
Server
Graphite

Product
instance
...
Atlassian Analytics
Application Server

HAMS

Application
code

Sales information

Java Event

Web Browser

Batched
AJAX

...
Other Considerations
• Hardware costs (particularly RAM) is the largest expense
• RAM usage can be reduced by:
• Multitena...
Other Considerations
• Deployment should not cause downtime
• Upgrade a standby server
• Switch proxy to new server
• Stor...
Other Considerations
• Things don’t always go as planned
• Always try to roll forward, never backward
• Have a procedure t...
What should I do next?
What should I do next?
• Consider moving your application to the cloud
• Deliver features incrementally
• Write a lot of a...
• Learn more about Atlassian software
• Hear talks like this one about industry best practices
• Network with other profes...
Thank You!
Questions?
Tech Talk on Cloud Computing
Upcoming SlideShare
Loading in...5
×

Tech Talk on Cloud Computing

329

Published on

Speaker: Niraj Bhawnani from Atlassian

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
329
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Tech Talk on Cloud Computing"

  1. 1. Reaching for the cloud 3 ways that the cloud will change the way you develop software Atlassian NirajBhawnani
  2. 2. What is the cloud?
  3. 3. What is the cloud? • Remote servers run applications and store your data • Accessible over the internet • Users need not care where the application is running or where their files are hosted • Examples of cloud companies:
  4. 4. Atlassian & the cloud
  5. 5. Who is Atlassian? • We build software tools for issue tracking, collaboration, continuous integration, and source control
  6. 6. Who is Atlassian? • Founded in 2002 by 2 Sydney-siders • ~600 employees in:
  7. 7. Who is Atlassian? Atlassian’s Vietnamese Team, November 2013
  8. 8. • Atlassian started selling software for customers to install on their own servers • Customers would keep asking if we had a hosted solution • In 2011, Atlassian OnDemand was born
  9. 9. • 41,150 VMs • 5,640 CPU cores • 58 TB RAM • 368 TB Disk
  10. 10. Why is everything moving to the cloud?
  11. 11. Why move to the cloud? • Great for business. One time payments become regular payments Confluence BTF vs. OnDemand 100 user license = $4000 100 user license = $300/month Assuming an upgrade every 2 years: BTF = $4000 OnDemand = $300 × 2 × 12 = $7200
  12. 12. Why move to the cloud? • Cheaper for customers – no staff or hardware required Confluence BTF vs. OnDemand 100 user license = $4000 Staff/hardware = $70000/yr 100 user license = $300/month No staff/hardware = $0/yr Cost every 2 years: BTF = $70000 × 2 + $4000 = $144000 OnDemand = $300 × 2 × 12 = $7200
  13. 13. Why move to the cloud? • Always accessible via the internet • Full control of the application server environment
  14. 14. Delivering software to the cloud
  15. 15. Traditional delivery pipeline Production Merge code Build Release Manual Task Automatic Task QA Verification Staging deployment & verification
  16. 16. Continuous Delivery Pipeline Production Merge code Manual Task Automatic Task Continuous Integration (Build & Test)
  17. 17. How will the cloud change the way you build software?
  18. 18. 1. Incremental delivery
  19. 19. Incremental Delivery • Waterfall model does not work for cloud software • Deliver features in small increments instead of “big bang releases” • Good for customers: they get features faster • Good for you: less investment before validation
  20. 20. Incremental Delivery • Start with a Minimum Viable Product (MVP) • Simplest version of the feature that still adds value for users • Example: Facebook Photos • MVP allows users to just upload and view photos
  21. 21. Incremental Delivery • Then deliver incrementally in order of importance • V1/MVP: Upload and view standard definition photos • V2: Face tagging • V3: Video support • V4: High definition photos & full screen mode • V5: Automatic face detection
  22. 22. What to do when the MVP is too big?
  23. 23. Feature Switches • Atlassian calls them “dark features” • Wrap the feature in some condition and provide a way to switch the condition on and off • Also provide a way for tests to turn them on/off • Eliminates the need for long lived code branches
  24. 24. Feature Switches • Also allows us to deploy features to a subset of users • Can be used to test more risky features without upsetting too many users All users Experiment Group Control Group
  25. 25. 2. Automation
  26. 26. Automated Testing • Since there might not be a manual verification step, we must write a lot of automated tests to verify the system: • Unit tests • Integration tests • Smoke tests
  27. 27. Automated Testing • Automated tests need to run for every commit on every branch • Branches can be merged automatically or manually • Automatic deployment when the main branch passes • Tools: Atlassian Bamboo, Hudson, Cruise Control
  28. 28. Automated Testing • Check in code • Build runs: • Unit tests • Integration tests • Merge code
  29. 29. Unit Tests • Used to test individual units of source code in isolation • Can run very very fast • Might miss some bugs • E.g. JUnit, Mockito, QUnit, etc.
  30. 30. Integration Tests • Tests the whole product by functionality • Runs slowly • Selenium tests to drive the UI • Hamcrest/JUnit to do assertions
  31. 31. Smoke Tests • Similar to integration tests • Runs on one or more staging servers with real data that has been upgraded • Verifies that the data is intact and that basic functionality still works • Also uses Selenium
  32. 32. Selenium • Test code sends commands to Selenium Server • Selenium Server starts a browser • Selenium Server sends commands to the browser • Type in this form • Click the submit button • Is this element visible? Test code Selenium Server Web Browser
  33. 33. Selenium • Since you need to write a lot of tests, you need to reuse as much code as possible • Write “page objects” that represent each page and “page components” that represent shared components (e.g. header and navigation)
  34. 34. Selenium • Example code (Selenium with page objects): @Test public void testQuickSearchWithResults() { viewPage = product.login(User.TEST, ViewPage.class, testData.page); QuickSearch quickSearch = viewPage.getHeader().getQuickSearch(); SearchResultPage resultsPage = quickSearch.doSiteSearch(searchWithResults); Poller.waitUntilTrue(resultsPage.hasMatchingResults()); }
  35. 35. Automated Deployment • Deployments happen very frequently: • • • : 25/day : 1/day : 1/week • Updates need to be fast and automatic • Usually a collection of custom software and scripts
  36. 36. 3. Analytics
  37. 37. Analytics • Collect usage data from all instances and users in a centralised place • This can be a very large amount of data, you need to use tools that can handle it: • Graphite • Amazon Redshift
  38. 38. Analytics • Query the data to answer important questions: • What features are people using? • What features are people not using? • How are the features being used? • What kind of users are using what kind of features? • Use the data to make important business decisions
  39. 39. Analytics • You should come up with the list of questions before you ship the feature. Why?
  40. 40. Analytics • You should come up with the list of questions before you ship the feature. Why? • To answer some kinds of questions you may need to write additional code.
  41. 41. Atlassian Analytics • Leverages the existing events system • Support for client-side events • Reporting via Graphite or Apache Hive • Google Analytics • Greenzone
  42. 42. Atlassian Analytics Product instance Product instance Product instance UDP Analytics Server Graphite Product instance Product instance … Product instance Hive Analytics Server Amazon Redshift
  43. 43. Atlassian Analytics Application Server HAMS Application code Sales information Java Event Web Browser Batched AJAX Analytics Plugin Database Server Greenzone Database UDP Analytics Server Google Analytics Daily SQL Queries Hive, etc.
  44. 44. Other Considerations • Hardware costs (particularly RAM) is the largest expense • RAM usage can be reduced by: • Multitenancy • Microservices architecture • Optimising code
  45. 45. Other Considerations • Deployment should not cause downtime • Upgrade a standby server • Switch proxy to new server • Store sessions in a central location e.g. database • Users experience no downtime
  46. 46. Other Considerations • Things don’t always go as planned • Always try to roll forward, never backward • Have a procedure to deploy hotfixes in case of emergency • Only revert to older versions as a last resort
  47. 47. What should I do next?
  48. 48. What should I do next? • Consider moving your application to the cloud • Deliver features incrementally • Write a lot of automated tests • Make deployment easy and automatic • Use collected data to make business decisions
  49. 49. • Learn more about Atlassian software • Hear talks like this one about industry best practices • Network with other professionals • Free beer! • https://aug.atlassian.com/
  50. 50. Thank You!
  51. 51. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×