So you built a plugin. But will it succeed at scale? During this session, we’ll walk through the five easiest ways to build plugins. Along the way, we'll explore techniques that will help you develop quality extensions that can scale with your company.
4. About Me
Who Am I
• Atlassian Consultant/Developer at Adaptavist
• 5 years of experience developing Atlassian plugins
• Plugin License Manager was my fault
• Spoken at various Conferences, including Summit about:
• Atlassian development
• Performance tuning
• Level One
• Level Two
• Level Two
• Level Two
• Level One
5. About Me
Adaptavist - Who Are We
• 60 people in 4 offices in the UK, USA and Germany
• Level One
• Level Two
• Level Two
• Level Two
• Level One
• Customers in 60+ countries including over half of the Fortune 500
• Longest established Atlassian partners - since 2005
• Professional Services, Managed Services, Products and Training
• Focused on helping Enterprises plan, deliver and manage software and applications using the
Atlassian toolset
6. About Me
Why Should You Listen To Me?
• Because I’ve messed up
• A lot
• … but also made it better
• Level One
• Level Two
• Level Two
• Level Two
• Level One
12. Before Data Center Users
• Level One
• Level Two
• Level Two
• Level Two
• Level One
WAN
JIRA
Index
Database
13. With Data Center
The Architecture
• Level One
• Level Two
• Level Two
• Level Two
• Level One
WAN
Users
. . .
Multiple JIRA Nodes
Replicated Indexes
Load Balancer
Database Shared Home
21. State - Do’s & Don’ts
COLUMN TITLE COLUMN TITLE COLUMN TITLE
DO Read up distributed systems theory
DO Consider and test failure modes
DO Keep as little state as possible
DO Use the appropriate supported APIs
DON’T Just assume everything will be OK
22. Scaling Plugins
STATE
CACHES & POOLS
COORDINATION
TESTING
USER INTERFACE
IN THE CODE
28. Pool Monitoring
• Level One
• Level Two
• Level Two
• Level Two
• Level One
29. Caches and Pools - Do’s & Don’ts
COLUMN TITLE COLUMN TITLE COLUMN TITLE
DO Cache values that are complex to create and cheap to store
DO Invalidate caches appropriately using time and freshness checks
DO Pool resources where appropriate
DO Use and know the new caching APIs
DON’T Use hash maps or statics or sessions for caching!
30. Scaling Plugins
STATE
CACHES & POOLS
COORDINATION
TESTING
USER INTERFACE
IN THE CODE
40. Coordination - Do’s & Don’ts
COLUMN TITLE COLUMN TITLE COLUMN TITLE
DO Think about concurrency - read Java Concurrency in Practice
DO Use immutable data structures with reentrant logic
DON’T Be scared and ignore potential problems
DON’T Use locking (like synchronised blocks)
41. Scaling Plugins
STATE
CACHES & POOLS
COORDINATION
TESTING
USER INTERFACE
IN THE CODE
47. Testing - Do’s & Don’ts
COLUMN TITLE COLUMN TITLE COLUMN TITLE
DO Make it easy to detect application API changes - Integration test
DO Performance testing
DO Actively try to increase the test coverage - these are important!
DO Test at scale and announce results
DO Declare how you tested for Data Center
DON’T Ignore Security
48. Scaling Plugins
STATE
CACHES & POOLS
COORDINATION
TESTING
USER INTERFACE
IN THE CODE
53. User Interface - Do’s & Don’ts
COLUMN TITLE COLUMN TITLE COLUMN TITLE
DO use and know the ADG
DO Think about scaled use
DO Think about the impact you might make
DON’T Think you’re the only plugin that matters
DON’T Lock the UI up
54. Scaling Plugins
STATE
CACHES & POOLS
COORDINATION
TESTING
USER INTERFACE
IN THE CODE
61. Useful Libs - Do’s & Don’ts
COLUMN TITLE COLUMN TITLE COLUMN TITLE
DO Watch A P2 Plugin and a SaaS Platform Walk into a Bar… from
AtlasCamp
DO Know your OSGi
DO Use Atlassian Spring Scanner
DO Look at Pockeknife
DO Use Wired Tests
DO Take advantage of batching
63. Key takeaways: #atlassian
• Understand your state
• Play nice - respect the application you execute within.
• Be mindful of the user experience - does it scale?
• Understand the bottlenecks within your plugin - are you lazy enough?
• Be immutable, else be remembered for the wrong reasons!
• Test at scale or announce that you haven’t.
64. Thank you!
JON MORT • CONSULTANT • ADAPTAVIST • @ADAPTAVIST