SlideShare a Scribd company logo
Object-
Relational
Persistence in
Smalltalk

Alan Knight (knight@acm.org)
  Cincom Systems of Canada
What is GLORP

 Generic Lightweight Object-Relational
 Persistence
 Open-source library for O/R mapping
    LGPL(S)
 Camp Smalltalk project
    Sponsored by The Object People (2000)
    Portable
 Planned as one part of major overhaul of Object
 Lens
Motivating Example

 Cincom internal application
 Widely used internally and by customers
 Critical
 Relatively simple model
    19 tables
    somewhere between 12 and 46 domain classes
 Client-server (although server functionality
 desirable)
Issues

 Schema changes extremely difficult
 "Interesting" schema
 Performance critical
 Some operations over very high-latency links
 Significant amounts of data
 Versioning schema, heavily linked data
 Must support multiple databases


 Demo
Relationship Example
(aDescriptor newMapping: ToManyMapping)
  attributeName: #methods;
  referenceClass: StoreMethodInPackage;
  useLinkTable;
  join: (Join
      from: primaryKeyField
      to: methodsTable packageRefField).

methodMapping query alsoFetch: [:each |
  each definition].
methodMapping query expectedRows: 1000.
  Note that Join defines read, write, and join.
  Note optimizations
Packages and Classes

 In Store, "Package" means one version
 "Class" means ClassDefinition
 Entities in database are not like traditional in-
 memory entities
    e.g. what package contains this method
 Introduce additional entities
    StoreVersionlessPackage
    StoreMethodInPackage (etc)
    StoreClassExtension
 Clearer domain model, ability to express querie
Demo 2

 Querying UI
 Replicating
 Browsing
 Optimizations
 Caching
Writing

 Unit of Work
 Purely transactional
 No explicit writes
 In-memory rollback
 Automatic insert/update
 Automatic write order/referential integrity
 Mostly automatic database transactions
 Optimized
Notable Technical Points

 Object-level rollback in Unit of Work
 RowMaps and write optimization
 Block to expression conversion
 Joins
    declarative - defines the table relationship
    simple
    handles all uses
Acknowledgements

 The Object People
 Cincom
 All the contributors and users of GLORP
References
 GLORP
    http://www.glorp.org
    http://glorp.sourceforge.net
 General
    Ambler: Object Primer, http://www.agiledata.com (good
    emphasis on importance of both worlds)
    Fowler: Patterns of Enterprise Application Architecture (good
    patterns, once you ignore the non-domain model stuff)
    Fabian Pascal: Practical Issues in Database Management
    (pure relational extremist)
    ROE - Avi Bryant
    Gemstone
 2004 Cincom Systems, Inc.
                             All Rights Reserved
CINCOM and The Smart Choice are trademarks or registered trademarks of Cincom Systems, Inc
               All other trademarks belong to their respective companies.
Reading non-Object Data
 Reading pure data, ordering
  query := Query readManyOf: StorePackage.
 Aggregate functions
  query orderBy: [:each | each name].
  query retrieve: [:each | each name distinct].
  query retrieve: [:each | each primaryKey max].
 Retrieving pieces of objects
  query retrieve: [:each | each id].
  query retrieve: [:each | each name].
  query retrieve: [:each | each address] (changing contexts)
 Note: All internal queries generated by user-accessible
 mechanisms.
Change Hats: VisualWorks
 Next-generation database frameworks, inputs
    VisualWorks Object Lens
      Strong in many respects, but very dated
      Client-server orientation
    Object Studio POF
      Very strong modelling
    GLORP
      Open-source
      Extremely flexible mapping layer
    SQLWorks
      Good server orientation
      *very* high-performance

 Goal: Synthesize the best of all these
Core Issues

 Object identity vs primary keys
 Pointers vs. foreign keys
 Networks of objects vs. rows
 Queries vs. traversing relationships
 Encapsulation vs. program independence
 nil is not null
 The role of the application
Incidental Issues

 Keys: natural vs. generated
 Integrity constraints
 Inheritance
 Mismatched schemas
 Agility
General Database/Multi-User
Issues
 Scaling
 When to read data?
 What do queries look like?
 Performance, performance, performance
 Locking
 Caching, refreshing, keeping data in sync
 Transaction semantics (knowing which
 transaction to use)
 Transaction lengths
 Multi-user within an image?
Approaches

 Metadata or code generation
 Associating objects with transactions
 SQL, OO query language, objects as queries,
 special syntax
 Explicit or automatic writes
 Marking objects dirty
 When to take objects out of cache
 Different framework architectures (e.g. brokers,
 subclassing)
GLORP Licensing

 LGPL (Lesser GNU Public License)
   Can be used as a library, does not affect linked code
   Modifications must be released under the same license
 But…
   LGPL’s terminology very difficult to interpret with
   respect to Smalltalk.
 Approach
   Include a clarification with GLORP, specifying a
   sensible Smalltalk interpretation of the license
   Copyright held by the authors/not assigned
   Counsel: Lawrence Rosen (also general counsel of OSI)

More Related Content

PPTX
Understanding LINQ in C#
PPT
Introduction to NHibernate
PPT
Linq in C# 3.0: An Overview
PPT
Introduction Of Linq , ASP.NET Training Ahmedabad, ASP.NET Course Ahmedabad
PPTX
Entity framework introduction sesion-1
PPTX
LINQ in C#
PDF
GraphQL 101
PDF
L18 Object Relational Mapping
Understanding LINQ in C#
Introduction to NHibernate
Linq in C# 3.0: An Overview
Introduction Of Linq , ASP.NET Training Ahmedabad, ASP.NET Course Ahmedabad
Entity framework introduction sesion-1
LINQ in C#
GraphQL 101
L18 Object Relational Mapping

What's hot (20)

PDF
Scalable database, Scalable language @ JDC 2013
ODP
ORM, JPA, & Hibernate Overview
PDF
PPTX
Kamal Hakimzadeh – Reproducible Distributed Experiments
PDF
AgensGraph: a Multi-model Graph Database based on PostgreSql
PPTX
RavenDB Overview
PPTX
Entity Framework: Code First and Magic Unicorns
PPT
Module Owb Source Metadata
PPTX
Introducing Entity Framework 4.0
PDF
Grokking TechTalk #20: PostgreSQL Internals 101
PPTX
Introduction to RavenDB
PPTX
Entity Framework
PDF
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
PDF
(ATS6-DEV01) What’s new for Protocol and Component Developers in AEP 9.0
PPTX
Managing "Big Data" Application Complexity with CloudGraph
PDF
Apollo Server
PPTX
Getting started with entity framework
KEY
Introducing LINQ
PPTX
Grokking TechTalk #16: Html js and three way binding
Scalable database, Scalable language @ JDC 2013
ORM, JPA, & Hibernate Overview
Kamal Hakimzadeh – Reproducible Distributed Experiments
AgensGraph: a Multi-model Graph Database based on PostgreSql
RavenDB Overview
Entity Framework: Code First and Magic Unicorns
Module Owb Source Metadata
Introducing Entity Framework 4.0
Grokking TechTalk #20: PostgreSQL Internals 101
Introduction to RavenDB
Entity Framework
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
(ATS6-DEV01) What’s new for Protocol and Component Developers in AEP 9.0
Managing "Big Data" Application Complexity with CloudGraph
Apollo Server
Getting started with entity framework
Introducing LINQ
Grokking TechTalk #16: Html js and three way binding
Ad

Viewers also liked (8)

PDF
Peran HMTL dan ITB
PDF
Squeak at NetStyle
PDF
Campus Channel Network
PDF
Konsep DECAPRI
PPTX
campuschannel itb
PDF
Audiensi LPJ Akhir Tahun MWA Wakil Mahasiswa 0809
PDF
Seringkas p&k 2008 2009
PDF
KENMI SI-PPI Den Haag 2009, Komisi 3E
Peran HMTL dan ITB
Squeak at NetStyle
Campus Channel Network
Konsep DECAPRI
campuschannel itb
Audiensi LPJ Akhir Tahun MWA Wakil Mahasiswa 0809
Seringkas p&k 2008 2009
KENMI SI-PPI Den Haag 2009, Komisi 3E
Ad

Similar to Object- Relational Persistence in Smalltalk (20)

PDF
Building and deploying LLM applications with Apache Airflow
PPT
Ruby On Rails
PPTX
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
ODP
MySQL And Search At Craigslist
PPTX
Building nTier Applications with Entity Framework Services (Part 1)
PPTX
Building nTier Applications with Entity Framework Services (Part 1)
PPTX
Domain oriented development
PPT
Linq To The Enterprise
PPT
Object Oriented Concepts and Principles
PPT
Linq 1224887336792847 9
PDF
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
PPTX
CS 542 Parallel DBs, NoSQL, MapReduce
ODP
The Adventure: BlackRay as a Storage Engine
PPT
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
PPTX
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
PPTX
SQL and NoSQL in SQL Server
PDF
Objective-C
PPTX
OS for AI: Elastic Microservices & the Next Gen of ML
PPTX
Hibernate tutorial
PPTX
Data Access Tech Ed India
Building and deploying LLM applications with Apache Airflow
Ruby On Rails
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
MySQL And Search At Craigslist
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
Domain oriented development
Linq To The Enterprise
Object Oriented Concepts and Principles
Linq 1224887336792847 9
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
CS 542 Parallel DBs, NoSQL, MapReduce
The Adventure: BlackRay as a Storage Engine
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
SQL and NoSQL in SQL Server
Objective-C
OS for AI: Elastic Microservices & the Next Gen of ML
Hibernate tutorial
Data Access Tech Ed India

More from ESUG (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PDF
Directing Generative AI for Pharo Documentation
PDF
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
PDF
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
PDF
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
PDF
Analysing Python Machine Learning Notebooks with Moose
PDF
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
PDF
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
PDF
Package-Aware Approach for Repository-Level Code Completion in Pharo
PDF
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
PDF
An Analysis of Inline Method Refactoring
PDF
Identification of unnecessary object allocations using static escape analysis
PDF
Control flow-sensitive optimizations In the Druid Meta-Compiler
PDF
Clean Blocks (IWST 2025, Gdansk, Poland)
PDF
Encoding for Objects Matters (IWST 2025)
PDF
Challenges of Transpiling Smalltalk to JavaScript
PDF
Immersive experiences: what Pharo users do!
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
PDF
Cavrois - an Organic Window Management (ESUG 2025)
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
Micromaid: A simple Mermaid-like chart generator for Pharo
Directing Generative AI for Pharo Documentation
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
Analysing Python Machine Learning Notebooks with Moose
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
Package-Aware Approach for Repository-Level Code Completion in Pharo
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
An Analysis of Inline Method Refactoring
Identification of unnecessary object allocations using static escape analysis
Control flow-sensitive optimizations In the Druid Meta-Compiler
Clean Blocks (IWST 2025, Gdansk, Poland)
Encoding for Objects Matters (IWST 2025)
Challenges of Transpiling Smalltalk to JavaScript
Immersive experiences: what Pharo users do!
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
Cavrois - an Organic Window Management (ESUG 2025)

Recently uploaded (20)

PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
cuic standard and advanced reporting.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Encapsulation theory and applications.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PPTX
Tartificialntelligence_presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
A comparative analysis of optical character recognition models for extracting...
Assigned Numbers - 2025 - Bluetooth® Document
Group 1 Presentation -Planning and Decision Making .pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cuic standard and advanced reporting.pdf
1. Introduction to Computer Programming.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Encapsulation theory and applications.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
Tartificialntelligence_presentation.pptx
A Presentation on Artificial Intelligence
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding

Object- Relational Persistence in Smalltalk

  • 2. What is GLORP Generic Lightweight Object-Relational Persistence Open-source library for O/R mapping LGPL(S) Camp Smalltalk project Sponsored by The Object People (2000) Portable Planned as one part of major overhaul of Object Lens
  • 3. Motivating Example Cincom internal application Widely used internally and by customers Critical Relatively simple model 19 tables somewhere between 12 and 46 domain classes Client-server (although server functionality desirable)
  • 4. Issues Schema changes extremely difficult "Interesting" schema Performance critical Some operations over very high-latency links Significant amounts of data Versioning schema, heavily linked data Must support multiple databases Demo
  • 5. Relationship Example (aDescriptor newMapping: ToManyMapping) attributeName: #methods; referenceClass: StoreMethodInPackage; useLinkTable; join: (Join from: primaryKeyField to: methodsTable packageRefField). methodMapping query alsoFetch: [:each | each definition]. methodMapping query expectedRows: 1000. Note that Join defines read, write, and join. Note optimizations
  • 6. Packages and Classes In Store, "Package" means one version "Class" means ClassDefinition Entities in database are not like traditional in- memory entities e.g. what package contains this method Introduce additional entities StoreVersionlessPackage StoreMethodInPackage (etc) StoreClassExtension Clearer domain model, ability to express querie
  • 7. Demo 2 Querying UI Replicating Browsing Optimizations Caching
  • 8. Writing Unit of Work Purely transactional No explicit writes In-memory rollback Automatic insert/update Automatic write order/referential integrity Mostly automatic database transactions Optimized
  • 9. Notable Technical Points Object-level rollback in Unit of Work RowMaps and write optimization Block to expression conversion Joins declarative - defines the table relationship simple handles all uses
  • 10. Acknowledgements The Object People Cincom All the contributors and users of GLORP
  • 11. References GLORP http://www.glorp.org http://glorp.sourceforge.net General Ambler: Object Primer, http://www.agiledata.com (good emphasis on importance of both worlds) Fowler: Patterns of Enterprise Application Architecture (good patterns, once you ignore the non-domain model stuff) Fabian Pascal: Practical Issues in Database Management (pure relational extremist) ROE - Avi Bryant Gemstone
  • 12.  2004 Cincom Systems, Inc. All Rights Reserved CINCOM and The Smart Choice are trademarks or registered trademarks of Cincom Systems, Inc All other trademarks belong to their respective companies.
  • 13. Reading non-Object Data Reading pure data, ordering query := Query readManyOf: StorePackage. Aggregate functions query orderBy: [:each | each name]. query retrieve: [:each | each name distinct]. query retrieve: [:each | each primaryKey max]. Retrieving pieces of objects query retrieve: [:each | each id]. query retrieve: [:each | each name]. query retrieve: [:each | each address] (changing contexts) Note: All internal queries generated by user-accessible mechanisms.
  • 14. Change Hats: VisualWorks Next-generation database frameworks, inputs VisualWorks Object Lens Strong in many respects, but very dated Client-server orientation Object Studio POF Very strong modelling GLORP Open-source Extremely flexible mapping layer SQLWorks Good server orientation *very* high-performance Goal: Synthesize the best of all these
  • 15. Core Issues Object identity vs primary keys Pointers vs. foreign keys Networks of objects vs. rows Queries vs. traversing relationships Encapsulation vs. program independence nil is not null The role of the application
  • 16. Incidental Issues Keys: natural vs. generated Integrity constraints Inheritance Mismatched schemas Agility
  • 17. General Database/Multi-User Issues Scaling When to read data? What do queries look like? Performance, performance, performance Locking Caching, refreshing, keeping data in sync Transaction semantics (knowing which transaction to use) Transaction lengths Multi-user within an image?
  • 18. Approaches Metadata or code generation Associating objects with transactions SQL, OO query language, objects as queries, special syntax Explicit or automatic writes Marking objects dirty When to take objects out of cache Different framework architectures (e.g. brokers, subclassing)
  • 19. GLORP Licensing LGPL (Lesser GNU Public License) Can be used as a library, does not affect linked code Modifications must be released under the same license But… LGPL’s terminology very difficult to interpret with respect to Smalltalk. Approach Include a clarification with GLORP, specifying a sensible Smalltalk interpretation of the license Copyright held by the authors/not assigned Counsel: Lawrence Rosen (also general counsel of OSI)