Programming and architecture of NOSQL web at 33degree

44
Main sponsor Picasso Monet + Rembrandt Malczewski + Chelmonski Picasso Monet + Rembrandt Malczewski + Chelmonski Architecture and programming model for NOSQL web (Polish) Jarosław Pałka What's new in Java EE 6 Sang Shin Programming Clojure Venkat Subramaniam Play! framework: a revolution in the Java world Nicolas Leroux

description

Review of tricks, techniques and approaches for working with NOSQL databases.

Transcript of Programming and architecture of NOSQL web at 33degree

Page 1: Programming and architecture of NOSQL web at 33degree

Main sponsor

Picasso Monet + Rembrandt Malczewski + Chelmonski

Picasso Monet + Rembrandt Malczewski + Chelmonski

Architecture and programming model for NOSQL web (Polish)

Jarosław Pałka

What's new in Java EE 6Sang Shin

Programming Clojure

Venkat Subramaniam

Play! framework: a revolution in the

Java worldNicolas Leroux

Page 2: Programming and architecture of NOSQL web at 33degree

Poniższa prezentacja udostępniana jest w ramach licencji DHMB (Don't Hurt My Brain).

Prowadzący nie ponosi odpowiedzialności finansowej i moralnej za szkody wynikające z wzięcia zbyt serio zawartości tej prezentacji.

Wliczając w to trwałe uszkodzenia neuronów, obniżenie aktywności neuroprzekaźników na

poziomie molekularnym oraz grupowe zwolnienia z pracy.

Page 3: Programming and architecture of NOSQL web at 33degree

Programming and architecture model for NOSQL

web4Developers, Warszawa 2011

Page 4: Programming and architecture of NOSQL web at 33degree

O mnie

● Administrator, programista, architekt, eksperymentalny manager

● Niespełniony autor http://primitive.jogger.pl oraz https://bitbucket.org/kcrimson/

● Po godzinach NOSQL, REST i JavaScript „funboy”

● Członek Stowarzyszenie Software Engineering Professionals Polska

Page 5: Programming and architecture of NOSQL web at 33degree
Page 6: Programming and architecture of NOSQL web at 33degree

Dziś w menu

● Trzy tezy, czyli drobiny przemyśleń i doświadczenia

● Jak to działa, czyli prawie na żywo kodowanie● Wózek z zakupami● Komentarze, oceny i chmury● Rekomendacje

● Wnioski i inne architektologiczne brednie● Brawa, pochwały oraz konstruktywne

komentarze

Page 7: Programming and architecture of NOSQL web at 33degree

Teza pierwsza

Im bliżej masz do bazy tym rzadziej będziesz

tam zaglądał

czyli

Make your data local

Page 8: Programming and architecture of NOSQL web at 33degree

Ścieżka krytyczna

Użytkownik Sieć Aplikacja Sieć Baza danych

Page 9: Programming and architecture of NOSQL web at 33degree

Samotność długodystansowca

● Cache sposobem na zmniejszenie dystansu do danych

● Osadzone (embedded) bazy danych w szczególnych przypadkach

● Jednak dystans na poziomie infrastruktury to nie wszystko

Page 10: Programming and architecture of NOSQL web at 33degree

Na jednej kartce formatu A4

Employee Address

Manager

City

Country

Project

Program

Page 11: Programming and architecture of NOSQL web at 33degree
Page 12: Programming and architecture of NOSQL web at 33degree
Page 13: Programming and architecture of NOSQL web at 33degree

Płaskie jest piękne

Page 14: Programming and architecture of NOSQL web at 33degree

Teza druga

Tyleż prawd ile par uszu do których ona dotarła

czyli

Put your data in right context

Page 15: Programming and architecture of NOSQL web at 33degree
Page 16: Programming and architecture of NOSQL web at 33degree

Wszyscy aktorzy na scenę

● Różni aktorzy to nie tylko inne zachowania systemu

● To także inna perspektywa w spojrzeniu na dane

● To także inny sposób wyszukiwania danych

● Czy w takiej sytuacji jeden wspólny model nadal ma sens?

Page 17: Programming and architecture of NOSQL web at 33degree

Dla użytkownika

● Zamówienie● Produkty● Cena● Status realizacji

Page 18: Programming and architecture of NOSQL web at 33degree

Dla pracowników sklepu

● Zamówienie● Numery identyfikacyjne produktów● Lokazalizacja produktów w magazynach● Status płatności● Typ przesyłki

Page 19: Programming and architecture of NOSQL web at 33degree

Dla pracowników marketingu

● Zamówienie● Wiek zamawiającego● Miejsce zamieszkania● Miejsce pracy● Średni dochód miesięczny● „Direct” czy „refferal”

Page 20: Programming and architecture of NOSQL web at 33degree

Jeden, by wszystkimi rządzić, jeden, by wszystkie

odnaleźć,Jeden, by wszystkie

zgromadzić i w ciemności związać

W krainie Mordor, gdzie zaległy cienie.

Page 21: Programming and architecture of NOSQL web at 33degree

Teza trzecia

Pan szuka czy błądzi?

czyli

Store vs search

Page 22: Programming and architecture of NOSQL web at 33degree

Tradycyjne spojrzenie

Dane

Zapytania

Page 23: Programming and architecture of NOSQL web at 33degree

Po drugiej stronie lustra

Zapytania

Dane

Page 24: Programming and architecture of NOSQL web at 33degree

Witajcie w naszym sklepie

● Wózek z zakupami● Komentarze, tagi i oceny w chmurze● Rekomendacje

Page 25: Programming and architecture of NOSQL web at 33degree

Cały stos technologii

Wicket

Spring

DAO

Hades

EntityManager

Hibernate

Page 26: Programming and architecture of NOSQL web at 33degree

Wózek z zakupami

Page 27: Programming and architecture of NOSQL web at 33degree

Wszyscy aktorzy na scenę

● Każdy użytkownik w danym momencie posiada jeden wózek z zakupami,

● Raz użyty wózek wyjeżdza na śmietnik a klient zabiera swoje zakupy do domu,

● Zawartość wózka jest niewspółmiernie częsciej przeglądana niż aktualizowana

Page 28: Programming and architecture of NOSQL web at 33degree

Duże jest piękne tylko w naturze

ShoppingCart

OrderItem quantity

Product price

Album title

Artist name

ShoppingCart

ShoppingCartItemquantityproductPricealbumTitleartistName

Page 29: Programming and architecture of NOSQL web at 33degree

Nauka która nie idzie w las

● Oddzielmy ziarna od plew,● Rozdzielne problemy to rozdzielne domeny● Obiekty z rozdzielnych domen nic nie wiedzą

o sobie● Korzystajmy z #ID oraz #IDREF● Luźnie wiązanie danych

● Transakcyjne kontra nietransakcyjne● Utrzymuj te światy z dala od siebie

Page 30: Programming and architecture of NOSQL web at 33degree

Cały stos technologii

Wicket

Spring

DAO

Hades

EntityManager

Hibernate

Key value store

Page 31: Programming and architecture of NOSQL web at 33degree

Komentarze, tagi i oceny w chmurze

Page 32: Programming and architecture of NOSQL web at 33degree

Każdy ma prawo do wypowiedzi

● Komentarze, tagi i oceny mają pomóc użytkownikom podjąć decyzję

● Raz zapisane pozostaja niezmienne w systemie

● Budowanie statystyk, trendów oraz rekomendacji

Page 33: Programming and architecture of NOSQL web at 33degree

Cały stos technologii

Wicket

Spring

DAO

Hades

EntityManager

Hibernate

Key value store Document store

Page 34: Programming and architecture of NOSQL web at 33degree

Jedna Pani drugiej Pani

Page 35: Programming and architecture of NOSQL web at 33degree

... na kiedy to będzie?

● Co kupili inni?● A co kupili Ci co inni kupili● A może jeszcze albumy oznaczone tymi

samymi tag’ami● I do tego albumy wydane w tej samej

wytwórni● ... I co jeszcze marketingowi przyjdzie do

głowy

Page 36: Programming and architecture of NOSQL web at 33degree

Na pożółkłej kartce papieru

Page 37: Programming and architecture of NOSQL web at 33degree
Page 38: Programming and architecture of NOSQL web at 33degree

Cały stos technologii

Wicket

Spring

DAO

Hades

EntityManager

Hibernate

Key value store Document store Graph database

Page 39: Programming and architecture of NOSQL web at 33degree

Cały stos technologii

Wicket

Spring

DAO

Hades

EntityManager

Hibernate

Spring data

Key value store Document store Graph database

Page 40: Programming and architecture of NOSQL web at 33degree

O co w tym wszystkim chodzi?

● To nie tylko szybkość i wydajność● To nie tylko skalowalność i insze inszości● NOSQL to także zaawansowane indeksy

jako uzupełnienie dla RDBMS● „Giętkie” vs „skostniałe” struktury danych● „Ludzkie” oblicze API dla programistów

Page 41: Programming and architecture of NOSQL web at 33degree

Wnioski architektologiczne

● albowiem przedwczesna optymalizacja u źródeł zła wszelkiego więc nie idź zbyt wcześnie w NOSQL kolego

● uważaj co mierzysz i jako bardzo w to wierzysz

● jeden wspólny model to przeżytek i wielu klęsk początek

Page 42: Programming and architecture of NOSQL web at 33degree

Store

Long time

Sophisticated queries

Immutable

Search

Limited time

Fast access

Mutable

Page 43: Programming and architecture of NOSQL web at 33degree

Garść informacji

● http://primitive.jogger.pl

● https://bitbucket.org/kcrimson

● nosql-web● nosql-cart● nosql-tags● nosql-recommendations

● http://nosql.mypopescu.com/

● http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html

Page 44: Programming and architecture of NOSQL web at 33degree

Main sponsor

Picasso Monet + Rembrandt Malczewski + Chelmonski

Picasso Monet + Rembrandt Malczewski + Chelmonski

So you think agile software development and building houses have nothing in common...

Wojciech Seliga

Practical Guide to using REST for SOA

Stefan Tilkov

Five years of change, no outages

Steve Freeman

Monitoring 10 Critical Code Quality Metrics with SonarMatthew McCullough