Slide 1

Slide 1 text

Spring Data – nur noch eine API für SQL, NoSQL & ElasticSearch? Patrick Wolf | cosee [email protected]

Slide 2

Slide 2 text

CandyShop Recap @Entity public class Candy { @Id @GeneratedValue private long id; @Column(unique = true) private String name; private String brand; private int price; private int rating; }

Slide 3

Slide 3 text

Spring Data Recap (JPA) public interface CandyRepository extends PagingAndSortingRepository { Candy findById(long id); Page findByNameAndBrand(String name, String brand, Pageable pageable); Collection findByName(String name); Iterator findDistinctByBrand(String brand); Candy findFirstByBrandOrderByRatingAsc(String brand); ... }

Slide 4

Slide 4 text

JPA MongoDB Redis Solr Gemfire KeyValue REST Aerospike* Cassandra* Couchbase* Elasticsearch* Neo4J* * = Community modules Spring Data modules DynamoDB*

Slide 5

Slide 5 text

CandyShop-Erweiterung DynamoDB ● New Feature: CalorieMeter ● Wie viele Kalorien hat ein User gekauft? @DynamoDBTable(tableName = "CalorieMeter") public class CalorieMeterEntry { @DynamoDBHashKey private long userId; private String userName; @DynamoDBRangeKey private long candyId; private String candyName; public long caloriesTotal; }

Slide 6

Slide 6 text

DynamoDB in Kürze ● NoSQL database managed by AWS ● Key features: ● Einzelne Tabellen mit skalaren Werten, Dokumenten oder Wertemengen (Sets) anlegen ● Beliebiger (garantierter) Datendurchsatz ● Automatische Verteilung auf Availability Zones ● Neue URL für Sping Data DynamoDB Community Project: https://github.com/derjust/spring-data-dynamodb

Slide 7

Slide 7 text

Let‘s talk code

Slide 8

Slide 8 text

CandyShop-Erweiterung ElasticSearch ● New Feature: Candy-Suche (mit Vorschlägen)

Slide 9

Slide 9 text

ElasticSearch in Kürze ● Verteilte, sehr schnelle Echtzeit-Suchmachine ● Open-source und im Kern Apache Lucene ● Es werden Dokumente verwaltet und jedes Feld indiziert ● RESTful JSON API

Slide 10

Slide 10 text

Let‘s talk code

Slide 11

Slide 11 text

Nächster Talk ... Functional Programming in JavaScript September 2016 > talks.cosee.biz > blog.cosee.biz