AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center

1,020 views

Published on

JIRA and Confluence are introducing new product editions with support for high availability and clustering. Depending on your add-on, supporting enterprise-grade deployments of JIRA and Confluence could require updates to your plugin. Get a sneak preview of the application architecture for HA and clustering, and learn how you can ensure your plugin is ready to run in these mission critical installations.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,020
On SlideShare
0
From Embeds
0
Number of Embeds
198
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center

  1. 1. June 3-5, 2014 | Berlin, Germany
  2. 2. Chris Fuller, Senior Developer, Atlassian Data Center for Developers
  3. 3. • About Data Center • Hazards for Plugins • Marketplace • Resources ! Data Center for Developers
  4. 4. • Clustering • Scale and Performance • High Availability • Hardware Maintenance • Unexpected outages Data Center: The Reasons
  5. 5. Data Center: The Picture Users WAN Index Database JIRA
  6. 6. Data Center: The Picture WAN Users . . . Replicated Indexes Multiple JIRA Nodes Database Shared Home Load Balancer
  7. 7. • What you don’t know… • Long-lived caches • Scheduled tasks • Locking Plugins: Danger Zone!
  8. 8. Sharing is Caring Odds and Ends Locks Scheduled Tasks Caches
  9. 9. • Expensive Information • I/O costs • CPU costs • Caching is not free • Memory costs • Consistency risks Caches: The Problem ?!
  10. 10. • Local or clustered • Replication control • By invalidation • By copy • Lazy loading pattern • Statistical reporting Caches: Atlassian Cache 2.0
  11. 11. • Rolling your own • HTTP Session as a cache • Unbounded caches • Custom key classes • Enumerating the keys Caches: Asking for Trouble ?!
  12. 12. • Don’t keep state! • Atlassian Cache API • Lazy load pattern • Set bounds • Maximum size? • Timeout (30 minutes) • Use simple keys Caches: Best practices
  13. 13. Sharing is Caring Odds and Ends Locks Caches Scheduled Tasks
  14. 14. • Per-node maintenance • Atlassian Scheduler API • SAL PluginScheduler • Backward compatibility • Confluence ! Scheduler: Local 1:00 2:00 3:00 4:00
  15. 15. • Runs on any one node • Atlassian Scheduler API • Quartz (Deprecated) • Compatibility library Scheduler: Clustered 1:00 2:00 3:00 4:00
  16. 16. • Atlassian Scheduler API • Clustered run-immediately job • Could run twice • Specify initial run time • Unscheduling on disable • Unschedules for whole cluster • Unregister job runner instead Scheduler: Dos and Don’ts
  17. 17. Sharing is Caring Odds and Ends Caches Scheduled Tasks Locks
  18. 18. • synchronized • java.util.concurrent • atlassian-util-concurrent Locks: Local
  19. 19. • Atlassian Beehive • Cluster-wide • Cheap in single node Locks: Clustered
  20. 20. • Problems • Expensive in a cluster • Not read/write ! ! • Alternatives • Lock-free SQL ordering • Optimistic locking • Tolerating inconsistency • Transactions Locks: The Details
  21. 21. Sharing is Caring Caches Locks Scheduled Tasks Odds and Ends
  22. 22. • Application Home Split • Local home • Shared home No Place Like Shared Home • Application Home Split • Local home • Shared home • Application Home Split • Local home • Shared home
  23. 23. Data Center Ready! <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}" /> <param name="atlassian-data-center-compatible">true</param> </plugin-info>
  24. 24. • JIRA Plugin Guide
 developer.atlassian.com/display/JIRADEV/Plugin+Guide+to+JIRA+High+Availability+and+Clustering • Confluence Plugin Guide
 developer.atlassian.com/pages/viewpage.action?pageId=2031761 • docs.atlassian.com/atlassian-cache-api • docs.atlassian.com/atlassian-scheduler-api • docs.atlassian.com/beehive-api • bitbucket.org/cfuller Resources
  25. 25. June 3-5, 2014 | Berlin, Germany

×