• No results found

There and Back Again As Quick As a Flash

N/A
N/A
Protected

Academic year: 2021

Share "There and Back Again As Quick As a Flash"

Copied!
40
0
0

Loading.... (view fulltext now)

Full text

(1)

There and Back Again

As Quick As a Flash

Stefan Winkler

Independent Software Developer and IT Consultant

CDO Committer

(2)

CDO in a nutshell

Server

Client

Client

Client

Storage

(3)

CDO in a nutshell

Server

Client

Client

Client

Storage

(4)

CDO in a nutshell

Server

Client

Client

Client

Storage

CDOID attribute reference CDOID
(5)

CDO in a nutshell

Server

Client

Client

Client

Storage

CDOID attribute reference CDOID
(6)

CDO in a nutshell

Server

Client

Client

Client

Storage

CDOID attribute reference CDOID
(7)

Storage

CDO in a nutshell

Server

Client

Client

Client

Storage

CDOID attribute reference CDOID
(8)

Storage

CDO in a nutshell

Server

Client

Client

Client

Storage

attribute reference CDOID attribute reference
(9)

Storage

CDO in a nutshell

Server

Client

Client

Client

Storage

attribute reference CDOID CDOID attribute reference
(10)

Storage

CDO in a nutshell

Server

Client

Client

Client

Storage

attribute reference CDOID CDOID attribute reference
(11)

Storage

CDO in a nutshell

Server

Client

Client

Client

Storage

attribute reference CDOID CDOID attribute reference
(12)

Storage

CDO in a nutshell

Server

Client

Client

Client

Storage

attribute reference CDOID CDOID attribute reference
(13)

Layers

App

Logic

CDO

Client

EMF

Model

CDO

Server

IStore

Code

Storage

(14)

App

Logic

CDO

Client

EMF

Model

CDO

Server

IStore

Code

Storage

(15)

Choose the

Right Storage!

MEM DB (h2 in-proc) DB (h2 net) DB (MySQL) Hibernate (MySQL) MongoDB (net) DB4O (in-proc) 1.701 519.063 22.314 9.381 4.269 1.287 1.121

time to read 10,000 objects (msec)

2.268 1.503 10.151 6.686 5.546 766 283

(16)

Choose the

Right Storage!

Store

Usage Scenarios

Pros

Cons

MEMStore prototyping, testing supports all CDO features not persistent

DBStore common/default solution supports all CDO features DB selection and tuning adds to complexity HibernateStore custom DB schema required custom DB schema and mapping only supports subset of CDO features, slower MongoDB Store fast writing speeds requiredNo SQL DB wanted, fast writing speeds slow reading speeds,limited commit size

DB4OStore fast reading speeds requiredNo SQL DB wanted, fast reading speeds slower writing speedsdual licence ObjectivityStore OODB with commercial performance not commercial licence,

(17)

Choose the Right

Database!

h2 (net) MySQL (net) PostgreSQL (net) 4.231 9.381 4.269

time to read 10,000 objects

6.606 6.686 5.546

(18)

Choose the Right

Database!

h2 (net) MySQL (net) PostgreSQL (net) 4.231 9.381 4.269

time to read 10,000 objects

6.606 6.686 5.546

time to write 10,000 objects (msec)

Standard Configurations !!!

(19)

App

Logic

CDO

Client

EMF

Model

CDO

Server

IStore

Code

Storage

(20)

Choose the Right

Repository Mode

Time

v1 v2 v3 v4 v5 v6 v7

Audit Mode

(21)

Choose the Right

Repository Mode

Time

v1 v2 v3 v4 v5 v6 v7

Non-Audit Mode

(22)

Choose the Right

Repository Mode

Time

0:v1 v2 v3 v4

v5 v6

Branching Mode

1:v1

2:v1

1:v2

2:v2 2:v3

(23)

Choose the Right

DBStore Mapping!

date

sum

Order

date

sum

Product

date

sum

Product

number

price

Product

Order Order Order Order

id version date sum

1 2 3/29/12 102.34

Product Product Product Product

id version number price

2 2 1-423-4 39.12 3 2 1-485-3 60.71 4 2 1-584-2 2.51 Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id version index value

non-audit repo mode

no historic („audit“) views

(24)

Choose the Right

DBStore Mapping!

Order Order Order Order

id version date sum

1 2 3/29/12 102.34

Product Product Product Product

id version number price

2 2 1-423-4 39.12 3 2 1-485-3 60.71 4 2 1-584-2 2.51 Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id version index value

1 2 0 2

1 2 1 3

audit repo mode

classic

always writes complete list

range-based

(25)

Choose the Right

DBStore Mapping!

Order Order Order Order

id version date sum

1 2 3/29/12 102.34

Product Product Product Product

id version number price

2 2 1-423-4 39.12 3 2 1-485-3 60.71 4 2 1-584-2 2.51

audit repo mode

classic

always writes complete list

range-based

writes deltas

Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id from to index value

1 1 null 0 2

1 1 1 1 4

1 2 null 1 3

(26)

Choose the Right

DBStore Mapping!

branching repo mode

classic vs. range-based

copy-lazy (default) vs. copy-on-branch

Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

1 1 1 null 0 2

1 1 1 1 1 4

1 1 2 null 1 3

(27)

Choose the Right

DBStore Mapping!

branching repo mode

classic vs. range-based

copy-lazy (default) vs. copy-on-branch

Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

1 1 1 null 0 2 1 1 1 1 1 4 1 1 2 null 1 3 1 1 1 1 2 3 Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

(28)

Choose the Right

DBStore Mapping!

branching repo mode

classic vs. range-based

copy-lazy (default) vs. copy-on-branch

Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

1 1 1 null 0 2 1 1 1 1 1 4 1 1 2 null 1 3 1 1 1 1 2 3 Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

(29)

Choose the Right

DBStore Mapping!

branching repo mode

classic vs. range-based

copy-lazy (default) vs. copy-on-branch

Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

1 1 1 null 0 2

1 1 1 1 1 4

1 1 2 null 1 3

(30)

Choose the Right

DBStore Mapping!

branching repo mode

classic vs. range-based

copy-lazy (default) vs. copy-on-branch

Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

1 1 1 null 0 2 1 1 1 1 1 4 1 1 2 null 1 3 1 1 1 1 2 3 Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List Order_Product_List

id branch from to index value

1 2 1 null 0 2 1 2 1 null 1 5 1 2 1 null 2 4

(31)

Choose the Right

DBStore Mapping!

2.250 4.500 6.750 9.000 721 1.491 1.481 688 4.581 1.473 1.483 736 8.941 1.506 1.442 681

time to insert 100 objects at beginning

time to insert 100 objects in the middle

time to insert 100 objects at the end

(32)

App

Logic

CDO

Client

EMF

Model

CDO

Server

IStore

Code

Storage

(33)

Choose the Right

Transport Layer!

CDO Client CDO Server CDO Client CDO Server Computer 1 Computer 2

TCP (true client/server)

TCP (same computer)

JVM (same JVM)

(34)

A Word On

Caching

Revision Caches in CDO

use Soft references

Caches grow until memory

limit is reached

View Cache can be

configured to use strong or

weak references instead

CDO

Client

CDO

Server

View Cache (Soft Ref) Session Cache (Soft Ref) Repository Cache (Soft Ref)
(35)

App

Logic

CDO

Client

EMF

Model

CDO

Server

IStore

Code

Storage

(36)

Choose the Right

Model Configuration!

Native Reflective Legacy 11.302 8.882 8.581

time to read 100,000 objects

4.460 3.076

2.802

(37)

App

Logic

CDO

Client

EMF

Model

CDO

Server

IStore

Code

Storage

(38)

Make Use of

CDO Loading Policies!

Lazy Collection Loading

session.options().setCollectionLoadingPolicy(

       CDOUtil.createCollectionLoadingPolicy(

               /*  initial  =  */  5,  /*  onResolve  =  */  5));

Explicit Prefetching

CDOObject  fromCDO  =  getMyObjectFromCDO();

fromCDO.cdoPrefetch(/*  depth  =  */  3);

Prefetching by Policy

(39)

Leftovers

Things I did not talk about

unordered collections

store queries (use with caution!)

(40)

Summary

Choose the Right Storage!

Choose the Right Database!

Choose the Right Repository Mode!

Choose the Right DBStore Mapping!

Choose the Right Transport Layer!

Choose the Right Model Configuration!

References

Related documents

Collects personal information and simplify managing the foreign key is only if the schema name, provide high quality blog post message envelope structure collection of dbo schema

Because the schema fails for me what version has the performance schema could set up roundcube should work for upgrading for your pc or updating.. How you Install Roundcube Webmail

The db explore execute binaries to empower your taxonomy for servicedesk plus db schema objects to any change template available. At

•  Features –  Storage (data, DB) –  Push notifications –  Usage analytics –  Dashboard/UI –  Social integration –  User administration. –  Custom

Sample your email with mongo sandbox document create schema create a model that process as a database means the model immediately in a way for data.. physical properties of lemon

If there are a few lecturers with a Salary >70, a clustered index on FkDepartment can be more useful!. SELECT

Click next at least one specified schema is sql server db designer is an existing databases you can create db schema sql server resource and extensive planning for.. All products

Analyze past data and subschema in db uses a question and that is the original schema design and the size of text.. Nice and jury to generate xml specifications of the differences