Voyage The adventure of persisting object-models Wednesday, May 30, - - PowerPoint PPT Presentation

voyage
SMART_READER_LITE
LIVE PREVIEW

Voyage The adventure of persisting object-models Wednesday, May 30, - - PowerPoint PPT Presentation

Voyage The adventure of persisting object-models Wednesday, May 30, 12 A glimpse of Seaside Stateful Component model Maybe aged, but still the best :) Wednesday, May 30, 12 Continuations I still prefer: Wednesday, May 30, 12


slide-1
SLIDE 1

Voyage

The adventure of persisting object-models

Wednesday, May 30, 12

slide-2
SLIDE 2

A glimpse of Seaside

  • Stateful
  • Component model
  • Maybe aged, but still the best :)

Wednesday, May 30, 12

slide-3
SLIDE 3

Continuations

I still prefer:

Wednesday, May 30, 12

slide-4
SLIDE 4

Continuations

Over:

Wednesday, May 30, 12

slide-5
SLIDE 5

A glimpse of Pier

  • A CMS
  • Component based
  • You can embed almost anything
  • You can decorate almost anything

Wednesday, May 30, 12

slide-6
SLIDE 6

A perfect world

Wednesday, May 30, 12

slide-7
SLIDE 7

A perfect world

  • Objects collaborate inside your image,

creating a perfect choreography of interacting elements...

Wednesday, May 30, 12

slide-8
SLIDE 8

A perfect world

  • Objects collaborate inside your image,

creating a perfect choreography of interacting elements...

  • INSIDE your image

Wednesday, May 30, 12

slide-9
SLIDE 9

Why to persist?

  • Space
  • Reliability
  • Scalability

Wednesday, May 30, 12

slide-10
SLIDE 10

Persisting Pier

  • A complex* object model
  • Looking for
  • Scalability
  • Update capabilities
  • Backup

*And I mean really complex: take a look to all those commands, decorations and dictionaries :)

Wednesday, May 30, 12

slide-11
SLIDE 11

Show time!

Wednesday, May 30, 12

slide-12
SLIDE 12

Voyage

  • A “non-abstract” persistence layer
  • An “implementation pattern” which

provides some services as well

Wednesday, May 30, 12

slide-13
SLIDE 13

A simple layered approach

Voyage Memory Mongo ... MongoTalk Magritte- Mongo

Wednesday, May 30, 12

slide-14
SLIDE 14

Use cases

Singleton mode: Regular mode:

Wednesday, May 30, 12

slide-15
SLIDE 15

A simple API

  • #save:
  • #remove:
  • #removeAll:
  • #selectAll:
  • #selectMany:where:
  • #selectOne:where:

Wednesday, May 30, 12

slide-16
SLIDE 16

A simple API

  • #save:
  • #remove:
  • #removeAll:
  • #selectAll:
  • #selectMany:where:
  • #selectOne:where:

Where clauses are what the back-end needs, no something intermediate

Wednesday, May 30, 12

slide-17
SLIDE 17

A simple API

  • #save:
  • #remove:
  • #removeAll:
  • #selectAll:
  • #selectMany:where:
  • #selectOne:where:

Where clauses are what the back-end needs, no something intermediate Memory: [ :each | each key = 42 ]

Wednesday, May 30, 12

slide-18
SLIDE 18

A simple API

  • #save:
  • #remove:
  • #removeAll:
  • #selectAll:
  • #selectMany:where:
  • #selectOne:where:

Where clauses are what the back-end needs, no something intermediate Memory: [ :each | each key = 42 ] Mongo: { #key->42 } asDictionary

Wednesday, May 30, 12

slide-19
SLIDE 19

What Voyage provides

  • Common API
  • Centralized management
  • Preserve identity (caching live objects)
  • Error handling
  • Reconnection
  • Pluggable connection pool

Wednesday, May 30, 12

slide-20
SLIDE 20

Voyage-Memory

  • Is just a centralized dictionary of

collections.

  • Used for prototyping and early stages of

development (no need to choose a persistent repository at first instance)

  • Works for “stateless” applications which

need readonly data (I made one once, yes)

Wednesday, May 30, 12

slide-21
SLIDE 21

Voyage-Mongo

  • Uses MongoTalk
  • Adds
  • Object cache
  • Error handling/reconnection
  • Transparent mapping (magritte guided)

Wednesday, May 30, 12

slide-22
SLIDE 22

Magritte-Mongo

  • “Object-Document mapper”
  • Magritte base implementation is intended to UI

and there is some difference with mongo needs.

  • Explicit (static) declaration vs. dynamic type
  • inference. (i.e. Pier persistence is nearly

impossible with an explicit declaration approach)

  • I changed it a lot since Norbert saw him (more

and more inference... and still needs more)

Wednesday, May 30, 12

slide-23
SLIDE 23

Serializer

Wednesday, May 30, 12

slide-24
SLIDE 24

Serializer

Wednesday, May 30, 12

slide-25
SLIDE 25

Serializer

Wednesday, May 30, 12

slide-26
SLIDE 26

Serializer

  • Uses become, so yes, it is slow
  • So far, no need more speed.
  • Other possible approaches: Two phases

(mark and persist)

Wednesday, May 30, 12

slide-27
SLIDE 27

Status

✓First version working (make it work)

  • Need cleanup (make it right)
  • Need some optimization (make it fast)

Wednesday, May 30, 12

slide-28
SLIDE 28

Future

  • Finish it (collaborators would be fine :)
  • Add/Update some backends (Just if/when

needed)

  • Fuel
  • Phriak
  • Glorp?

Wednesday, May 30, 12

slide-29
SLIDE 29

Voyage and PierVoyage are available at: http://smalltalkhub.com/#!/~estebanlm/Voyage

Thanks!

Already a tester who is blogging about! http://articles.tulipemoutarde.be/

Wednesday, May 30, 12