SlideShare uma empresa Scribd logo
1 de 37
Baixar para ler offline
Running Pharo on the
GemStone VM
James Foster
VP of Finance & Operations, GemTalk Systems LLC
FAST 2017 – La Plata, Argentina
8 November 2017
Agenda
• GemStone/S Introduction
• Replacing Base Class Libraries
• Questions
2
Limitations of traditional Smalltalks
• Object space (image) must fit in (virtual) RAM
• Object space visible to one (single-threaded) VM
• Sharing objects between VMs is difficult
– Convert to non-object format (binary, XML, SQL)
– No built-in object identity for multiple exports
• Object state is lost when VM exits
3
Welcome to the magical
world of GemStone
• Object space limited by
disk, not RAM
• Object space shared
across multiple VMs on
multiple hosts
• Transactional
persistence
• Image from
http://www.flickr.com/photos/laffy4k/182219003/
• Creative Commons License
http://creativecommons.org/licenses/by-sa/2.0/ 4
GemStone/S Architecture
5
Gem Types
• Linked Gem
– Gem in application process space
• Remote Procedure Call (RPC) Gem
– GCI library in application space
– Gem has separate process
6
Application &
GCI Library
Gem
OS Process
Gem
Application &
GCI Library TCP/IP
OS Process 1 OS Process 2
One-Machine Process Locations (Linked Gem)
7
Application
& GCI
Library Gem
Stone
SPC
Repository
One-Machine Process Locations (RPC Gem)
8
Application
& GCI
Library
Gem
Stone
SPC
Repository
NetLDI
Two-Machine Process Locations (Gem on Stone Host)
9
Application
& GCI
Library
Client Host
N
E
T
W
O
R
K
Gem
Stone
SPC
Repository
Stone Host
NetLDI
Two-Machine Process Locations (Gem Remote from Stone)
10
Application
& GCI
Library
Gem
Gem Host
Remote SPC
Page
Server
N
E
T
W
O
R
K
NetLDI
Stone
SPC
Repository
Stone Host
Page
Server
NetLDI
Three-Machine Process Locations
11
Application
& GCI
Library
Client Host
N
E
T
W
O
R
K
Gem
Gem Host
Remote SPC
Page
Server
N
E
T
W
O
R
K
NetLDI
Stone
SPC
Repository
Stone Host
Page
Server
NetLDI
Shared Page Cache
12
Agenda
• GemStone/S Introduction
• Replacing Base Class Libraries
• Questions
13
Replacing Base Class Libraries
• Smalltalk was intended to allow exploration
• Portability
– ANSI
– Grease
• Can we go to a lower level?
• One approach to learn more
14
Option 1: Complete Replacement
• Not possible in most Smalltalks
– Creating methods requires code
• GemStone schema editing with Topaz
– Build process starts with a few base classes
– But no methods for any class (initially)
• Challenges
– Difficult to debug (most tools are internal)
– VM has knowledge of schema
15
Option 2: Parallel Class Hierarchy
• GemStone’s namespace model allows separate
hierarchy
16
Pharo Global Lookup
17
Smalltalk
(a SmalltalkImage)
a SystemDictionary
a GlobalVariable
(Association)
globals
a CompiledMethod
a Symbolkey
an Object
value
Image
GemStone/S Global Lookup
18
AllUsers
(a UserProfileSet)
a UserProfile
a SymbolList
(Array)
Repository
a SymbolDictionary a SymbolAssociation
symbolList
a CompiledMethod
a Symbolkey
an Object
value
Unique or Shared SymbolDictionary Instances
19
AllUsers
Bob
a SymbolList
Repository
1. UserGlobals
Carol
a SymbolList
2. Globals
1. UserGlobals
3. Published
SymbolDictionary instances
Unique or Shared SymbolAssociation Instances
20
1. UserGlobals
assoc
#Arraykey
Array
value
2. Globals
1. UserGlobals
assoc
key
value
Bob’s SymbolList Carol’s SymbolList
Unique Keys
21
1. UserGlobals
assoc
#Arraykey
Array
value
2. Globals
1. UserGlobals
assoc
key
value
Bob’s SymbolList Carol’s SymbolList
#List
Unique Values
22
1. UserGlobals
2. Globals
1. UserGlobals
Bob’s SymbolList Carol’s SymbolList
assoc
#OrderedCollection
key
OrderedCollection
value
assoc
key
OrderedCollectionvalue
Problems with Parallel Class Hierarchy
• GemStone’s namespace model allows separate
hierarchy
• But complications exist:
– Literals
– Classes known to the VM
23
Complication: Literals (and their superclasses)
• Array: #()
• BlockClosure: []
• Boolean: true, false
• ByteArray: #[1 2 3]
• Character: $a
• Float: 1.23
• SmallInteger: 42
• String: ‘Smalltalk’
• Symbol: #Array
• UndefinedObject: nil
24
Complication: Classes Known to the VM
• Behavior, Class, Metaclass
• Exception, MessageNotUnderstood, ZeroDivide, …
• Pragma
• Process
• ProcessorScheduler
• So, we need to use (some) base classes
25
Problem: Conflicting Implementations
• Array>>printOn:
– Pharo
• #(1 2 3) printString '#(1 2 3)'
– GemStone
• #(1 2 3) printString 'anArray( 1, 2, 3)'
26
Option 3: Parallel Methods in GemStone Classes
• Each GemStone class has a collection of
MethodDictionary instances
– Methods are compiled into an “environment”
– Message sends to same environment (by default)
• Method environments:
0 = GemStone/S (default)
1 = Maglev (reserved for Ruby)
2+ are for others
– We use 2 for Pharo
27
28
Array Array class
a MethodDictionary a MethodDictionary
Pharo Method Dictionaries
Arrayed
Collection
Arrayed
Collection class
a MethodDictionary a MethodDictionary
Sequenceable
Collection
Sequenceable
Collection class
a MethodDictionary a MethodDictionary
29
Array Array class
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
GemStone Method Dictionaries - 1
Sequenceable
Collection
Sequenceable
Collection class
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
30
Array Array class
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
GemStone Method Dictionaries - 2
Sequenceable
Collection
Sequenceable
Collection class
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
Arrayed
Collection
Arrayed
Collection class
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
Sample Messages
• Implicit
– “in env 0” #(1 2 3) printString 'anArray( 1, 2, 3)'
– “in env 2” #(1 2 3) printString '#(1 2 3)'
• Explicit
– #(1 2 3) @env0:printString 'anArray( 1, 2, 3)'
– #(1 2 3) @env2:printString '#(1 2 3)’
31
Array
method
dicts
a MethodDict [0]
nil
a MethodDict [2]
printOn: aStream
“for GemStone”
printOn: aStream
“for Pharo”
Problems with Using GemStone Classes
• GemStone class might have different schema
– OrderedCollection in Pharo
• Instance variables: (array firstIndex lastIndex)
– OrderedCollection in GemStone
• No instance variables
– Since OrderedCollection is not known to the
compiler, we don’t have to use GemStone’s class
32
Options
1. Replace all classes
But schema is wrong in some cases
And we would like to use tools during development
2. Use parallel classes exclusively
But compiler & VM know about some GemStone classes
3. Use parallel methods exclusively
But schema is different for some classes
4. Hybrid
Use GemStone classes when necessary
Use parallel classes otherwise
Use method environment 2 for everything
33
Tools
• Topaz
– GemStone’s command-line interface
• GemBuilder for Smalltalk (GBS)
– GemStone’s GUI IDE for VA & VW
• Others
– tODE
– gt4gemstone
– Jade
34
Issues
• Incomplete Class Types
– GemStone has in-memory Ephemerons, but no
Weak references
– No 32-bit objects
• GemStone compiler is in VM
– Not as easy to experiment with new syntax
• Low-level objects may need extensive rewrite
– BlockClosure, Process, ProcessorScheduler, etc.
35
Demo
• http://files.pharo.org/get-files/60/pharo-minimal.zip
• http://downloads.gemtalksystems.com/pub/GemStone64/3.4.0/
• https://github.com/jgfoster/PharoGs/tree/james/james
36
Questions?
37
GemTalk Systems LLC
15220 NW Greenbrier Pkwy., Suite 240
Beaverton, Oregon, 97006
Voice & Fax: +1 503 766 4714
james.foster@gemtalksystems.com
James G. Foster
VP	of	Finance	&	Operations
www.gemtalksystems.com
®

Mais conteúdo relacionado

Mais procurados

A evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidA evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidRodrigo de Souza Castro
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Ralph Schindler
 
Database madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyDatabase madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyJaime Buelta
 
G3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy AnnotationsG3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy AnnotationsIván López Martín
 
Migrating from Ext GWT 2.x to 3.0
Migrating from Ext GWT 2.x to 3.0Migrating from Ext GWT 2.x to 3.0
Migrating from Ext GWT 2.x to 3.0Sencha
 

Mais procurados (8)

A evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidA evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no android
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2
 
Java for beginners
Java for beginnersJava for beginners
Java for beginners
 
Database madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyDatabase madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemy
 
Using Dojo
Using DojoUsing Dojo
Using Dojo
 
Dom
DomDom
Dom
 
G3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy AnnotationsG3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy Annotations
 
Migrating from Ext GWT 2.x to 3.0
Migrating from Ext GWT 2.x to 3.0Migrating from Ext GWT 2.x to 3.0
Migrating from Ext GWT 2.x to 3.0
 

Semelhante a Running Pharo on the GemStone VM

Running Pharo on the GemStone VM
Running Pharo on the GemStone VMRunning Pharo on the GemStone VM
Running Pharo on the GemStone VMESUG
 
Gemtalk Systems Product Roadmap
Gemtalk Systems Product RoadmapGemtalk Systems Product Roadmap
Gemtalk Systems Product RoadmapESUG
 
GemStone/64 product update and road map
GemStone/64 product update and road mapGemStone/64 product update and road map
GemStone/64 product update and road mapESUG
 
GemStone Update 2023
GemStone Update 2023GemStone Update 2023
GemStone Update 2023ESUG
 
Intro to GemStone/S
Intro to GemStone/SIntro to GemStone/S
Intro to GemStone/SESUG
 
PharoGs: Hosting Pharo in GemStone/S
PharoGs: Hosting Pharo in GemStone/SPharoGs: Hosting Pharo in GemStone/S
PharoGs: Hosting Pharo in GemStone/SESUG
 
Java 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovJava 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovSvetlin Nakov
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
keti companion classifier
keti companion classifierketi companion classifier
keti companion classifierJEE HYUN PARK
 
"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...Dataconomy Media
 
Edu.mit.jwi 2.2.3 manual
Edu.mit.jwi 2.2.3 manualEdu.mit.jwi 2.2.3 manual
Edu.mit.jwi 2.2.3 manualzxcvbbb
 
Mining Software Archives to Support Software Development
Mining Software Archives to Support Software DevelopmentMining Software Archives to Support Software Development
Mining Software Archives to Support Software DevelopmentThomas Zimmermann
 
Memory Analysis of the Dalvik (Android) Virtual Machine
Memory Analysis of the Dalvik (Android) Virtual MachineMemory Analysis of the Dalvik (Android) Virtual Machine
Memory Analysis of the Dalvik (Android) Virtual MachineAndrew Case
 
GemStone/S 64 Update
 GemStone/S 64 Update GemStone/S 64 Update
GemStone/S 64 UpdateESUG
 
How to use MongoDB with CakePHP
How to use MongoDB with CakePHPHow to use MongoDB with CakePHP
How to use MongoDB with CakePHPichikaway
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackKeitaSugiyama1
 

Semelhante a Running Pharo on the GemStone VM (20)

Running Pharo on the GemStone VM
Running Pharo on the GemStone VMRunning Pharo on the GemStone VM
Running Pharo on the GemStone VM
 
Gemtalk Systems Product Roadmap
Gemtalk Systems Product RoadmapGemtalk Systems Product Roadmap
Gemtalk Systems Product Roadmap
 
GemStone/64 product update and road map
GemStone/64 product update and road mapGemStone/64 product update and road map
GemStone/64 product update and road map
 
Libertyvasion2010
Libertyvasion2010Libertyvasion2010
Libertyvasion2010
 
GemStone Update 2023
GemStone Update 2023GemStone Update 2023
GemStone Update 2023
 
Intro to GemStone/S
Intro to GemStone/SIntro to GemStone/S
Intro to GemStone/S
 
PharoGs: Hosting Pharo in GemStone/S
PharoGs: Hosting Pharo in GemStone/SPharoGs: Hosting Pharo in GemStone/S
PharoGs: Hosting Pharo in GemStone/S
 
Jvm internals
Jvm internalsJvm internals
Jvm internals
 
Java 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovJava 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin Nakov
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
keti companion classifier
keti companion classifierketi companion classifier
keti companion classifier
 
"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...
 
Edu.mit.jwi 2.2.3 manual
Edu.mit.jwi 2.2.3 manualEdu.mit.jwi 2.2.3 manual
Edu.mit.jwi 2.2.3 manual
 
Mining Software Archives to Support Software Development
Mining Software Archives to Support Software DevelopmentMining Software Archives to Support Software Development
Mining Software Archives to Support Software Development
 
Memory Analysis of the Dalvik (Android) Virtual Machine
Memory Analysis of the Dalvik (Android) Virtual MachineMemory Analysis of the Dalvik (Android) Virtual Machine
Memory Analysis of the Dalvik (Android) Virtual Machine
 
Clonedigger-Python
Clonedigger-PythonClonedigger-Python
Clonedigger-Python
 
GemStone/S 64 Update
 GemStone/S 64 Update GemStone/S 64 Update
GemStone/S 64 Update
 
How to use MongoDB with CakePHP
How to use MongoDB with CakePHPHow to use MongoDB with CakePHP
How to use MongoDB with CakePHP
 
.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM Stack
 

Mais de FAST

Threads, Critical Sections, and Termination
Threads, Critical Sections, and TerminationThreads, Critical Sections, and Termination
Threads, Critical Sections, and TerminationFAST
 
OOP with Smalltalk
OOP with SmalltalkOOP with Smalltalk
OOP with SmalltalkFAST
 
Powerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming LanguagesPowerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming LanguagesFAST
 
Constructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden EngineConstructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden EngineFAST
 
Demystifying the creation of coding tools
Demystifying the creation of coding toolsDemystifying the creation of coding tools
Demystifying the creation of coding toolsFAST
 
Application Starter: the entry point for your application
Application Starter: the entry point for your applicationApplication Starter: the entry point for your application
Application Starter: the entry point for your applicationFAST
 
Improving the Pharo VM
Improving the Pharo VMImproving the Pharo VM
Improving the Pharo VMFAST
 
What is (not) Pharo 8?
What is (not) Pharo 8?What is (not) Pharo 8?
What is (not) Pharo 8?FAST
 
Stargate: an interstellar journey to RESTful APIs
Stargate: an interstellar journey to RESTful APIsStargate: an interstellar journey to RESTful APIs
Stargate: an interstellar journey to RESTful APIsFAST
 
Opening Smalltalks 2019
Opening Smalltalks 2019Opening Smalltalks 2019
Opening Smalltalks 2019FAST
 
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção JrSmalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção JrFAST
 
Adaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção JrAdaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção JrFAST
 
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...FAST
 
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...FAST
 
Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...FAST
 
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the worldVASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the worldFAST
 
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting WorkshopHands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting WorkshopFAST
 
Live typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan WilkinsonLive typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan WilkinsonFAST
 
Enhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth BermanEnhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth BermanFAST
 
VA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth BermanVA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth BermanFAST
 

Mais de FAST (20)

Threads, Critical Sections, and Termination
Threads, Critical Sections, and TerminationThreads, Critical Sections, and Termination
Threads, Critical Sections, and Termination
 
OOP with Smalltalk
OOP with SmalltalkOOP with Smalltalk
OOP with Smalltalk
 
Powerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming LanguagesPowerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming Languages
 
Constructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden EngineConstructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden Engine
 
Demystifying the creation of coding tools
Demystifying the creation of coding toolsDemystifying the creation of coding tools
Demystifying the creation of coding tools
 
Application Starter: the entry point for your application
Application Starter: the entry point for your applicationApplication Starter: the entry point for your application
Application Starter: the entry point for your application
 
Improving the Pharo VM
Improving the Pharo VMImproving the Pharo VM
Improving the Pharo VM
 
What is (not) Pharo 8?
What is (not) Pharo 8?What is (not) Pharo 8?
What is (not) Pharo 8?
 
Stargate: an interstellar journey to RESTful APIs
Stargate: an interstellar journey to RESTful APIsStargate: an interstellar journey to RESTful APIs
Stargate: an interstellar journey to RESTful APIs
 
Opening Smalltalks 2019
Opening Smalltalks 2019Opening Smalltalks 2019
Opening Smalltalks 2019
 
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção JrSmalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
 
Adaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção JrAdaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção Jr
 
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
 
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
 
Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...
 
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the worldVASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
 
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting WorkshopHands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
 
Live typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan WilkinsonLive typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan Wilkinson
 
Enhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth BermanEnhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth Berman
 
VA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth BermanVA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth Berman
 

Último

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 

Último (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 

Running Pharo on the GemStone VM

  • 1. Running Pharo on the GemStone VM James Foster VP of Finance & Operations, GemTalk Systems LLC FAST 2017 – La Plata, Argentina 8 November 2017
  • 2. Agenda • GemStone/S Introduction • Replacing Base Class Libraries • Questions 2
  • 3. Limitations of traditional Smalltalks • Object space (image) must fit in (virtual) RAM • Object space visible to one (single-threaded) VM • Sharing objects between VMs is difficult – Convert to non-object format (binary, XML, SQL) – No built-in object identity for multiple exports • Object state is lost when VM exits 3
  • 4. Welcome to the magical world of GemStone • Object space limited by disk, not RAM • Object space shared across multiple VMs on multiple hosts • Transactional persistence • Image from http://www.flickr.com/photos/laffy4k/182219003/ • Creative Commons License http://creativecommons.org/licenses/by-sa/2.0/ 4
  • 6. Gem Types • Linked Gem – Gem in application process space • Remote Procedure Call (RPC) Gem – GCI library in application space – Gem has separate process 6 Application & GCI Library Gem OS Process Gem Application & GCI Library TCP/IP OS Process 1 OS Process 2
  • 7. One-Machine Process Locations (Linked Gem) 7 Application & GCI Library Gem Stone SPC Repository
  • 8. One-Machine Process Locations (RPC Gem) 8 Application & GCI Library Gem Stone SPC Repository NetLDI
  • 9. Two-Machine Process Locations (Gem on Stone Host) 9 Application & GCI Library Client Host N E T W O R K Gem Stone SPC Repository Stone Host NetLDI
  • 10. Two-Machine Process Locations (Gem Remote from Stone) 10 Application & GCI Library Gem Gem Host Remote SPC Page Server N E T W O R K NetLDI Stone SPC Repository Stone Host Page Server NetLDI
  • 11. Three-Machine Process Locations 11 Application & GCI Library Client Host N E T W O R K Gem Gem Host Remote SPC Page Server N E T W O R K NetLDI Stone SPC Repository Stone Host Page Server NetLDI
  • 13. Agenda • GemStone/S Introduction • Replacing Base Class Libraries • Questions 13
  • 14. Replacing Base Class Libraries • Smalltalk was intended to allow exploration • Portability – ANSI – Grease • Can we go to a lower level? • One approach to learn more 14
  • 15. Option 1: Complete Replacement • Not possible in most Smalltalks – Creating methods requires code • GemStone schema editing with Topaz – Build process starts with a few base classes – But no methods for any class (initially) • Challenges – Difficult to debug (most tools are internal) – VM has knowledge of schema 15
  • 16. Option 2: Parallel Class Hierarchy • GemStone’s namespace model allows separate hierarchy 16
  • 17. Pharo Global Lookup 17 Smalltalk (a SmalltalkImage) a SystemDictionary a GlobalVariable (Association) globals a CompiledMethod a Symbolkey an Object value Image
  • 18. GemStone/S Global Lookup 18 AllUsers (a UserProfileSet) a UserProfile a SymbolList (Array) Repository a SymbolDictionary a SymbolAssociation symbolList a CompiledMethod a Symbolkey an Object value
  • 19. Unique or Shared SymbolDictionary Instances 19 AllUsers Bob a SymbolList Repository 1. UserGlobals Carol a SymbolList 2. Globals 1. UserGlobals 3. Published SymbolDictionary instances
  • 20. Unique or Shared SymbolAssociation Instances 20 1. UserGlobals assoc #Arraykey Array value 2. Globals 1. UserGlobals assoc key value Bob’s SymbolList Carol’s SymbolList
  • 21. Unique Keys 21 1. UserGlobals assoc #Arraykey Array value 2. Globals 1. UserGlobals assoc key value Bob’s SymbolList Carol’s SymbolList #List
  • 22. Unique Values 22 1. UserGlobals 2. Globals 1. UserGlobals Bob’s SymbolList Carol’s SymbolList assoc #OrderedCollection key OrderedCollection value assoc key OrderedCollectionvalue
  • 23. Problems with Parallel Class Hierarchy • GemStone’s namespace model allows separate hierarchy • But complications exist: – Literals – Classes known to the VM 23
  • 24. Complication: Literals (and their superclasses) • Array: #() • BlockClosure: [] • Boolean: true, false • ByteArray: #[1 2 3] • Character: $a • Float: 1.23 • SmallInteger: 42 • String: ‘Smalltalk’ • Symbol: #Array • UndefinedObject: nil 24
  • 25. Complication: Classes Known to the VM • Behavior, Class, Metaclass • Exception, MessageNotUnderstood, ZeroDivide, … • Pragma • Process • ProcessorScheduler • So, we need to use (some) base classes 25
  • 26. Problem: Conflicting Implementations • Array>>printOn: – Pharo • #(1 2 3) printString '#(1 2 3)' – GemStone • #(1 2 3) printString 'anArray( 1, 2, 3)' 26
  • 27. Option 3: Parallel Methods in GemStone Classes • Each GemStone class has a collection of MethodDictionary instances – Methods are compiled into an “environment” – Message sends to same environment (by default) • Method environments: 0 = GemStone/S (default) 1 = Maglev (reserved for Ruby) 2+ are for others – We use 2 for Pharo 27
  • 28. 28 Array Array class a MethodDictionary a MethodDictionary Pharo Method Dictionaries Arrayed Collection Arrayed Collection class a MethodDictionary a MethodDictionary Sequenceable Collection Sequenceable Collection class a MethodDictionary a MethodDictionary
  • 29. 29 Array Array class method dicts a MethodDict [0] nil a MethodDict [2] method dicts a MethodDict [0] nil a MethodDict [2] GemStone Method Dictionaries - 1 Sequenceable Collection Sequenceable Collection class method dicts a MethodDict [0] nil a MethodDict [2] method dicts a MethodDict [0] nil a MethodDict [2]
  • 30. 30 Array Array class method dicts a MethodDict [0] nil a MethodDict [2] method dicts a MethodDict [0] nil a MethodDict [2] GemStone Method Dictionaries - 2 Sequenceable Collection Sequenceable Collection class method dicts a MethodDict [0] nil a MethodDict [2] method dicts a MethodDict [0] nil a MethodDict [2] Arrayed Collection Arrayed Collection class method dicts a MethodDict [0] nil a MethodDict [2] method dicts a MethodDict [0] nil a MethodDict [2]
  • 31. Sample Messages • Implicit – “in env 0” #(1 2 3) printString 'anArray( 1, 2, 3)' – “in env 2” #(1 2 3) printString '#(1 2 3)' • Explicit – #(1 2 3) @env0:printString 'anArray( 1, 2, 3)' – #(1 2 3) @env2:printString '#(1 2 3)’ 31 Array method dicts a MethodDict [0] nil a MethodDict [2] printOn: aStream “for GemStone” printOn: aStream “for Pharo”
  • 32. Problems with Using GemStone Classes • GemStone class might have different schema – OrderedCollection in Pharo • Instance variables: (array firstIndex lastIndex) – OrderedCollection in GemStone • No instance variables – Since OrderedCollection is not known to the compiler, we don’t have to use GemStone’s class 32
  • 33. Options 1. Replace all classes But schema is wrong in some cases And we would like to use tools during development 2. Use parallel classes exclusively But compiler & VM know about some GemStone classes 3. Use parallel methods exclusively But schema is different for some classes 4. Hybrid Use GemStone classes when necessary Use parallel classes otherwise Use method environment 2 for everything 33
  • 34. Tools • Topaz – GemStone’s command-line interface • GemBuilder for Smalltalk (GBS) – GemStone’s GUI IDE for VA & VW • Others – tODE – gt4gemstone – Jade 34
  • 35. Issues • Incomplete Class Types – GemStone has in-memory Ephemerons, but no Weak references – No 32-bit objects • GemStone compiler is in VM – Not as easy to experiment with new syntax • Low-level objects may need extensive rewrite – BlockClosure, Process, ProcessorScheduler, etc. 35
  • 37. Questions? 37 GemTalk Systems LLC 15220 NW Greenbrier Pkwy., Suite 240 Beaverton, Oregon, 97006 Voice & Fax: +1 503 766 4714 james.foster@gemtalksystems.com James G. Foster VP of Finance & Operations www.gemtalksystems.com ®