SlideShare a Scribd company logo
SqueakSave
               An Automatic Object-Relational Mapping Framework

                                  Thomas Kowark
                                  Robert Hirschfeld
                                   Michael Haupt

                            Software Architecture Group
                           Hasso-Plattner-Institut Potsdam
                            www.hpi.uni-potsdam.de/swa


lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                                        Outline




             •       motivation
             •       basic usage
             •       framework architecture
             •       performance
             •       summary & outlook




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   2
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                      Available Persistence Approaches




             • image storing
             • object databases
             • (object-)relational persistence




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   3
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                            SqueakSave – Project Goals




             • automatic mapping deduction
             • simplistic API
             • seamless integration into existing applications




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   4
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                               Guiding Example
ual Paradigm for UML Community Edition [not for commercial use]
                      User                                                    +blog   1                 Blog
-email : string                                                                             -title : string
-username : string                                                                          -lastUpdate : dateTime
-password : string                                                +administeredBlogs 0..*

                             0..*   +followers
                                                                                                   1
                                                                                                  0..*      +blogPosts
                                                                                                      BlogPost
                              1                                                             -title : string
                                  Author                                                    -text : string
                                              1
                                                                                                   1

                                                                                                  0..*      +comments
                                                                                                     Comment
                                  Admin                                                     -author : string
                                             1..*                                           -title : string
                                                                                            -text : string




 Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                                       5
 lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                        API – Configuration

                 • configuration based on naming conventions
                     SqsConfig subclass: #BlogExampleSqsConfig
                          instanceVariableNames: ''
                          classVariableNames: ''
                          poolDictionaries: ''
                          category: 'BlogExample'

                     BlogExampleSqsConfig
                     class>>#connectionSpecification
                          ^ SqsMySQLConnectionSpecification
                                user: 'admin'
                                password: 'password'
                                database: 'blog_example_db'

Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   6
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                   API – Basic Operations


                     author := Author new
                         password: 'password';
                         username: 'testuser';
                         email: 'user@example.org'.

                     author blog: (Blog new title: 'My Blog').

                     author save.

                     ...

                     author destroy.


Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   7
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                               API – Queries

           (SqsSearch for: User) detect: [:aUser |
               aUser username = 'testuser']

           (SqsSearch for: Author) select: [:anAuthor |
               anAuthor blog blogPosts size > 10 ]

           (SqsSearch for: Blog) anySatisfy: [:aBlog |
                aBlog blogPosts noneSatisfy: [:aBlogPost |
                    aBlogPost comments isEmpty ] ]

           (SqsSearch for: Blog) findByTitle: 'testblog'

           (SqsSearch for: Comment)
               findByAuthor: 'author' andTitle: 'comment'.

Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   8
lundi 31 août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                      currentClass
                         1                        1



                                         SqueakSave – Architecture
                                        instVarValue

        SqsBase                  0..*                                   SqsConnection
                                   SqsProxy
                                                                   SqsConnectionManager


                  +classInfo     SqsClassInfo     1
                             1

                   +session       SqsSession      1                                         <<use>>

                             1
                                                                  dbAdapter      1
                                                                     SqsDatabaseAdapter
 ler      SqsDescriptionHandler

   1                                      <<use>>
                                                                                     0..*
                                                                          0..1        connection
 uctureHandler        SqsTableStructureHandler                     SqsDatabaseConnection

              1




 ure 4.1: Overview of SqueakSave System Classes.


me into the separate sub words and connects them with an underscore. A
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                   9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                       currentClass
                         1                         1



                                          SqueakSave – Architecture
                                         instVarValue

        SqsBase                  0..*   anObject save                   SqsConnection
                                   SqsProxy
                                                                   SqsConnectionManager


                  +classInfo     SqsClassInfo      1
                             1

                   +session       SqsSession       1                                        <<use>>

                             1
                                                                  dbAdapter      1
                                                                     SqsDatabaseAdapter
 ler      SqsDescriptionHandler

   1                                       <<use>>
                                                                                     0..*
                                                                          0..1        connection
 uctureHandler        SqsTableStructureHandler                     SqsDatabaseConnection

              1




 ure 4.1: Overview of SqueakSave System Classes.


me into the separate sub words and connects them with an underscore. A
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                   9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                        currentClass
                         1                          1



                                           SqueakSave – Architecture
                                          instVarValue

        SqsBase                  0..*                                    SqsConnection
                                   SqsProxy
                                                                    SqsConnectionManager


                  +classInfo     SqsClassInfo       1
                             1

                                  SqsSession                                                 <<use>>
                   +session
                                        Creation 1or fetching of
                             1
                                        unique SqsStorage          dbAdapter      1

 ler      SqsDescriptionHandler         wrapper instance              SqsDatabaseAdapter

   1                                        <<use>>
                                                                                      0..*
                                                                           0..1        connection
 uctureHandler        SqsTableStructureHandler                      SqsDatabaseConnection

              1




 ure 4.1: Overview of SqueakSave System Classes.


me into the separate sub words and connects them with an underscore. A
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                    9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                      currentClass
                         1                        1



                                         SqueakSave – Architecture
                                        instVarValue

        SqsBase                  0..*                                       SqsConnection
                                   SqsProxy
                                                                       SqsConnectionManager


                  +classInfo     SqsClassInfo     1
                             1

                   +session       SqsSession      1                                             <<use>>

                             1
                                                                      dbAdapter      1
                                                                         SqsDatabaseAdapter
 ler      SqsDescriptionHandler

   1                                      <<use>>
                                                                                         0..*
                                                                              0..1        connection
 uctureHandler        SqsTableStructureHandler                         SqsDatabaseConnection

              1                                                  Creation or update of
                                                                 mapping descriptions

 ure 4.1: Overview of SqueakSave System Classes.


me into the separate sub words and connects them with an underscore. A
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                       9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                      currentClass
                         1                        1



                                         SqueakSave – Architecture
                                        instVarValue

        SqsBase                  0..*                                   SqsConnection
                                   SqsProxy
                                                                   SqsConnectionManager


                  +classInfo     SqsClassInfo     1
                             1

                   +session       SqsSession      1                                         <<use>>

                             1
                                                                  dbAdapter      1
                                                                     SqsDatabaseAdapter
 ler      SqsDescriptionHandler

   1                                      <<use>>
                                                                                     0..*
                                                                          0..1        connection
 uctureHandler        SqsTableStructureHandler                     SqsDatabaseConnection

              1




 ure 4.1: Overview of SqueakSave System Classes.

      Calculation of changes to
me into the separatedatabase and connects them with an underscore. A
      the relational sub words
      schema
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                   9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                      currentClass
                         1                        1



                                         SqueakSave – Architecture
                                        instVarValue

        SqsBase                  0..*                                   SqsConnection
                                   SqsProxy
                                                                   SqsConnectionManager


                  +classInfo     SqsClassInfo     1
                             1

                   +session       SqsSession      1                                         <<use>>

                             1                                                                        Connection pooling
                                                                  dbAdapter      1
                                                                     SqsDatabaseAdapter
 ler      SqsDescriptionHandler

   1                                      <<use>>
                                                                                     0..*
                                                                          0..1        connection
 uctureHandler        SqsTableStructureHandler                     SqsDatabaseConnection

              1




 ure 4.1: Overview of SqueakSave System Classes.


me into the separate sub words and connects them with an underscore. A
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                                        9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
or commercial use]
   SqueakSave: An Automatic Object-Relational Mapping Framework
                             Class
                       class                      currentClass
                         1                        1



                                         SqueakSave – Architecture
                                        instVarValue

        SqsBase                  0..*                                   SqsConnection
                                   SqsProxy
                                                                   SqsConnectionManager


                  +classInfo     SqsClassInfo     1
                             1

                   +session       SqsSession      1                                         <<use>>

                             1
                                                                  dbAdapter      1
                                                                     SqsDatabaseAdapter
 ler      SqsDescriptionHandler

   1                                      <<use>>
                                                                                     0..*
                                                                          0..1        connection
 uctureHandler        SqsTableStructureHandler                     SqsDatabaseConnection
                                                                                                      Schema update and
              1
                                                                                                      object insertion or update


 ure 4.1: Overview of SqueakSave System Classes.


me into the separate sub words and connects them with an underscore. A
me’, for example, is thereby converted to the column name ‘user name’.
  Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                                                9
vide31simple compatibility with most other O/R mappers for dynamic
 lundi août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']

                         queryObject := SqsQueryObject new
                          depictedClass: User.
                         result := aBlock value: queryObject.

Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']

                         The query object does not know what #username
                         does, but generates the SQL to scope to the
                         respective column.

Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']


                      WHERE users.username


Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']

                         The result of the first call is an SqsQueryString.
                         It knows how to map the #= to SQL properly.


Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']


                      WHERE users.username =


Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                              Query Analysis


                 • SQL statement generation through block execution
                   with placeholder objects
                 • one placeholder class per ‘simple type’,
                   SqsQueryObject and SqsQueryCollection for
                   complex cases

                     (SqsSearch for: User) detect: [:aUser |
                         aUser username = 'testuser']


                      WHERE users.username = ‘testuser’


Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   10
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                                    Evaluation




                 • evaluation based on OO7 benchmark
                     – CAD application data structure
                     – complex object model with many cyclic dependencies
                 • set of queries with increasing complexity
                 • number of traversals of an object graph
                 • comparison with GLORP




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   11
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                         Evaluation – Query Performance




                 • approx. 20% slower than GLORP
                 • two exceptions
                     – caching mechanism (10x slower)
                      (SqsSearch for: SqsAtomicPart) detect:
                          [:ap | ap oid = id].

                     – query creation with joins (1/3x faster)

            (SqsSearch for: SqsBaseAssembly) select: [:ba |
                ba unsharedParts anySatisfy: [:part |
                    part document = id ]].

Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   12
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                      Evaluation – Traversal Performance
            Traversal 1                   Traversal 2a
                                                     6s


                                                     5s


                                                     3s


                                                     2s


                                                     0s
SqueakSave                GLORP                                SqueakSave               GLORP



           Traversal 2b                                                  Traversal 2c
                                                    24s


                                                    18s

                 – missing eager loading                              – minimal intrusion into object
                   (n+1 queries problem)            12s                 models (only collection proxies)
                                                     6s


                                                     0s
SqueakSave                GLORP                                SqueakSave               GLORP
Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009                          13
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                     Summary and Outlook



             • simple usage & setup
                     – integration into existing applications almost seamless
             • automatic deduction of database structures




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   14
lundi 31 août 2009
SqueakSave: An Automatic Object-Relational Mapping Framework




                                     Summary and Outlook



             • simple usage & setup
                     – integration into existing applications almost seamless
             • automatic deduction of database structures

             • possible extensions
                     – SqueakDBX usage
                     – eager loading
                     – performance optimizations




Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009   14
lundi 31 août 2009

More Related Content

Viewers also liked

La Visitación - Rafael Sanzio de Urbino
La Visitación - Rafael Sanzio de UrbinoLa Visitación - Rafael Sanzio de Urbino
La Visitación - Rafael Sanzio de Urbino
manutebolo
 
How denmark powers its Future
How denmark powers its Future How denmark powers its Future
How denmark powers its Future
Lola Sanchez
 
Redaccion y Publicidad
Redaccion y PublicidadRedaccion y Publicidad
Redaccion y Publicidad
qkcabezon
 
Presentació treball de síntesi(1)
Presentació treball de síntesi(1)Presentació treball de síntesi(1)
Presentació treball de síntesi(1)
mjvercher
 
Sitio do Picapau Amarelo
Sitio do Picapau AmareloSitio do Picapau Amarelo
Sitio do Picapau Amarelo
IedaSantana
 
Ud6 sistemas de transmision y frenado
Ud6 sistemas de transmision y frenadoUd6 sistemas de transmision y frenado
Ud6 sistemas de transmision y frenado
Jose Crisol Martinez
 

Viewers also liked (20)

7. Proyecto - Valoro y convivo sanamente
7. Proyecto - Valoro y convivo sanamente7. Proyecto - Valoro y convivo sanamente
7. Proyecto - Valoro y convivo sanamente
 
YOGA Y AYURVEDA PARA LA PAZ
YOGA Y AYURVEDA PARA LA PAZYOGA Y AYURVEDA PARA LA PAZ
YOGA Y AYURVEDA PARA LA PAZ
 
Tomo 1 derecho comparado latinoamericano
Tomo 1 derecho comparado latinoamericanoTomo 1 derecho comparado latinoamericano
Tomo 1 derecho comparado latinoamericano
 
077989
077989077989
077989
 
La Visitación - Rafael Sanzio de Urbino
La Visitación - Rafael Sanzio de UrbinoLa Visitación - Rafael Sanzio de Urbino
La Visitación - Rafael Sanzio de Urbino
 
Presentacion linux ubuntu 11.10
Presentacion linux ubuntu 11.10 Presentacion linux ubuntu 11.10
Presentacion linux ubuntu 11.10
 
How denmark powers its Future
How denmark powers its Future How denmark powers its Future
How denmark powers its Future
 
PD lecture Atnc
PD lecture AtncPD lecture Atnc
PD lecture Atnc
 
Crystal Fund Presentation
Crystal Fund PresentationCrystal Fund Presentation
Crystal Fund Presentation
 
02 – Vectores y Cinemática en una dimensión docentes (1)
02 – Vectores y Cinemática en una  dimensión docentes (1)02 – Vectores y Cinemática en una  dimensión docentes (1)
02 – Vectores y Cinemática en una dimensión docentes (1)
 
Local area network (1)
Local area network (1)Local area network (1)
Local area network (1)
 
Redaccion y Publicidad
Redaccion y PublicidadRedaccion y Publicidad
Redaccion y Publicidad
 
Presentació treball de síntesi(1)
Presentació treball de síntesi(1)Presentació treball de síntesi(1)
Presentació treball de síntesi(1)
 
Potenciometro
PotenciometroPotenciometro
Potenciometro
 
Transocean offshore operation 6
Transocean   offshore operation 6Transocean   offshore operation 6
Transocean offshore operation 6
 
Cartel estructura
Cartel estructuraCartel estructura
Cartel estructura
 
Sitio do Picapau Amarelo
Sitio do Picapau AmareloSitio do Picapau Amarelo
Sitio do Picapau Amarelo
 
Sinergia
SinergiaSinergia
Sinergia
 
Ud6 sistemas de transmision y frenado
Ud6 sistemas de transmision y frenadoUd6 sistemas de transmision y frenado
Ud6 sistemas de transmision y frenado
 
Araling Panlipunan Grade 8 Aralin 1 - Heograpiyang to Heograpiyang Pantao
Araling Panlipunan Grade 8 Aralin 1 - Heograpiyang to Heograpiyang PantaoAraling Panlipunan Grade 8 Aralin 1 - Heograpiyang to Heograpiyang Pantao
Araling Panlipunan Grade 8 Aralin 1 - Heograpiyang to Heograpiyang Pantao
 

Similar to SqueakSave An Automatic Object-Relational Mapping Framework

Gae icc fall2011
Gae icc fall2011Gae icc fall2011
Gae icc fall2011
Juan Gomez
 
Archetype autoplugins
Archetype autopluginsArchetype autoplugins
Archetype autoplugins
Mark Schaake
 

Similar to SqueakSave An Automatic Object-Relational Mapping Framework (20)

descriptive programming
descriptive programmingdescriptive programming
descriptive programming
 
Haxe for Flash Platform developer
Haxe for Flash Platform developerHaxe for Flash Platform developer
Haxe for Flash Platform developer
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Distributed Realtime Computation using Apache Storm
Distributed Realtime Computation using Apache StormDistributed Realtime Computation using Apache Storm
Distributed Realtime Computation using Apache Storm
 
Apache Storm 0.9 basic training - Verisign
Apache Storm 0.9 basic training - VerisignApache Storm 0.9 basic training - Verisign
Apache Storm 0.9 basic training - Verisign
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Love Your Command Line
Love Your Command LineLove Your Command Line
Love Your Command Line
 
A Comparative Analysis of Task Modeling Notations
A Comparative Analysis of Task Modeling NotationsA Comparative Analysis of Task Modeling Notations
A Comparative Analysis of Task Modeling Notations
 
Gae icc fall2011
Gae icc fall2011Gae icc fall2011
Gae icc fall2011
 
Drilling the Async Library
Drilling the Async LibraryDrilling the Async Library
Drilling the Async Library
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
 
Apache Kafka - Scalable Message Processing and more!
Apache Kafka - Scalable Message Processing and more!Apache Kafka - Scalable Message Processing and more!
Apache Kafka - Scalable Message Processing and more!
 
Odessapy2013 - Graph databases and Python
Odessapy2013 - Graph databases and PythonOdessapy2013 - Graph databases and Python
Odessapy2013 - Graph databases and Python
 
NEW LAUNCH! Introducing AWS Batch: Easy and efficient batch computing on Amaz...
NEW LAUNCH! Introducing AWS Batch: Easy and efficient batch computing on Amaz...NEW LAUNCH! Introducing AWS Batch: Easy and efficient batch computing on Amaz...
NEW LAUNCH! Introducing AWS Batch: Easy and efficient batch computing on Amaz...
 
Archetype autoplugins
Archetype autopluginsArchetype autoplugins
Archetype autoplugins
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Extensible RESTful Applications with Apache TinkerPop
Extensible RESTful Applications with Apache TinkerPopExtensible RESTful Applications with Apache TinkerPop
Extensible RESTful Applications with Apache TinkerPop
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
C++ Boot Camp Part 2
C++ Boot Camp Part 2C++ Boot Camp Part 2
C++ Boot Camp Part 2
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
ESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
ESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 

SqueakSave An Automatic Object-Relational Mapping Framework

  • 1. SqueakSave An Automatic Object-Relational Mapping Framework Thomas Kowark Robert Hirschfeld Michael Haupt Software Architecture Group Hasso-Plattner-Institut Potsdam www.hpi.uni-potsdam.de/swa lundi 31 août 2009
  • 2. SqueakSave: An Automatic Object-Relational Mapping Framework Outline • motivation • basic usage • framework architecture • performance • summary & outlook Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 2 lundi 31 août 2009
  • 3. SqueakSave: An Automatic Object-Relational Mapping Framework Available Persistence Approaches • image storing • object databases • (object-)relational persistence Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 3 lundi 31 août 2009
  • 4. SqueakSave: An Automatic Object-Relational Mapping Framework SqueakSave – Project Goals • automatic mapping deduction • simplistic API • seamless integration into existing applications Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 4 lundi 31 août 2009
  • 5. SqueakSave: An Automatic Object-Relational Mapping Framework Guiding Example ual Paradigm for UML Community Edition [not for commercial use] User +blog 1 Blog -email : string -title : string -username : string -lastUpdate : dateTime -password : string +administeredBlogs 0..* 0..* +followers 1 0..* +blogPosts BlogPost 1 -title : string Author -text : string 1 1 0..* +comments Comment Admin -author : string 1..* -title : string -text : string Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 5 lundi 31 août 2009
  • 6. SqueakSave: An Automatic Object-Relational Mapping Framework API – Configuration • configuration based on naming conventions SqsConfig subclass: #BlogExampleSqsConfig instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'BlogExample' BlogExampleSqsConfig class>>#connectionSpecification ^ SqsMySQLConnectionSpecification user: 'admin' password: 'password' database: 'blog_example_db' Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 6 lundi 31 août 2009
  • 7. SqueakSave: An Automatic Object-Relational Mapping Framework API – Basic Operations author := Author new password: 'password'; username: 'testuser'; email: 'user@example.org'. author blog: (Blog new title: 'My Blog'). author save. ... author destroy. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 7 lundi 31 août 2009
  • 8. SqueakSave: An Automatic Object-Relational Mapping Framework API – Queries (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] (SqsSearch for: Author) select: [:anAuthor | anAuthor blog blogPosts size > 10 ] (SqsSearch for: Blog) anySatisfy: [:aBlog | aBlog blogPosts noneSatisfy: [:aBlogPost | aBlogPost comments isEmpty ] ] (SqsSearch for: Blog) findByTitle: 'testblog' (SqsSearch for: Comment) findByAuthor: 'author' andTitle: 'comment'. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 8 lundi 31 août 2009
  • 9. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 +session SqsSession 1 <<use>> 1 dbAdapter 1 SqsDatabaseAdapter ler SqsDescriptionHandler 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection 1 ure 4.1: Overview of SqueakSave System Classes. me into the separate sub words and connects them with an underscore. A me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 10. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* anObject save SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 +session SqsSession 1 <<use>> 1 dbAdapter 1 SqsDatabaseAdapter ler SqsDescriptionHandler 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection 1 ure 4.1: Overview of SqueakSave System Classes. me into the separate sub words and connects them with an underscore. A me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 11. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 SqsSession <<use>> +session Creation 1or fetching of 1 unique SqsStorage dbAdapter 1 ler SqsDescriptionHandler wrapper instance SqsDatabaseAdapter 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection 1 ure 4.1: Overview of SqueakSave System Classes. me into the separate sub words and connects them with an underscore. A me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 12. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 +session SqsSession 1 <<use>> 1 dbAdapter 1 SqsDatabaseAdapter ler SqsDescriptionHandler 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection 1 Creation or update of mapping descriptions ure 4.1: Overview of SqueakSave System Classes. me into the separate sub words and connects them with an underscore. A me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 13. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 +session SqsSession 1 <<use>> 1 dbAdapter 1 SqsDatabaseAdapter ler SqsDescriptionHandler 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection 1 ure 4.1: Overview of SqueakSave System Classes. Calculation of changes to me into the separatedatabase and connects them with an underscore. A the relational sub words schema me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 14. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 +session SqsSession 1 <<use>> 1 Connection pooling dbAdapter 1 SqsDatabaseAdapter ler SqsDescriptionHandler 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection 1 ure 4.1: Overview of SqueakSave System Classes. me into the separate sub words and connects them with an underscore. A me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 15. or commercial use] SqueakSave: An Automatic Object-Relational Mapping Framework Class class currentClass 1 1 SqueakSave – Architecture instVarValue SqsBase 0..* SqsConnection SqsProxy SqsConnectionManager +classInfo SqsClassInfo 1 1 +session SqsSession 1 <<use>> 1 dbAdapter 1 SqsDatabaseAdapter ler SqsDescriptionHandler 1 <<use>> 0..* 0..1 connection uctureHandler SqsTableStructureHandler SqsDatabaseConnection Schema update and 1 object insertion or update ure 4.1: Overview of SqueakSave System Classes. me into the separate sub words and connects them with an underscore. A me’, for example, is thereby converted to the column name ‘user name’. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 9 vide31simple compatibility with most other O/R mappers for dynamic lundi août 2009
  • 16. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 17. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] queryObject := SqsQueryObject new depictedClass: User. result := aBlock value: queryObject. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 18. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] The query object does not know what #username does, but generates the SQL to scope to the respective column. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 19. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] WHERE users.username Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 20. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] The result of the first call is an SqsQueryString. It knows how to map the #= to SQL properly. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 21. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] WHERE users.username = Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 22. SqueakSave: An Automatic Object-Relational Mapping Framework Query Analysis • SQL statement generation through block execution with placeholder objects • one placeholder class per ‘simple type’, SqsQueryObject and SqsQueryCollection for complex cases (SqsSearch for: User) detect: [:aUser | aUser username = 'testuser'] WHERE users.username = ‘testuser’ Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 10 lundi 31 août 2009
  • 23. SqueakSave: An Automatic Object-Relational Mapping Framework Evaluation • evaluation based on OO7 benchmark – CAD application data structure – complex object model with many cyclic dependencies • set of queries with increasing complexity • number of traversals of an object graph • comparison with GLORP Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 11 lundi 31 août 2009
  • 24. SqueakSave: An Automatic Object-Relational Mapping Framework Evaluation – Query Performance • approx. 20% slower than GLORP • two exceptions – caching mechanism (10x slower) (SqsSearch for: SqsAtomicPart) detect: [:ap | ap oid = id]. – query creation with joins (1/3x faster) (SqsSearch for: SqsBaseAssembly) select: [:ba | ba unsharedParts anySatisfy: [:part | part document = id ]]. Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 12 lundi 31 août 2009
  • 25. SqueakSave: An Automatic Object-Relational Mapping Framework Evaluation – Traversal Performance Traversal 1 Traversal 2a 6s 5s 3s 2s 0s SqueakSave GLORP SqueakSave GLORP Traversal 2b Traversal 2c 24s 18s – missing eager loading – minimal intrusion into object (n+1 queries problem) 12s models (only collection proxies) 6s 0s SqueakSave GLORP SqueakSave GLORP Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 13 lundi 31 août 2009
  • 26. SqueakSave: An Automatic Object-Relational Mapping Framework Summary and Outlook • simple usage & setup – integration into existing applications almost seamless • automatic deduction of database structures Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 14 lundi 31 août 2009
  • 27. SqueakSave: An Automatic Object-Relational Mapping Framework Summary and Outlook • simple usage & setup – integration into existing applications almost seamless • automatic deduction of database structures • possible extensions – SqueakDBX usage – eager loading – performance optimizations Thomas Kowark, Robert Hirschfeld, Michael Haupt (www.hpi.uni-potsdam.de/swa) 2009 14 lundi 31 août 2009