Más contenido relacionado La actualidad más candente (20) Similar a (SDD424) Simplifying Scalable Distributed Applications Using DynamoDB Streams | AWS re:Invent 2014 (20) Más de Amazon Web Services (20) (SDD424) Simplifying Scalable Distributed Applications Using DynamoDB Streams | AWS re:Invent 20143. use cases
Online
gaming
Ad tech
Livevoting
Social
media
Mobile
messaging
Backup & restore
@akshatvig 9. Op: PUT
John
Tokyo
Op: UPDATE
John
Pluto
Op: UPDATE
John
Mars
Logsand databases
Name
Destination
Tokyo
Mars
@akshatvig 11. Logs arepowerful.
Atomicity, consistency, and durability
Replication
Point-in-time restores
Materialized views
Auditing
And much more...
@akshatvig 23. Cross region replication
Shard 1
Partition 1
Shard 2
Shard 3
Partition 2
KCL Worker
KCL Worker
KCL Worker
@akshatvig 24. Cross region replication
Partition 1
Partition 2
Partition 3
Partition 4
Partition 5
Shard 1
Shard 2
Shard 3
Shard 4
KCL
Worker
KCL
Worker
KCL
Worker
KCL
Worker
@akshatvig 30. Data Tier
Amazon
DynamoDB
Amazon
RDS
Amazon
ElastiCache
Amazon
S3
Amazon
CloudSearch
Amazon
Redshift
archive
rich search
read replicas
hot reads
analytics
complex queries
& transactions
purpose
@akshatvig
32. View Type
Destination
Old Image –Before update
Name= John, Destination = Mars
New Image –After update
Name = John,Destination = Pluto
Old and New Images
Name = John,Destination = Mars
Name = John, Destination = Pluto
Keys Only
Name = Johntypes
@akshatvig 36. Durability & high availability
High throughput consensus protocol
Replicated across multiple AZs
@akshatvig 42. Consuming AWSDynamoDBstreamsAdapterClient adapterClient = newAWSDynamoDBstreamsAdapterClient(streamsCredentials,.. ); .. AmazonDynamoDBClient dynamoDBClient = newAmazonDynamoDBClient(dynamoDBCredentials, ..); .. KinesisClientLibConfiguration workerConfig = newKinesisClientLibConfiguration(..,streamId, streamsCredentials,..) .withMaxRecords(100) .withInitialPositionInStream(InitialPositionInStream.TRIM_HORIZON); Worker worker = newWorker(recordProcessorFactory,workerConfig,adapterClient, dynamoDBClient,..); Thread t =newThread(worker); t.start();
@akshatvig 43. Consuming AWSDynamoDBstreamsAdapterClient adapterClient = newAWSDynamoDBstreamsAdapterClient(streamsCredentials,.. ); .. AmazonDynamoDBClient dynamoDBClient = newAmazonDynamoDBClient(dynamoDBCredentials, ..); .. KinesisClientLibConfiguration workerConfig = newKinesisClientLibConfiguration(..,streamId, streamsCredentials,..) .withMaxRecords(100) .withInitialPositionInStream(InitialPositionInStream.TRIM_HORIZON); Worker worker = newWorker(recordProcessorFactory,workerConfig,adapterClient, dynamoDBClient,..); Thread t =newThread(worker); t.start();
@akshatvig 44. Consuming AWSDynamoDBstreamsAdapterClient adapterClient = newAWSDynamoDBstreamsAdapterClient(streamsCredentials,.. ); .. AmazonDynamoDBClient dynamoDBClient = newAmazonDynamoDBClient(dynamoDBCredentials, ..); .. KinesisClientLibConfiguration workerConfig = newKinesisClientLibConfiguration(..,streamId, streamsCredentials,..) .withMaxRecords(100) .withInitialPositionInStream(InitialPositionInStream.TRIM_HORIZON); Worker worker = newWorker(recordProcessorFactory,workerConfig,adapterClient, dynamoDBClient,..); Thread t =newThread(worker); t.start();
@akshatvig 45. Consuming AWSDynamoDBstreamsAdapterClient adapterClient = newAWSDynamoDBstreamsAdapterClient(streamsCredentials,.. ); .. AmazonDynamoDBClient dynamoDBClient = newAmazonDynamoDBClient(dynamoDBCredentials, ..); .. KinesisClientLibConfiguration workerConfig = newKinesisClientLibConfiguration(..,streamId, streamsCredentials,..) .withMaxRecords(100) .withInitialPositionInStream(InitialPositionInStream.TRIM_HORIZON); Worker worker = newWorker(recordProcessorFactory,workerConfig,adapterClient, dynamoDBClient,..); Thread t =newThread(worker); t.start();
@akshatvig 46. Processingpublic class StreamsRecordProcessorimplementsIRecordProcessor { .. @Overridepublic void processRecords(List<Record>records,.. ){ for(Record record :records){ if (record instanceofRecordAdapter){ Record ddbStreamRecord =((RecordAdapter) record).getInternalObject(); switch(ddbStreamRecord.getEventName()){ case"INSERT":case"MODIFY": DemoHelper.putItem(dynamoDBClient,tableName, ddbStreamRecord.getDynamodb().getNewImage()); break; ...
@akshatvig 47. Processingpublic class StreamsRecordProcessorimplementsIRecordProcessor { .. @Overridepublic void processRecords(List<Record>records,.. ){ for(Record record :records){ if (record instanceofRecordAdapter){ Record ddbStreamRecord =((RecordAdapter) record).getInternalObject(); switch(ddbStreamRecord.getEventName()){ case"INSERT":case"MODIFY": DemoHelper.putItem(dynamoDBClient,tableName, ddbStreamRecord.getDynamodb().getNewImage()); break; ...
@akshatvig 48. Processingpublic class StreamsRecordProcessorimplementsIRecordProcessor { .. @Overridepublic void processRecords(List<Record>records,.. ){ for(Record record :records){ if (record instanceofRecordAdapter){ Record ddbStreamRecord =((RecordAdapter) record).getInternalObject(); switch(ddbStreamRecord.getEventName()){ case"INSERT":case"MODIFY": DemoHelper.putItem(dynamoDBClient,tableName, ddbStreamRecord.getDynamodb().getNewImage()); break; ...
@akshatvig 49. Processingpublic class StreamsRecordProcessorimplementsIRecordProcessor { .. @Overridepublic void processRecords(List<Record>records,.. ){ for(Record record :records){ if (record instanceofRecordAdapter){ Record ddbStreamRecord =((RecordAdapter) record).getInternalObject(); switch(ddbStreamRecord.getEventName()){ case"INSERT":case"MODIFY": DemoHelper.putItem(dynamoDBClient,tableName, ddbStreamRecord.getDynamodb().getNewImage()); break; ...
@akshatvig 53. Preview available
Temporary endpoints: N. Virginia & Ireland
Available until global launch
Registerfor preview at http://amzn.to/11dh9M0
@akshatvig 57. Please give us your feedback on this session.
Complete session evaluations and earn re:Invent swag.
http://bit.ly/awsevals