Ruby Rogues

RR 314 DynamoDB on Rails with Chandan Jhunjhunwal


Listen Later

RR 314 DynamoDB on Rails with Chandan JhunjhunwalToday's Ruby Rogues podcast features DynamoDB on Rails with Chandan Jhunjhunwal. DynamoDB is a NoSQL database that helps your team solve managing infrastructure issues like setup, costing and maintenance. Take some time to listen and know more about DynamoDB![00:02:18] – Introduction to Chandan JhunjhunwalChanchan Jhunjhunwal is an owner of Faodail Technology, which is currently helping many startups for their web and mobile applications. They started from IBM, designing and building scalable mobile and web applications. He mainly worked on C++ and DB2 and later on, worked primarily on Ruby on Rails.Questions for Chandan[00:04:05] – Introduction to DynamoDB on RailsI would say that majority of developers work in PostgreSQL, MySQL or other relational database. On the other hand, Ruby on Rails is picked up by many startup or founder for actually implementing their ideas and bringing them to scalable products. I would say that more than 80% of developers are mostly working on RDBMS databases. For the remaining 20%, their applications need to capture large amounts of data so they go with NoSQL.In NoSQL, there are plenty of options like MongoDB, Cassandra, or DynamoDB. When using AWS, there’s no provided MongoDB. With Cassandra, it requires a lot of infrastructure setup and costing, and you’ll have to have a team which is kind of maintaining it on a day to day basis. So DynamoDB takes all those pain out of your team and you no longer have to focus on managing the infrastructure.[00:07:35] – Is it a good idea to start with a regular SQL database and then, switch to NoSQL database or is it better to start with NoSQL database from day one?It depends on a couple of factors. For many of the applications, they start with RDBMS because they just want to get some access, and probably switch to something like NoSQL. First, you have to watch the incoming data and their capacity. Second is familiarity because most of the developers are more familiar with RDBMS and SQL queries.For example, you have a feed application, or a messaging application, where you know that there will be a lot of chat happening and you’d expect that you’re going to take a huge number of users. You can accommodate that in RDBMS but I would probably not recommend that.[00:09:30] Can I use DynamoDB as a caching mechanism or cache store?I would not say replacement, exactly. On those segments where I could see that there’s a lot of activity happening, I plugged in DynamoDB. The remaining part of the application was handled by RDBMS. In many applications, what I’ve seen is that they have used a combination of them.[00:13:05] How do you decide if you actually want to use DynamoDB for all the data in your system?The place where we say that this application is going to be picked from day one is where the number of data which will be coming will increase. It also depends on the development team that you have if they’re familiar with DynamoDB, or any other NoSQL databases.[00:14:50] Is DynamoDB has document store or do you have of columns?You can say key value pairs or document stores. The terminologies are just different and the way you design the database. In DynamoDB, you have something like hash key and range key.[00:22:10] – Why don’t we store images in the database?I would say that there are better places to store the, which is faster and cheaper. There are better storage like CDN or S3.Another good reason is that if you want to fetch a proper size of image based on the user devices screen, resizing and all of the stuff inside the database could be cumbersome. You’ll repeat adding different columns where we’ll be storing those different sizes of images.[00:24:40] – Is there a potentially good reason for NoSQL database as your default go-to data store?If you have some data, which is complete unstructured, if you try to store back in RDBMS, it will be a pain. If we talk about the kind of media which gets generated in our day to day life, if you try to model them in a relational database, it will be pretty painful and eventually, there will be a time when you don’t know how to create correlations.[00:28:30] – Horizontally scalable versus vertically scalableIn vertically scalable, when someone posts, we keep adding that at the same table. As we add data to the table, the database size increases (number of rows increases). But in horizontally scalable, we keep different boxes connected via Hadoop or Elastic MapReduce which will process the added data.[00:30:20] – What does it take to hook up a DynamoDB instance to a Rails app?We could integrate DynamoDB by using the SDK provided by AWS. I provided steps which I’ve outlined in the blog - how to create different kinds of tables, how to create those indexes, how to create the throughput, etc. We could configure AWS SDK, add the required credential, then we could create different kinds of tables.[00:33:00] – In terms of scaling, what is the limit for something like PostgreSQL or MySQL, versus DynamoDB?There’s no scalability limit in DynamoDB, or any other NoSQL solutions.PicksDavid Kimura            
  • CorgUI
Jason Swett     
  • Database Design for Mere Mortals
Charles Maxwood
  • VMWare Workstation
  • GoCD
  • Ruby Rogues Parley
  • Ruby Dev Summit
Chandan Jhunjhunwal     Special Guest: Chandan Jhunjhunwal.

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Become a supporter of this podcast: https://www.spreaker.com/podcast/ruby-rogues--6102073/support.
...more
View all episodesView all episodes
Download on the App Store

Ruby RoguesBy Charles M Wood

  • 4.5
  • 4.5
  • 4.5
  • 4.5
  • 4.5

4.5

45 ratings


More shows like Ruby Rogues

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

290 Listeners

The Ruby on Rails Podcast by Elise Shaffer

The Ruby on Rails Podcast

53 Listeners

Adventures in Angular by Charles M Wood

Adventures in Angular

33 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

236 Listeners

iPhreaks by Charles M Wood

iPhreaks

17 Listeners

React Native Radio by Jamon Holmgren, Robin Heinze, Mazen Chami

React Native Radio

67 Listeners

Nerdland Podcast by Lieven Scheire

Nerdland Podcast

54 Listeners

Adventures in Angular by Charles M Wood

Adventures in Angular

15 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

62 Listeners

Ruby Rogues by Charles M Wood

Ruby Rogues

21 Listeners

My Angular Story by Charles M Wood

My Angular Story

0 Listeners

My Ruby Story by Charles M Wood

My Ruby Story

0 Listeners

The Diary Of A CEO with Steven Bartlett by DOAC

The Diary Of A CEO with Steven Bartlett

8,451 Listeners

Remote Ruby by Chris Oliver, Andrew Mason

Remote Ruby

34 Listeners

Code with Jason by Jason Swett

Code with Jason

15 Listeners

Cautionary Tales with Tim Harford by Pushkin Industries

Cautionary Tales with Tim Harford

5,154 Listeners

The Rest Is History by Goalhanger

The Rest Is History

15,285 Listeners

The Ezra Klein Show by New York Times Opinion

The Ezra Klein Show

15,855 Listeners

The Rest Is Politics: Leading by Goalhanger

The Rest Is Politics: Leading

795 Listeners