This session, we go deep into advanced design patterns for DynamoDB. This session is intended for those who already have some familiarity with DynamoDB and are interested in applying the design patterns covered in the DynamoDB deep dive session and hands-on labs for DynamoDB. The patterns and data models discussed in this presentation summarize a collection of implementations and best practices leveraged by the Amazon CDO to deliver highly scaleable solutions for a wide variety of business problems. In this session, we discuss strategies for GSI sharding and index overloading, scaleable graph processing with materialized queries, relational modeling with composite keys, executing transactional workflows on DynamoDB, and much, much more.
60. • Partition table on node ID, add
edges to define adjacency list
• Define a default edge for every
node type to describe the node
itself
• Use partitioned GSIs to query large
nodes (dates, places, etc.)
• Use Dynamo DB
Streams/Lambda/EMR for graph
query projections
• Neighbor entity state
• Subtree aggregations
• Breadth first search
• Node ranking
Adjacency lists and materialized graphs
GSI Primary Key Attributes
GSIkey Data Target Type Node Projection
0-N
Jason Bourne 1
Person
1 …
James John Doe 4 4 …
20170418 2
Birthdate
1 …
4 …
Date 2 …
Finland 3
Birthplace
1 …
4 …
Place 3 …
GSI Primary Key Attributes
GSIkey Type Target Data Node Projection
0-N
Person
1 Jason Bourne 1 …
4 John Doe 4 …
Birthdate 2 20170418
1 …
4 …
Birthplace 3 Finland
1 …
4 …
Date 2 20170418 2 …
Place 3 Finland 3 …
Table Primary Key Attributes
Node Type Target Data GSIkey Projection
1
Person 1 Jason Bourne
HASH(Person.Data)
Edge/spanning
tree rollups
Birthdate 2 20170418
Birthplace 3 Finland
2 Date 2 20170418
HASH(Data) (Summary Stats)
3 Place 3 Finland
4
Person 4 John Doe
HASH(Person.Data
Edge/spanning
tree rollups
Birthdate 2 20170418
Birthplace 3 Finland