Slide 1

Slide 1 text

Otavio Santana @otaviojava NoSQL design pitfalls with Java member of KI group

Slide 2

Slide 2 text

Otavio Santana @otaviojava Staff Engineer ● Java Champion ● JCP-EC-EG-EGL ● Apache Committer ● Eclipse Committer ● Eclipse Project Leader ● Book and blog writer Speaker

Slide 3

Slide 3 text

What it is not!

Slide 4

Slide 4 text

● “New research shows 75% of ‘open’ Redis servers infected” ● The Twelve Factor App NoSecurity

Slide 5

Slide 5 text

● Schemaless ● Validation No Data integrity

Slide 6

Slide 6 text

● Complexity ● Maintain No Responsibility

Slide 7

Slide 7 text

● The right questions ● Horizontal vs Vertical ● Write vs Read Scalability??

Slide 8

Slide 8 text

● Benchmark ● CAP theorem No-mistake

Slide 9

Slide 9 text

● CAP theorem ● Backup No-Trade-off

Slide 10

Slide 10 text

● SQL ● NewSQL ● NoSQL No-single-solution

Slide 11

Slide 11 text

Model

Slide 12

Slide 12 text

● Key ● Biggest mistakes ● View Modeling

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

What Apache Cassandra is not

Slide 15

Slide 15 text

● Big Data ● Rich Query ● Relational Cassandra

Slide 16

Slide 16 text

● Key ○ Partition Key ○ Clustering Key ● Secondary Key ● Allow Filtering Queries

Slide 17

Slide 17 text

● List ● Map ● Tuple ● UDT Cassandra Powers

Slide 18

Slide 18 text

● Load Balancer ● Consistency Level ALL ● Backup Troy

Slide 19

Slide 19 text

Sample @Entity public class Contact { @Id private String name; @Column private LocalDate birthday; @Column private Map details; } ● Map ● UDT

Slide 20

Slide 20 text

Sample @Entity class Car { @Id private String plate; @Column private String city; @Column private String color; @UDT("owner") @Column private Owner owner; } ● UDT

Slide 21

Slide 21 text

Sample @Entity public class Recipe { @Id private String name; @Column private String city; @Column @UDT("ingredient") private Set ingredients; } ● Set ● UDT

Slide 22

Slide 22 text

MongoDB

Slide 23

Slide 23 text

● Transaction ● ACID What MongoDB is not

Slide 24

Slide 24 text

“In a relational database, we usually model the schema at the very beginning of the project. Why is this so bad? Because the beginning of the project is exactly the moment that we know least about it” Oren Eini - Modeling in a Non Relational World

Slide 25

Slide 25 text

● Coherence ● Independence ● Isolation DDD - Elemar Jr

Slide 26

Slide 26 text

● Self Sufficient ● Business Coherence

Slide 27

Slide 27 text

● Exist ● It does not need anyone Independence La liberté guidant le people (1830)

Slide 28

Slide 28 text

● Cannot impact another entity Isolation

Slide 29

Slide 29 text

● Entity ● Aggregate ● Value Object Sample @Entity public class Order { @Id private ObjectId id; @Column private LocalDateTime orderedAt; @Column private List items; @Column private Address shipTo; }

Slide 30

Slide 30 text

Cloud

Slide 31

Slide 31 text

● Containers ● Mutable ● Kubernetes ● Services Cloud

Slide 32

Slide 32 text

● Bean Validation ● ORM ● Reactive programming ● Impedance Java Frameworks

Slide 33

Slide 33 text

© xgeeks | 02/12/2020 33 Demo Time

Slide 34

Slide 34 text

xgeeks is changing the game in making things happen – giving on-demand capacity and bringing expertise filling skill gaps

Slide 35

Slide 35 text

What makes us strong We are bringing passion and eXpertise into the team. High Coding standards Reliable and proven processes and quality testing Continuous Innovation Senior/Junior split 1:2 enables room for innovation Integration in KI group Strong backing and steady exchange with experts Flexible work style Individual and flexible, fully acustomed to our clients

Slide 36

Slide 36 text

Thank you Otávio Santana Staff Engineer, Xgeeks Join us!! http://xgeeks.io/ @xgeeksio