1 / 12

DynamoDB w pigułce

DynamoDB w pigułce. Co to jest?. Baza typu key / tuple AWS hosting SSD HTTP API Eventaully consistent / strongly consistent reads SDK - .NET / Java / PHP / Python (boto ) Dev tools: standalone/VS/Ecplise. Tabele. Tabela 1 klucz do 5 LSI do 5 GSI Dowolna ilość atrybutów

Download Presentation

DynamoDB w pigułce

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DynamoDB w pigułce

  2. Co to jest? • Baza typu key / tuple • AWS hosting • SSD • HTTP API • Eventaully consistent / strongly consistent reads • SDK - .NET / Java / PHP / Python (boto) • Dev tools: standalone/VS/Ecplise

  3. Tabele • Tabela • 1 klucz • do 5 LSI • do 5 GSI • Dowolna ilość atrybutów • 1 wiersz: max 64kB • Deklarowana przepustowość • Atrybuty: string, number, binary • Set – dowlonego z tych 3 typów

  4. Klucze • HK – jeden unikalnyatrybut • Tabela Users • HK = userID • HK+RK – 2 atrybuty, atrybut pomocniczy, pozwala na sortowanie i pobieranie zakresów danych • Para HK/RK musi być unikalna • Tabela UserActivityLog • HK = userId • RK = timestamp

  5. Klucze • LSI – alternatywny atrybut RK • Tabela Thread • HK = ForumName • RK = Subject • LSI = ForumName + LastPostDate

  6. GSI – alternatywny HK+RK • Tabela GameScores • HK = UserId • RK = GameTitle • GSI = GameTitle + TopScore Klucze

  7. API • Get • Query • Scan • Put • Update (specyfika ADD, PUT, DELETE) • Conditionals • Delete • BatchWrite (put or delete, one or more tables!) • BatchGet (on or more tables!)

  8. Pros & Cons • Pros • Szybkość • Skalowalność • Hosting w AWS / dev tools • Konsola + alarmy • API • Cons • Koszt / przepusowość • $0.0065 / h / 10 units of Write Capactiy • $0.0065 / h / 50 units of Read Capacity • A unit of Write Capacity enables you to perform one write per second for items of up to 1KB in size. • A unit of Read Capacity enables you to perform one strongly consistent read per second (or two eventually consistent reads per second) of items of up to 4KB in size.

  9. Jak zacząć? • Pobranie i uruchomienie serwera (tutorial) • Otwarcie połączenia • varconfig = newAmazonDynamoDBConfig{ServiceURL="http://localhost:12345"}; • varclient = newAmazonDynamoDBClient("QWE", "XYZ", config); • Stworzenie tabeli • Low level API • Definicja klucza • Put / Update • Query/Scan

  10. Pytania ?

  11. Hackaton - zadanie • „Super Twitter” • Aplikacja webowa • Obserwowanie użytkowników • Budowanie feed’a • Hashatgi – lista postów zawierających tag • Inne pomysły?

  12. Hackaton – cheat sheet http://1drv.ms/1tOPoG3

More Related