Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering DynamoDB

You're reading from  Mastering DynamoDB

Product type Book
Published in Aug 2014
Publisher Packt
ISBN-13 9781783551958
Pages 236 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Tanmay Deshpande Tanmay Deshpande
Profile icon Tanmay Deshpande

Chapter 7. DynamoDB – Use Cases

Now we have seen all the core and important parts of DynamoDB. Now you must know what DynamoDB is, what the data model for it is, how DynamoDB actually works, what the best practices are, how to impose security, access controls on tables, and so on. In the previous chapter, we talked about integrating DynamoDB with various AWS components, such as S3, Redshift, EMR, and so on. Now I am sure you must have started thinking in terms of how to build an application using DynamoDB and what steps are involved in it. So in this chapter, we are going to see a couple of use cases that should give you an idea of what it takes to use DynamoDB as your application database.

In this chapter, we will consider the following two use cases:

  • A bookstore application

  • A knowledge market website (For example, Stack Overflow or Yahoo Answers)

Bookstore application


A bookstore application consists of a web portal where we will sell books online. This web application would allow users to search for books by name or the author's name, select and purchase books as per their choice, and pay for the books. This bookstore allows users to sign in using their Facebook, Google, and Amazon accounts.

Technology stack

Now that we have defined the problem statement, we will have to select the technology stack in order to go ahead with it. The following is the technology stack:

  • Programming language: Java

  • Database: DynamoDB

  • Search engine: AWS CloudSearch

  • Web server: Tomcat. This can be hosted on the AWS EC2 instance

  • Analytics: AWS EMR

Architecture

As we do in any software development life cycle, let's try to build the architecture diagram as follows for better understanding:

The previous diagram shows how we can connect different AWS and non-AWS components together. We will also use AWS Secure Token Service (STS), which we have seen in Chapter 5, Advanced...

Knowledge market website


A knowledge market website is a place where users can post questions to the community and look for answers. A question can be a part of one or more topics that can also be subscribed to by the individual users. A good example of such a website is www.StackOverflow.com, which many of us might already be using. Let's try to follow the same approach we did for our first use case.

Technology stack

The technology stack for this application is much the same as the previous one, except a few. Have a look at the following list:

  • Programming language: Java (you can choose your preferred language)

  • Database: DynamoDB

  • Web server: Tomcat (Tomcat can be hosted on the AWS EC2 instance)

  • Data Archiving: AWS S3

We can add other AWS components like SNS to send notifications to users if they see any activity on the question they had asked or answered.

Architecture

Now we will try to draw the architecture diagram for this application:

The previous diagram shows how the overall application functionality...

Summary


In this chapter, we talked about two sample use cases in which DynamoDB is being used as an application database. The purpose of this chapter was to give an idea to the readers about what approach one should follow in order to get DynamoDB into production. It is advised that one should try to understand the application development process and get started with actual application building.

Here, I have also tried to show how we can integrate various AWS services in order to have our complete application running on Cloud itself. The motive is to just give the idea and show the complete picture to you all; it would be great if you follow the referenced chapters thoroughly for implementation details.

In the next chapter, we are going to see various useful tools from AWS and third-party contributors. These tools are helpful for any DynamoDB developers and can be used/reused easily.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering DynamoDB
Published in: Aug 2014 Publisher: Packt ISBN-13: 9781783551958
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}