30
Get your add-on in shape for Data Center MICHAEL HEEMSKERK ARCHITECT ATLASSIAN @MICHAELHEEMSKRK

AtlasCamp 2015: Get your add-on in shape for Data Center

Embed Size (px)

Citation preview

Get your add-on in shape for Data Center

MICHAEL HEEMSKERK • ARCHITECT • ATLASSIAN • @MICHAELHEEMSKRK

Home Database

Standalone

Data Center

Database

Shared home

Local home

Local home

Local home

Challenges

#1 Caches are evil…. but necessary

#2 Synchronization

#3 Events

#4 Scheduling

Difficult?

Solutions

Caching

• Avoid it if you can• Request-level caching• atlassian-cache

AT L A S S I A N - C A C H E

API• CacheFactory• Cache<K, V>• CachedReference<V>• CacheLoader<K, V>• CacheSettings• CacheListener

AT L A S S I A N - C A C H E

cache

Node 1

cache

Node 2

Local caches

AT L A S S I A N - C A C H E

cache

Node 1

cache

Node 2

Remote caches

Replication

AT L A S S I A N - C A C H E

cache

Node 1

cache

Node 2

Hybrid caches

Invalidation

AT L A S S I A N - C A C H E

<example-code/>

Synchronisation

• Avoid it if you can• Optimistic locking in the database• atlassian-beehive: cluster-aware lock service

AT L A S S I A N - B E E H I V E

<example-code/>

Event handling

• Events are node-local only• Options for node-node coordination

• atlassian-cache (+ listener)• product-specific APIs

Scheduling

Node 1Node 2

JobRunnerJobRunner

SchedulerService

JobRunnerJobConfig

scheduled jobs

JobRunnerJobConfig

SchedulerService

JobRunnerJobRunner

scheduled jobs

replicated *

AT L A S S I A N - S C H E D U L E R

<example-code/>

wait.. there’s more

ClusterMessagingService

ClusterEvent

TopicService

BucketedExecutor

Documentation• Data Center add-on development: http://bit.ly/1IguwLq• Atlassian Cache 2 Overview: http://bit.ly/1Il8WZg• Stash - Making cluster-safe plugins: http://bit.ly/1G9aeE6

Thank you!

MICHAEL HEEMSKERK • ARCHITECT • ATLASSIAN • @MICHAELHEEMSKRK

Get your add-on in shape for Data Center

Submit your feedback: go.atlassian.com/acaddondc