SlideShare a Scribd company logo
Smalltalk
                             Programmer




Ing. Mariano Martínez Peck   marianopeck@gmail.com
SqueakDBX

  The complete and G
                IN to
            E T
open-source solution
         Kdatabase
    A  R
 relational
 M access
SqueakDBX team
Mariano                       Germán
                                         Hernán
                                         Cassinelli
M. Peck   Esteban Lorenzano   Palacios
F.A.Q


 Who are we?

 How did it begin?

 What is actually SqueakDBX?
RDBMS VS. OODB




 Please, don't fight ;)
Anyway, we rather program in
objects and use RDBMS than
  using Java with RDBMS
              ;)
Survey                              1/2
How many times were you forced to use a
particular database?
Survey             2/2
Which databases?
Squeak's current situation
 Only MySQL and PostgreSQL native
 drivers.
 Limited ODBC driver
 Glorp in Squeak
only works with
PostgreSQL
We are in trouble...
 Direct SQL queries: 20%




 Using GLORP: 8.52%
Our goal
 Direct SQL queries: 100%




 Using GLORP: 100%
Our purpose
OpenDBX architecture
Oracle uses oci.h and and libmysqlclient_r.
MySQL uses mysql.h libclntsh.
It has N functions.
       M functions.                           Common API
                                            for all backends!!!
Examples: OCIHandleAlloc(), OCIServerAttach(),
            mysql_real_connect(), mysql_server_end(),
OCISessionEnd(), etc.
mysql_real_query(), etc.
Oracle       MySQL        PosgreSQL        Sqlite       SQLServer
client        client        client         client         client
library       library       library        library        library
Why OpenDBX?
It is fast
Simple to use
Flexible
Cross platform
Asynchronous queries
Specific RDBMS features
Good documentation
Deployment and infrastructure
     PC1              PC2

 Squeak image
                     Database

  OpenDBX


  Database
 Client Library
Smalltalk and C

      Squeak image



                                                   |

      OpenDBX
      #include <stdio.h>
      #include <stdio.h>
      static int mysql_odbx_get_option( odbx_t*)
      static int mysql_odbx_get_option( odbx_t*)
               switch( option )
               switch( option )
      .....
      .....
Smalltalk-C Connector
FFI (Foreign Function Interface)


 Main problem: Locks the entire VM
Squeak ODBC driver queries

                  VM locked
                  time
OpenDBX Connector
FFI (Foreign Function Interface)


 Main problem: Locks the entire VM
 Our solution:
  ✔   Asynchronous queries
  ✔   “Mini” VM locks
  ✔   Retry schema
  ✔   DBXQuerySettings>>timeout:
SqueakDBX queries

            VM locked
            time
Database access in Smalltalk
SqueakDBX                       Smalltalk driver
✔   One for all databases   ✗   One for each database
✔   Less time and effort    ✗   More time and effort
✔   Good performace         ✗   Performance issues?
✔   OSS and proprietary     ✗   Only OSS
✗   Difficult to debug      ✔   Easier to debug
✗   Platform dependent      ✔   Platform independent
✗   FFI locks the VM        ✔   Non-locking
SqueakDBX design


SqueakDBX Structure (API)
SqueakDBX Structure (API)

  SqueakDBX Platform
  SqueakDBX Platform

  OpenDBX Connector
  OpenDBX Connector
                            {
                            {
                               DBXConnection
                               DBXConnectionSettings
                               DBXResultSet
                               DBXPlatform
                               DBXResult
                               DBXSpecialOptions
                               DBXRow
                               DBXErrorSeverity
                               ...
                               DBXTimeSpec
                               ...

    FFI
    FFI      SqueakDBXPlugin
             SqueakDBXPlugin


          OpenDBX
Showtime
Who can use SqueakDBX?

 An application
 Glorp
 Magritte-RDB
 SqueakSave
 Moe
Current backends and OS
Benchmark for PostgreSQL
      1800

      1600

      1400

      1200

      1000
 ms




      800                                                 SqueakDBX
                                                          Native
      600

      400

      200

        0
                    Converted Insert         Select1000
             Insert                Select100
                              tests
Benchmark for MySQL
      700

      600

      500

      400
 ms




      300                                                SqueakDBX
                                                         Native
      200

      100

       0
                   Converted Insert         Select1000
            Insert                Select100
                             tests
Features
 Mini VM locks
 SqueakDBXPlugin
 Automatic fields conversion
 Configurable logging/trace
 Special RDBMS features
 Multistatements
 Automatic release of resources
What do we have?
 Enough unit tests
 Acceptable test coverage
 SmallLint runs
 Good enough design
 GLORP integration
Documentation
Website
Documented code
Mailing list
Benchmarks
What will come
 Complete Glorp refactor and integration
 More backends in more OS
 Large objects support
 Better SPs and functions support
 Continue with SqueakDBXPlugin
 Try Alien FFI
 Port to Smalltalk/X ?
Glorp progress
 Port from Squeak to Pharo
 First refactor to SqueakDatabaseAccesor
 Driver for native driver
 Driver for SqueakDBX (PostgreSQL)
Glorp before SqueakDBX
Glorp after SqueakDBX
Special thanks to...

                  Norbert Sendetzky



     GLORP             Alan Knight



                  Stéphane Ducasse
aConnection execute: 'select * from questions
   where has_answer = true'




Ing. Mariano Martínez Peck      marianopeck@gmail.com
Thank you
very much
Squeak DBX

More Related Content

What's hot (20)

PDF
NoSQL and JavaScript: a Love Story
Alexandre Morgaut
 
PDF
Requery overview
Sunghyouk Bae
 
PDF
User defined-functions-cassandra-summit-eu-2014
Robert Stupp
 
PDF
Kotlin @ Coupang Backed - JetBrains Day seoul 2018
Sunghyouk Bae
 
PPT
Hector v2: The Second Version of the Popular High-Level Java Client for Apach...
zznate
 
PDF
Spring data requery
Sunghyouk Bae
 
PDF
Objective-C Is Not Java
Chris Adamson
 
PDF
Kotlin @ Coupang Backend 2017
Sunghyouk Bae
 
PDF
XQuery Design Patterns
William Candillon
 
PDF
Cassandra 3.0
Robert Stupp
 
PDF
JUnit5 and TestContainers
Sunghyouk Bae
 
ODP
Slickdemo
Knoldus Inc.
 
PDF
wtf is in Java/JDK/wtf7?
Scott Leberknight
 
ODP
Meetup cassandra sfo_jdbc
zznate
 
PPTX
Slick: Bringing Scala’s Powerful Features to Your Database Access
Rebecca Grenier
 
PDF
April 2010 - JBoss Web Services
JBug Italy
 
PPTX
The CoFX Data Model
Rainer Stropek
 
PDF
Cassandra 3.0 Awesomeness
Jon Haddad
 
PPTX
Building .NET Apps using Couchbase Lite
gramana
 
NoSQL and JavaScript: a Love Story
Alexandre Morgaut
 
Requery overview
Sunghyouk Bae
 
User defined-functions-cassandra-summit-eu-2014
Robert Stupp
 
Kotlin @ Coupang Backed - JetBrains Day seoul 2018
Sunghyouk Bae
 
Hector v2: The Second Version of the Popular High-Level Java Client for Apach...
zznate
 
Spring data requery
Sunghyouk Bae
 
Objective-C Is Not Java
Chris Adamson
 
Kotlin @ Coupang Backend 2017
Sunghyouk Bae
 
XQuery Design Patterns
William Candillon
 
Cassandra 3.0
Robert Stupp
 
JUnit5 and TestContainers
Sunghyouk Bae
 
Slickdemo
Knoldus Inc.
 
wtf is in Java/JDK/wtf7?
Scott Leberknight
 
Meetup cassandra sfo_jdbc
zznate
 
Slick: Bringing Scala’s Powerful Features to Your Database Access
Rebecca Grenier
 
April 2010 - JBoss Web Services
JBug Italy
 
The CoFX Data Model
Rainer Stropek
 
Cassandra 3.0 Awesomeness
Jon Haddad
 
Building .NET Apps using Couchbase Lite
gramana
 

Similar to Squeak DBX (20)

PPTX
Experience sql server on l inux and docker
Bob Ward
 
PPTX
Brk2051 sql server on linux and docker
Bob Ward
 
PPT
Sql php-vibrant course-mumbai(1)
vibrantuser
 
PPTX
Python And The MySQL X DevAPI - PyCaribbean 2019
Dave Stokes
 
PDF
Load Balancing MySQL with HAProxy - Slides
Severalnines
 
PDF
Using MongoDB to Build a Fast and Scalable Content Repository
MongoDB
 
PDF
The Java Content Repository
nobby
 
PDF
MySQL up and running 30 minutes.pdf
Vinicius M Grippa
 
PDF
MySQL Proxy: Architecture and concepts of misuse
weigon
 
ODP
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
Ulf Wendel
 
PPT
Php classes in mumbai
aadi Surve
 
PDF
NoSQL with MySQL
FromDual GmbH
 
PDF
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Tobias Koprowski
 
ODP
Vote NO for MySQL
Ulf Wendel
 
PPTX
Dragonflow Austin Summit Talk
Eran Gampel
 
PDF
My sql crashcourse_intro_kdl
sqlhjalp
 
PDF
HTTP Plugin for MySQL!
Ulf Wendel
 
PDF
MySQL Cluster Scaling to a Billion Queries
Bernd Ocklin
 
PPT
Megha_Osi my sql productroadmap
OpenSourceIndia
 
PDF
2012 replication
sqlhjalp
 
Experience sql server on l inux and docker
Bob Ward
 
Brk2051 sql server on linux and docker
Bob Ward
 
Sql php-vibrant course-mumbai(1)
vibrantuser
 
Python And The MySQL X DevAPI - PyCaribbean 2019
Dave Stokes
 
Load Balancing MySQL with HAProxy - Slides
Severalnines
 
Using MongoDB to Build a Fast and Scalable Content Repository
MongoDB
 
The Java Content Repository
nobby
 
MySQL up and running 30 minutes.pdf
Vinicius M Grippa
 
MySQL Proxy: Architecture and concepts of misuse
weigon
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
Ulf Wendel
 
Php classes in mumbai
aadi Surve
 
NoSQL with MySQL
FromDual GmbH
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Tobias Koprowski
 
Vote NO for MySQL
Ulf Wendel
 
Dragonflow Austin Summit Talk
Eran Gampel
 
My sql crashcourse_intro_kdl
sqlhjalp
 
HTTP Plugin for MySQL!
Ulf Wendel
 
MySQL Cluster Scaling to a Billion Queries
Bernd Ocklin
 
Megha_Osi my sql productroadmap
OpenSourceIndia
 
2012 replication
sqlhjalp
 
Ad

More from ESUG (20)

PDF
Words words words... Automatic detection of word repetition
ESUG
 
PDF
ShowUs: Compiling with inlining Druid + Opal = DrOpal
ESUG
 
PDF
Show us your Prokject #esug2024: "Gregg Shorthand"
ESUG
 
PDF
Slides from ShowUs #esug2024: "QuickTalk: Multicultural Microwiki"
ESUG
 
PDF
Pharo GitLab Example: This is a simple Pharo Smalltalk pipeline example
ESUG
 
PDF
Show us your Project @ ESUG2024: Security cards
ESUG
 
PDF
Phausto: fast and accessible DSP programming for sound and music creation in ...
ESUG
 
PDF
Modest-Pharo: Unit Test Generation Based on Traces and Metamodels
ESUG
 
PDF
GLOSS - A GLSP1 Model Server on the Smalltalk Platform
ESUG
 
PDF
Smalltalk JIT Compilation: LLVM Experimentation
ESUG
 
PDF
Towards resilience against highly dynamic challenges for Wireless Sensor Netw...
ESUG
 
PDF
SoSAF: A Pharo-Based Framework for Enhancing System-Of-Systems Dependencies A...
ESUG
 
PDF
Pyramidion : a framework for Domain-Specific Editor
ESUG
 
PDF
Intentional Benchmarking of Dynamic Languages
ESUG
 
PDF
MethodProxies: A Safe and Fast Message-Passing Control Library
ESUG
 
PDF
Runtime Type Collection and its usage in Code Transpiling
ESUG
 
PDF
Inlined Code Generation for Smalltalk. From IWST2024
ESUG
 
PDF
Redesigning FFI calls in Pharo: Exploiting the baseline JIT for more performa...
ESUG
 
PDF
gt4llm: Software Development with LLMs in Glamorous Toolkit
ESUG
 
PDF
Attack chains construction: Towards detecting and preventing Pharo vulnerabil...
ESUG
 
Words words words... Automatic detection of word repetition
ESUG
 
ShowUs: Compiling with inlining Druid + Opal = DrOpal
ESUG
 
Show us your Prokject #esug2024: "Gregg Shorthand"
ESUG
 
Slides from ShowUs #esug2024: "QuickTalk: Multicultural Microwiki"
ESUG
 
Pharo GitLab Example: This is a simple Pharo Smalltalk pipeline example
ESUG
 
Show us your Project @ ESUG2024: Security cards
ESUG
 
Phausto: fast and accessible DSP programming for sound and music creation in ...
ESUG
 
Modest-Pharo: Unit Test Generation Based on Traces and Metamodels
ESUG
 
GLOSS - A GLSP1 Model Server on the Smalltalk Platform
ESUG
 
Smalltalk JIT Compilation: LLVM Experimentation
ESUG
 
Towards resilience against highly dynamic challenges for Wireless Sensor Netw...
ESUG
 
SoSAF: A Pharo-Based Framework for Enhancing System-Of-Systems Dependencies A...
ESUG
 
Pyramidion : a framework for Domain-Specific Editor
ESUG
 
Intentional Benchmarking of Dynamic Languages
ESUG
 
MethodProxies: A Safe and Fast Message-Passing Control Library
ESUG
 
Runtime Type Collection and its usage in Code Transpiling
ESUG
 
Inlined Code Generation for Smalltalk. From IWST2024
ESUG
 
Redesigning FFI calls in Pharo: Exploiting the baseline JIT for more performa...
ESUG
 
gt4llm: Software Development with LLMs in Glamorous Toolkit
ESUG
 
Attack chains construction: Towards detecting and preventing Pharo vulnerabil...
ESUG
 
Ad

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
July Patch Tuesday
Ivanti
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
July Patch Tuesday
Ivanti
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 

Squeak DBX

  • 1. Smalltalk Programmer Ing. Mariano Martínez Peck [email protected]
  • 2. SqueakDBX The complete and G IN to E T open-source solution Kdatabase A R relational M access
  • 3. SqueakDBX team Mariano Germán Hernán Cassinelli M. Peck Esteban Lorenzano Palacios
  • 4. F.A.Q Who are we? How did it begin? What is actually SqueakDBX?
  • 5. RDBMS VS. OODB Please, don't fight ;)
  • 6. Anyway, we rather program in objects and use RDBMS than using Java with RDBMS ;)
  • 7. Survey 1/2 How many times were you forced to use a particular database?
  • 8. Survey 2/2 Which databases?
  • 9. Squeak's current situation Only MySQL and PostgreSQL native drivers. Limited ODBC driver Glorp in Squeak only works with PostgreSQL
  • 10. We are in trouble... Direct SQL queries: 20% Using GLORP: 8.52%
  • 11. Our goal Direct SQL queries: 100% Using GLORP: 100%
  • 13. OpenDBX architecture Oracle uses oci.h and and libmysqlclient_r. MySQL uses mysql.h libclntsh. It has N functions. M functions. Common API for all backends!!! Examples: OCIHandleAlloc(), OCIServerAttach(), mysql_real_connect(), mysql_server_end(), OCISessionEnd(), etc. mysql_real_query(), etc. Oracle MySQL PosgreSQL Sqlite SQLServer client client client client client library library library library library
  • 14. Why OpenDBX? It is fast Simple to use Flexible Cross platform Asynchronous queries Specific RDBMS features Good documentation
  • 15. Deployment and infrastructure PC1 PC2 Squeak image Database OpenDBX Database Client Library
  • 16. Smalltalk and C Squeak image | OpenDBX #include <stdio.h> #include <stdio.h> static int mysql_odbx_get_option( odbx_t*) static int mysql_odbx_get_option( odbx_t*) switch( option ) switch( option ) ..... .....
  • 17. Smalltalk-C Connector FFI (Foreign Function Interface) Main problem: Locks the entire VM
  • 18. Squeak ODBC driver queries VM locked time
  • 19. OpenDBX Connector FFI (Foreign Function Interface) Main problem: Locks the entire VM Our solution: ✔ Asynchronous queries ✔ “Mini” VM locks ✔ Retry schema ✔ DBXQuerySettings>>timeout:
  • 20. SqueakDBX queries VM locked time
  • 21. Database access in Smalltalk SqueakDBX Smalltalk driver ✔ One for all databases ✗ One for each database ✔ Less time and effort ✗ More time and effort ✔ Good performace ✗ Performance issues? ✔ OSS and proprietary ✗ Only OSS ✗ Difficult to debug ✔ Easier to debug ✗ Platform dependent ✔ Platform independent ✗ FFI locks the VM ✔ Non-locking
  • 22. SqueakDBX design SqueakDBX Structure (API) SqueakDBX Structure (API) SqueakDBX Platform SqueakDBX Platform OpenDBX Connector OpenDBX Connector { { DBXConnection DBXConnectionSettings DBXResultSet DBXPlatform DBXResult DBXSpecialOptions DBXRow DBXErrorSeverity ... DBXTimeSpec ... FFI FFI SqueakDBXPlugin SqueakDBXPlugin OpenDBX
  • 24. Who can use SqueakDBX? An application Glorp Magritte-RDB SqueakSave Moe
  • 26. Benchmark for PostgreSQL 1800 1600 1400 1200 1000 ms 800 SqueakDBX Native 600 400 200 0 Converted Insert Select1000 Insert Select100 tests
  • 27. Benchmark for MySQL 700 600 500 400 ms 300 SqueakDBX Native 200 100 0 Converted Insert Select1000 Insert Select100 tests
  • 28. Features Mini VM locks SqueakDBXPlugin Automatic fields conversion Configurable logging/trace Special RDBMS features Multistatements Automatic release of resources
  • 29. What do we have? Enough unit tests Acceptable test coverage SmallLint runs Good enough design GLORP integration
  • 31. What will come Complete Glorp refactor and integration More backends in more OS Large objects support Better SPs and functions support Continue with SqueakDBXPlugin Try Alien FFI Port to Smalltalk/X ?
  • 32. Glorp progress Port from Squeak to Pharo First refactor to SqueakDatabaseAccesor Driver for native driver Driver for SqueakDBX (PostgreSQL)
  • 35. Special thanks to... Norbert Sendetzky GLORP Alan Knight Stéphane Ducasse
  • 36. aConnection execute: 'select * from questions where has_answer = true' Ing. Mariano Martínez Peck [email protected]