150
Without a Big Database Kate Matsudaira popforms @katemats Big Data

Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Without a Big Database

Kate Matsudairapopforms

@katemats

Big Data

Page 2: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Two kinds of datanicknames “user”, “transactional” “reference”, “non-

transactional”

examples:

• user accounts • shopping cart/orders • user messages • …

• product/offer catalogs • service catalogs • static geolocation data • dictionaries • …

created/modified by: users business (you)

sensitivity to staleness:

high low

plan for growth: hard easy

access optimization:

read/write mostly read

Page 3: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Two kinds of datanicknames “user”, “transactional” “reference”, “non-

transactional”

examples:

• user accounts • shopping cart/orders • user messages • …

• product/offer catalogs • service catalogs • static geolocation data • dictionaries • …

created/modified by: users business (you)

sensitivity to staleness:

high low

plan for growth: hard easy

access optimization:

read/write mostly read

Page 4: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 5: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

reference data

Page 6: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

reference data

user data

Page 7: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 8: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

reference data

Page 9: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

reference data

user data

Page 10: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Performance

main memory read 0.0001 ms (100 ns)

network round trip 0.5 ms (500,000 ns)

disk seek 10 ms (10,000,000 ns)

source: http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf

Reminder

Page 11: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 12: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 13: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 14: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Beginning

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Page 15: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Beginning

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

availability problems

Page 16: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Beginning

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

availability problems

performance problems

Page 17: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Beginning

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

availability problems

performance problems

scalability problems

Page 18: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Replication

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Page 19: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

Replication

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Page 20: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

Replication

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

scalability problems

Page 21: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

Replication

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

scalability problems

performance problems

Page 22: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

Replication

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

scalability problems

performance problems

operational overhead

Page 23: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Caching

Page 24: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Caching

cach

eca

che

cach

e

Page 25: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Cachingscalability problems

cach

eca

che

cach

e

Page 26: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Cachingscalability problems

operational overhead

cach

eca

che

cach

e

Page 27: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Cachingscalability problems

performance problems

operational overhead

cach

eca

che

cach

e

Page 28: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Cachingscalability problems

performance problems

operational overhead

cach

eca

che

cach

e

consistency problems

Page 29: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

REPLICA

webapp

webapp

load

bal

ance

r

load

bal

ance

r

BIGDATABASE

service

service

service

data loader

Local Cachingscalability problems

performance problems

operational overhead

cach

eca

che

cach

e

consistency problems

long tail performance problems

Page 30: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Long Tail

Problem20% of requests query remaining 90% of entries (tail)

80% of requests query 10% of entries (head)

Page 31: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cache

Page 32: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cacheoperational overhead

Page 33: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cacheperformance

problemsoperational overhead

Page 34: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cache

scalability problems

performance problems

operational overhead

Page 35: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cache

scalability problems

performance problems

consistency problems

operational overhead

Page 36: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cache

scalability problems

performance problems

consistency problems

long tail performance

problems

operational overhead

Page 37: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

webapp

webapp

load

bal

ance

r

load

bal

ance

r

replica

service

service

service data loader

BIG CACHE

database

preload

Big Cache

scalability problems

performance problems

consistency problems

long tail performance

problems

operational overhead

Page 38: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Big Cache Technologies

Page 39: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Big Cache Technologies

memcached(b)

Page 40: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Big Cache Technologies

ElastiCache (AWS)

memcached(b) Do I look like I need a cache?

Page 41: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Big Cache Technologies

ElastiCache (AWS)

memcached(b)

Oracle Coherence

Do I look like I need a cache?

Page 42: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 43: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Targeted generic data/

use cases.

Page 44: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Targeted generic data/

use cases.

Dynamically assign keys to the “nodes”

Page 45: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Targeted generic data/

use cases.

Scales horizontally

Dynamically assign keys to the “nodes”

Page 46: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Targeted generic data/

use cases.

Scales horizontallyDynamically

rebalances data

Dynamically assign keys to the “nodes”

Page 47: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Targeted generic data/

use cases.

Scales horizontallyDynamically

rebalances data

Poor performance on cold starts

Dynamically assign keys to the “nodes”

Page 48: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Targeted generic data/

use cases.

Scales horizontallyDynamically

rebalances data

Poor performance on cold starts

No assumptions about loading/updating data

Dynamically assign keys to the “nodes”

Page 49: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

• Extra network hop • Slow scanning • Additional deserialization

• Additional hardware • Additional configuration • Additional monitoring

Big Cache Technologies

Page 50: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

operational overhead}• Extra network hop • Slow scanning • Additional deserialization

• Additional hardware • Additional configuration • Additional monitoring

Big Cache Technologies

Page 51: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

operational overhead

} performance

}• Extra network hop • Slow scanning • Additional deserialization

• Additional hardware • Additional configuration • Additional monitoring

Big Cache Technologies

Page 52: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

NoSQL Replica

webapp

webapp load

bal

ance

r

load

bal

ance

r

NoSQLDatabase

service

service

service

data loader

NoSQL to The Rescue?

Page 53: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

NoSQL Replica

webapp

webapp load

bal

ance

r

load

bal

ance

r

NoSQLDatabase

service

service

service

data loader

NoSQL to The Rescue?

some performance problems

Page 54: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

NoSQL Replica

webapp

webapp load

bal

ance

r

load

bal

ance

r

NoSQLDatabase

service

service

service

data loader

NoSQL to The Rescue?

some performance problems

some scalability problems

Page 55: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

NoSQL Replica

webapp

webapp load

bal

ance

r

load

bal

ance

r

NoSQLDatabase

service

service

service

data loader

NoSQL to The Rescue?

some operational overhead

some performance problems

some scalability problems

Page 56: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Remote Store Retrieval Latency

remote store network clientnetwork

Page 57: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Remote Store Retrieval Latency

TCP request: 0.5 ms

Lookup/write response: 0.5 ms

TCP response: 0.5 ms read/parse

response: 0.25 ms

remote store network clientnetwork

Page 58: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Remote Store Retrieval Latency

TCP request: 0.5 ms

Lookup/write response: 0.5 ms

TCP response: 0.5 ms read/parse

response: 0.25 ms

remote store network clientnetwork

1.75 msTotal time to retrieve single value:

Page 59: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Total time to retrieve A single value

from remote store: 1.75 msfrom memory: 0.001 ms (10 main memory reads)

Page 60: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Total time to retrieve A single value

Sequential access of 1 million random keys

from remote store: 1.75 msfrom memory: 0.001 ms (10 main memory reads)

from remote store: 30 minutesfrom memory: 1 second

Page 61: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Truth About Databases

Page 62: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

“What I'm going to call as the hot data cliff: As the size of your hot data set (data frequently read at sustained rates above disk I/O capacity) approaches available memory, write operation bursts

that exceeds disk write I/O capacity can create a trashing death spiral where hot disk pages that MongoDB desperately needs are

evicted from disk cache by the OS as it consumes more buffer space to hold the writes in memory.”

MongoDBSource: http://www.quora.com/Is-MongoDB-a-good-replacement-for-Memcached

Page 63: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

“Redis is an in-memory but persistent on disk database, so it represents a different trade off where very high write and read speed is achieved with the

limitation of data sets that can't be larger than memory.”

Redis

source: http://redis.io/topics/faq

Page 64: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

They are fast if everything fits into memory.

Page 65: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders
Page 66: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Can you keep it in memory yourself?

webapp

webapp load

bal

ance

r

load

bal

ance

r

service full cache

data loader

service full cache

data loader

service full cache

data loader

BIGDATABASE

Page 67: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Can you keep it in memory yourself?

webapp

webapp load

bal

ance

r

load

bal

ance

r

service full cache

data loader

service full cache

data loader

service full cache

data loader

BIGDATABASE

operational relief

Page 68: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Can you keep it in memory yourself?

webapp

webapp load

bal

ance

r

load

bal

ance

r

service full cache

data loader

service full cache

data loader

service full cache

data loader

BIGDATABASE

operational relief

scales infinitely

Page 69: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Can you keep it in memory yourself?

webapp

webapp load

bal

ance

r

load

bal

ance

r

service full cache

data loader

service full cache

data loader

service full cache

data loader

BIGDATABASE

operational relief

scales infinitely

performance gain

Page 70: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Can you keep it in memory yourself?

webapp

webapp load

bal

ance

r

load

bal

ance

r

service full cache

data loader

service full cache

data loader

service full cache

data loader

BIGDATABASE

operational relief

scales infinitely

performance gain

consistency problems

Page 71: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Fixing Consistency

webapp

load

bal

ance

r

service full cache

data loader

deployment cell

service full cache

data loaderwebapp

webapp service full cache

data loader

Page 72: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Fixing Consistency

webapp

load

bal

ance

r

service full cache

data loader

deployment cell

service full cache

data loaderwebapp

webapp service full cache

data loader

1. Deployment “Cells”2. Sticky user sessions

Page 73: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

credit: http://www.fruitshare.ca/wp-content/uploads/2011/08/car-full-of-apples.jpeg

How do you fit all of that data into memory?

Page 74: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

"Programmers waste enormous amounts of time thinking about, or worrying about, the speed of

noncritical parts of their programs, and these attempts at efficiency actually have a strong negative

impact when debugging and maintenance are considered.

!We should forget about small efficiencies, say about

97% of the time: premature optimization is the root of all evil. Yet we should not pass up our

opportunities in that critical 3%.”!

Donald Knuth

Page 75: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

How do you fit allthat data in memory?

Page 76: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The Answer

1 2 3 4 5

Page 77: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Domain Model Design

“Domain Layer (or Model Layer): !Responsible for representing concepts of the business, information about the business situation, and business rules. State that reflects the business situation is controlled and used here, even though the technical details of storing it are delegated to the infrastructure. This layer is the heart of business software.” !

Eric Evans, Domain-Driven Design, 2003

1 2 3 4 5

Page 78: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Domain Model Design Guidelines

http://alloveralbany.com/images/bumper_gawking_dbgeek.jpg

Page 79: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Domain Model Design Guidelines

#1 Keep it immutable

http://alloveralbany.com/images/bumper_gawking_dbgeek.jpg

Page 80: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Domain Model Design Guidelines

#1 Keep it immutable

#2 Use independent hierarchies

http://alloveralbany.com/images/bumper_gawking_dbgeek.jpg

Page 81: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Domain Model Design Guidelines

#1 Keep it immutable

#2 Use independent hierarchies

Help! I am in the trunk!

#3 Optimize Data

http://alloveralbany.com/images/bumper_gawking_dbgeek.jpg

Page 82: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

intern()your immutables

V1

A

C

B D

E

V2

F

B’

C’

E’

K1

K2

D’

E’

V1

A

C

B

D

EV2

F

K1

K2

Page 83: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

private  final  Map<Class<?>,  Map<Object,  WeakReference<Object>>>  cache  =           new  ConcurrentHashMap<Class<?>,  Map<Object,  WeakReference<Object>>>(); !public  <T>  T  intern(T  o)  {   if  (o  ==  null)     return  null;   Class<?>  c  =  o.getClass();   Map<Object,  WeakReference<Object>>  m  =  cache.get(c);   if  (m  ==  null)       cache.put(c,  m  =  synchronizedMap(new  WeakHashMap<Object,  WeakReference<Object>>()));   WeakReference<Object>  r  =  m.get(o);   @SuppressWarnings("unchecked")     T  v  =  (r  ==  null)  ?  null  :  (T)  r.get();   if  (v  ==  null)  {     v  =  o;     m.put(v,  new  WeakReference<Object>(v));   }       return  v; }

Page 84: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Use Independent Hierarchies

Product id = … title= …

Offers

Specifications

Description

Reviews

Rumors

Model History

Product Summary productId = …

Offers productId = …

Specifications productId = …

Description productId = …

Reviews productId = …

Rumors productId = …

Model History productId = …

Product Info

Page 85: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Collection Optimization1 3 4 52

Page 86: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Leverage Primitive Keys/Values

Trove (“High Performance Collections for Java”)

collection with 10,000 elements [0 .. 9,999] size in memory

java.util.ArrayList<Integer> 200K

java.util.HashSet<Integer> 546K

gnu.trove.list.array.TIntArrayList 40K

gnu.trove.set.hash.TIntHashSet 102K

Page 87: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Optimize

class  ImmutableMap<K,  V>  implements  Map<K,V>,  Serializable  {  ...  }  !class  MapN<K,  V>  extends  ImmutableMap<K,  V>  {     final  K  k1,  k2,  ...,  kN;     final  V  v1,  v2,  ...,  vN;   @Override  public  boolean  containsKey(Object  key)  {       if  (eq(key,  k1))  return  true;       if  (eq(key,  k2))  return  true;       ...         return  false;   }   ...

Collections with small number of entries (up to ~20):

small immutable collections

Page 88: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Space Savings

java.util.HashMap: !

128 bytes + 32 bytes per entry!

!

compact immutable map: !

24 bytes + 8 bytes per entry

Page 89: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Numeric Data Optimization

1 2 53 4

Page 90: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Price History Example

Page 91: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Example: Price

History

Problem: • Store daily prices for 1M

products, 2 offers per product• Average price history length per

product ~2 years!Total price points: (1M + 2M) * 730 = ~2 billion

Page 92: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Price History

First attempt

TreeMap<Date,  Double>  !

88 bytes per entry * 2 billion = ~180 GB

Page 93: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Typical Shopping Price Historypr

ice

days0 20 60 70 90 100 120 121

$100

Page 94: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Typical Shopping Price Historypr

ice

days0 20 60 70 90 100 120 121

$100

Page 95: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Typical Shopping Price Historypr

ice

days0 20 60 70 90 100 120 121

$100

Page 96: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Run Length Encoding

a a a a a a b b b c c c c c c

6 a 3 b 6 c

Page 97: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Price History Optimization

• Drop pennies• Store prices in primitive short (use scale factor to represent prices

greater than Short.MAX_VALUE)

-20 100 -40 150 -10 140 -20 100 -10 0 -20 100 90 -9 80

Memory: 15 * 2 + 16 (array) + 24 (start date) + 4 (scale factor) = 74 bytes

!• positive: price (adjusted to scale) • negative: run length (precedes price) • zero: unavailable

Page 98: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Space Savings

Reduction compared to TreeMap<Date,  Double>:

155 timesEstimated memory for 2 billion price points:

1.2 GB

Page 99: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Space Savings

Reduction compared to TreeMap<Date,  Double>:

155 timesEstimated memory for 2 billion price points:

1.2 GB << 180 GB

Page 100: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

public  class  PriceHistory  {!   private  final  Date  startDate;  //  or  use  org.joda.time.LocalDate     private  final  short[]  encoded;   private  final  int  scaleFactor;!   public  PriceHistory(SortedMap<Date,  Double>  prices)  {  …  }  //  encode     public  SortedMap<Date,  Double>  getPricesByDate()  {  …  }  //  decode     public  Date  getStartDate()  {  return  startDate;  }!   //  Below  computations  implemented  directly  against  encoded  data   public  Date  getEndDate()  {  …  }     public  Double  getMinPrice()  {  …  }   public  int  getNumChanges(double  minChangeAmt,  double  minChangePct,  boolean  abs)  {  …  }   public  PriceHistory  trim(Date  startDate,  Date  endDate)  {  …  }   public  PriceHistory  interpolate()  {  …  }

Price History Model

Page 101: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Know Your Data

Page 102: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Compress text

1 2 3 4 5

Page 103: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

String Compression:

static  Charset  UTF8  =  Charset.forName("UTF-­‐8");  !String  s  =  "The  quick  brown  fox  jumps  over  the  lazy  dog”;  //  42  chars,  136  bytesbyte[]  b  a=  "The  quick  brown  fox  jumps  over  the  lazy  dog”.getBytes(UTF8);  //  64  bytesString  s1  =  “Hello”;  //  5  chars,  64  bytesbyte[]  b1  =  “Hello”.getBytes(UTF8);  //  24  bytes!byte[]  toBytes(String  s)  {  return  s  ==  null  ?  null  :  s.getBytes(UTF8);  }String  toString(byte[]  b)  {  return  b  ==  null  ?  null  :  new  String(b,  UTF8);  }

byte arrays• Use the minimum character set encoding

Page 104: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

• Great for URLs

public  class  PrefixedString  {   private  PrefixedString  prefix;   private  byte[]  suffix; !   .  .  .   !   @Override  public  int  hashCode()  {  …  }   @Override  public  boolean  equals(Object  o)  {  …  } }

String Compression:shared prefix

Page 105: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

public abstract class AlphaNumericString { public static AlphaNumericString make(String s) { try { return new Numeric(Long.parseLong(s, Character.MAX_RADIX)); } catch (NumberFormatException e) { return new Alpha(s.getBytes(UTF8)); } } protected abstract String value(); @Override public String toString() {return value(); } private static class Numeric extends AlphaNumericString { long value; Numeric(long value) { this.value = value; } @Override protected String value() { return Long.toString(value, Character.MAX_RADIX); } @Override public int hashCode() { … } @Override public boolean equals(Object o) { … } } private static class Alpha extends AlphaNumericString { byte[] value; Alpha(byte[] value) {this.value = value; } @Override protected String value() { return new String(value, UTF8); } @Override public int hashCode() { … } @Override public boolean equals(Object o) { … } } }

short alphanumeric case-insensitive stringsString Compression:

Page 106: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

String Compression: Large Strings

Image source:https://www.facebook.com/note.php?note_id=80105080079image

Page 107: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

String Compression: Large Strings

Gzip

Become the master of your

strings!

Image source:https://www.facebook.com/note.php?note_id=80105080079image

Page 108: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

String Compression: Large Strings

Gzip

bzip2

Become the master of your

strings!

Image source:https://www.facebook.com/note.php?note_id=80105080079image

Page 109: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

String Compression: Large Strings

Gzip

bzip2 Just convert to byte[] first,

then compress

Become the master of your

strings!

Image source:https://www.facebook.com/note.php?note_id=80105080079image

Page 110: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

1 2 3 4 5

Page 111: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

Image srouce: http://foro-cualquiera.com

Page 112: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

make sure to use compressed pointers

(-XX:+UseCompressedOops)

Image srouce: http://foro-cualquiera.com

Page 113: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

make sure to use compressed pointers

(-XX:+UseCompressedOops)use low pause GC (Concurrent Mark

Sweep, G1)

Image srouce: http://foro-cualquiera.com

This s#!% is heavy!

Page 114: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

make sure to use compressed pointers

(-XX:+UseCompressedOops)use low pause GC (Concurrent Mark

Sweep, G1)

Overprovision heap by ~30%

Adjust generation sizes/ratios

Image srouce: http://foro-cualquiera.com

This s#!% is heavy!

Page 115: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

Page 116: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

Page 117: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

Print garbage collection

Page 118: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

JVM Tuning

Print garbage collection

If GC pauses still prohibitive then

consider partitioning

Page 119: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

In summary

Page 120: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Know your Business

Page 121: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Know your data

Page 122: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Know when to optimize

Page 123: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

The End!

My company: https://popforms.com My website: http://katemats.com

!!And much of the credit for this talk goes to Leon Stein for developing the technology. Thank you, Leon.

Page 124: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

How do you load the data?

Page 125: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading

webapp

webapp

lo a d b al a n c er

service full cache

data loader

service full cache

data loader

service full cache

data loader

webappreliable file store (S3)

“cooked” datasets

Page 126: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading tips & tricks

Page 127: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading tips & tricks

Final datasets should be compressed and

stored (i.e. S3)

Page 128: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading tips & tricks

Final datasets should be compressed and

stored (i.e. S3)

Keep the format simple (CSV, JSON)

Help! I am in the trunk!

Page 129: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading tips & tricks

Final datasets should be compressed and

stored (i.e. S3)

Keep the format simple (CSV, JSON)

Poll for updates

Poll frequency ==

data inconsistency threshold

Help! I am in the trunk!

Page 130: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading Time Sensitivity

Page 131: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading:low time Sensitivity Data

/tax-rates

/date=2012-05-01

tax-rates.2012-05-01.csv.gz

/date=2012-06-01

tax-rates.2012-06-01.csv.gz

/date=2012-07-01

tax-rates.2012-07-01.csv.gz

Page 132: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading:medium/high time

Sensitivity/prices

/date=2012-07-01price-obs.2012-07-01.csv.gz

/date=2012-07-02

/full

/date=2012-07-01

2012-07-01T00-10-00.csv.gz

/inc

2012-07-01T00-20-00.csv.gz

Page 133: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Swap

Cache Loading Strategy

Image src:http://static.fjcdn.com/pictures/funny_22d73a_372351.jpg

Page 134: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Swap

Cache Loading Strategy

Cache is immutable, so no locking is

required

Image src:http://static.fjcdn.com/pictures/funny_22d73a_372351.jpg

Page 135: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Swap

Cache Loading Strategy

Cache is immutable, so no locking is

required

Works well for infrequently

updated data sets

meow

And for datasets that need to be refreshed

each update

Image src:http://static.fjcdn.com/pictures/funny_22d73a_372351.jpg

Page 136: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading Strategy: CRUD

http://www.lostwackys.com/wacky-packages/WackyAds/capn-crud.htm

Page 137: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading Strategy: CRUD

Deletions can be tricky

YARRRRRR!

http://www.lostwackys.com/wacky-packages/WackyAds/capn-crud.htm

Page 138: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading Strategy: CRUD

Deletions can be tricky

Avoid full synchronization

YARRRRRR!

http://www.lostwackys.com/wacky-packages/WackyAds/capn-crud.htm

Page 139: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache Loading Strategy: CRUD

Deletions can be tricky

Avoid full synchronization

YARRRRRR!

Consider loading cache in small batches. Use one container per

partition

http://www.lostwackys.com/wacky-packages/WackyAds/capn-crud.htm

Page 140: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Concurrent Locking with Trove Map

public class LongCache<V> { private TLongObjectMap<V> map = new TLongObjectHashMap<V>(); private ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); private Lock r = lock.readLock(), w = lock.writeLock(); public V get(long k) { r.lock(); try { return map.get(k); } finally { r.unlock(); } } public V update(long k, V v) { w.lock(); try { return map.put(k, v); } finally { w.unlock(); } } public V remove(long k) { w.lock(); try { return map.remove(k); } finally { w.unlock(); } }}

Page 141: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading optimizations

Page 142: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading optimizations

Keep local copies

Periodically generate serialized

data/state

I am “cooking” the data sets.

Ha!

Page 143: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Cache loading optimizations

Keep local copies

Periodically generate serialized

data/state

Validate with CRC or hash

I am “cooking” the data sets.

Ha!

Page 144: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

service instanceproduct

summary

offers matching

predictions

service status

aggregator (servlet)

dependencies

load

bal

ance

r

health check

Dependent Caches

Page 145: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

service instanceproduct

summary

offers matching

predictions

service status

aggregator (servlet)

dependencies

load

bal

ance

r

health check

Dependent Caches

Page 146: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

service instanceproduct

summary

offers matching

predictions

service status

aggregator (servlet)

dependencies

load

bal

ance

r

health check

Dependent Caches

Page 147: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

service instanceproduct

summary

offers matching

predictions

service status

aggregator (servlet)

dependencies

load

bal

ance

r

health check

Dependent Caches

Page 148: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

service instanceproduct

summary

offers matching

predictions

service status

aggregator (servlet)

dependencies

load

bal

ance

r

health check

Dependent Caches

Page 149: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Deployment Cell Status

deployment cell

cell status aggregator

load

bal

ance

r

health check

webapp status

aggregator

service 1 status

aggregator

service 2 status

aggregator

HTTP or JMX

Page 150: Big Data - ACM Learning Center · Two kinds of data nicknames “user”, “transactional” “reference”, “non-transactional” examples: • user accounts • shopping cart/orders

Hierarchical Status Aggregation