SlideShare a Scribd company logo
Gabriel
Sor
Run Alone: A Pharo
standalone application
attempt
Deployment Issues
▪ Memory Consumption
▪ Packaging
3
Memory consumption
=
Amount of
Classes
Amount of
Packages
Tools for load
Code
Size
Full Image 6400 488
Metacello
52MB
Fuel
Config
CommandLineHan
dler
Monticello
Clean Image
How many files are necessary for
deploy?
6
Option 1
7
sourcesimage
changes
VM+
Option 2
8
sourcesimage changes
Option 3
9
+ VM
Option 4
10
How To
Prepare a Deployment
Image on Pharo
11
SmalltalkZen
“There are two schools of
thought, as far as
preparing a Smalltalk
image for deployment[...]”
Dmitri Zagidulin
12
“
“Take your development image, and
strip out unnecessary applications,
GUIs, and the development
environment itself”
Dmitri Zagidulin
Deploy anywhere approach
Deploy Anywhere
Packaging a customer
ready application for
Windows, Mac and Linux.
Maximiliano Tabacman
In Smalltalks 2015, UBA, Argentina.
Deploy anywhere result
▪ A image and a Directory structure ready
to deploy
Amount of
Classes
Amount of
Packages
Tools for load
Code
Size
Seaside
Image
7364 543
Metacello
85.1MB
Fuel
Config
CommandLineHa
ndler
Monticello
Image with Seaside
with tests and everything
“
“Start with a minimal clean image, and
only load the libraries and classes that
you’re actually using to run your
application.”
Dmitri Zagidulin
17
The minimal image approach
Create a deployable image loading the
application on the minimal image and
disabling the command line handlers.
The minimal image approach
Create a deployable image loading the
application on the minimal image and
disabling the command line handlers.
Stateless Image
The application closed to modification
20
What is the Minimal Image?
“Kernel image (Shrinked/bootstraped)
+Monticello
+Network Support (Zinc, Sockets)
+Remore repository support
+Metacello
+CommandLineHandlers (except
FuelCommandLineHandler)”
Mission Pharo Kernel
1. 1. Mission Pharo Kernel ESUG 2016, Prague Pavel Krivanek and Christophe Demarey
21
Tools necessaries for this
approach
▪ Dependency Analyser
▪ Minimal Image
▪ Metacello
▪ ConfigurationOf or BaselineOf is needed
▪ ConfigurationCommandLineHandler
▪ Smalltalk scripts
““Is slightly more difficult but very rewarding,
especially if you’re going to go the Continuous
Integration route (via Hudson/Jenkins), because it
requires you to know exactly which packages you’re
using, what they depend on, the load order, and so
on.”
Dmitri Zagidulin
Package Analyser
Dependencies
of
24
Grease
-Core
Seasid
e-Tools
Seasid
e-Devel
opment
JQuery-
Core
Seasid
e-Comp
onente
Seasid
e-Core
Seasid
e-Canv
as
Javascr
ipt-Core
Seaside-Examples
Potenti
al
Depend
encies
Collecti
on-Seq
uencea
ble
Metacello
baseline: spec
<baseline>
spec
for: #common
do: [ self setUpDependencies: spec.
Specpackage: 'Seaside-Examples' with:
[ spec requires: #('Grease-Core' 'JQuery-Core' ‘Javascript-Core’
‘Seaside-Core’ ‘Seaside-Canvas’ ‘Seaside-Componente’
‘Seaside-Tools’ ‘Seaside-Development’) ]]
25
The minimal image process
▪ Create an entry point object
▪ Create a BaselineOf or ConfigurationOf
(Using the Dependency Analyser)
▪ Disable code loading
▪ Remove the changes file
▪ Remove the sources file
Create an entry point object
MyApplication
MyApplic
ationEntr
yPoint
Starts
Click on
Registering Entry Point Object
MyApplicationEntryPoint class>>#initialize
SessionManager default
register: (ClassSessionHandler forClassNamed:
self name)
inCategory: SessionManager default
userCategory
28
StartUp and ShutDown
MyApplicationEntryPoint class>>startUp: arg1
MyApplicationManager instance startAlgorithm
MyApplicationEntryPoint class>>shutDown: arg1
MyApplicationManager instance stopAlgorithm
29
Get the minimal image
Just the minimal image
Amount of
Classes
Amount of
Packages
Tools for load
Code
Size
Minimal
Image
1429 119
Metacello
8,3MB
Monticello
Config
CommandLineHan
dler
In linux doesn’t work
curl get.pharo.org/64/ | bash
curl get.pharo.org/61-minimal
./pharo Pharo-minimal.image
This interpreter (vers. 68021) cannot read
image file (vers. 6521).
Press CR to quit...
32
Uses the 32 VM
Minimal Image doesn’t work with 64 bits VM
33
In linux this works
curl get.pharo.org/vm61 | bash
curl get.pharo.org/61-minimal |
bash
./pharo Pharo-minimal.image eval
“its works”
34
Order your ideas
Create a development directory
Create a exe-factory directory
Create the deploy directory
Save the minimal image
Save the 32 bits VM
Proof that all works
35
Development Directory
36
sourcesimage
changes
VM+
Exe-Factory Directory
37
sources
Minimal
image
changes
VM+
Scripts to
load code
Deployment Directory
38
+ VM
veggie:~$./pharo Pharo-minimal.image config 
repositoryOfMyApplication BaselineOfMyApplication
--install=baseline
Just works with SmalltalkHub
Load application :linux
C: PharoConsole.exe Pharo-minimal.image  config
repositoryOfMyApplication BaselineOfMyApplication 
--install=someVersion
Never works
Load application:
Windows
C: PharoConsole.exe Pharo-minimal.image
loadMyApplication.st
Load application:
Windows
loadMyApplication.st
Metacello new
baseline: 'MyApplication';
filetreeDirectory:'pathToMyApplication';
load.
SmalltalkImage current
saveImageInFileNamed:'myApp.image'.
SmalltalkImage current snapshot: true
andQuit: true
42
Error
MCFileTreeRepository uses STON
STON is not in the minimal image.
43
So, load STON before
Gofer new
smalltalkhubUser:
'SvenVanCaekenberghe' project: 'STON';
configurationOf: 'Ston';
loadStable.
loadMyApplication code
44
error
Undefined Referencies
45
The solution?
scriptToLoadSTON
cleanAfterNB.st
scritpToLoadMyApp
pharo-project/pharo-minimal-scripts
Thanks Pavel Krivanek!!!
46
Error again
Undefined Referencies
47
This works
scriptToLoadSTON
Smalltalk recompile
scritpToLoadMyApp
48
But….
MessageNotUnderstood: receiver of
"addTo:" is nil
49
Nor github nor filetree
You just can load code from:
▪ Metacello directory
▪ SmalltalkHub repository
50
Possible solution
Load MCGitHubRepository and its
dependencies:
▪ Metacello-GitHub
▪ Metacello-GitBasedRepository
▪ MonticelloFileTree-Core
51
Good luck!!!
52
veggie:~$./pharo Pharo-minimal.image
disableSourceFileAndChanges.st
Disable
calls to sources
and changes files
didisableSourceFileAndChanges.st
ChangesLog subclass:'NoChangesLog '.
PharoFilesOpener
subclass:'NoPharoFilesOpener'.
NoChangesLog install.
NoPharoFilesOpener install.
Smalltalk snapshot:true andQuit:true.
Sven Van Caekenberghe :http://forum.world.st
veggie:~$./pharo Pharo-minimal.image
disableCommandLineHandlers.st
Disable
CommandLineHandlers
The minimal image spected result
▪ An immutable image.
▪ Low memory consumption.
▪ Non UI
▪ Just one click execution (in windows)
The minimal image actual result
▪ An immutable image.
▪ Low memory consumption.
▪ Non UI
▪ Just one click execution (in windows)
With Seaside with tests and
everything
Amount of
Classes
Amount of
Packages
Tools for load
Code
Size
Minimal
Seaside
+STON
2156 175
Metacello
28.4MB
Monticello
Config
CommandLineHan
dler
Run Alone: A Pharo
standalone application
Ex e m Con es
In h p ://gi b.co /de t e d a
Future Work
Try to Build a deployable
image
Ready to load the necessary
packages using github,gitlab,filetree
and then unload all unnecessary
objects
61
https://github.com/despotadesdibujau
sormgabriel@gmail.com

More Related Content

PDF
Offline first solutions highland web group - december 2015
PPTX
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
PDF
Using Docker in the Real World
PDF
Ironic - A modern approach to machine deployment
PDF
JavaOne 2014: Taming the Cloud Database with jclouds
PDF
Heroku 101 py con 2015 - David Gouldin
PDF
Introduction to Cloud Foundry #JJUG
PDF
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Offline first solutions highland web group - december 2015
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Using Docker in the Real World
Ironic - A modern approach to machine deployment
JavaOne 2014: Taming the Cloud Database with jclouds
Heroku 101 py con 2015 - David Gouldin
Introduction to Cloud Foundry #JJUG
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014

What's hot (20)

PPTX
Webinar: Agile Network Deployment
PDF
Running the Oracle SOA Suite Environment in a Docker Container
PDF
Apps software development with Vert.X
PPTX
My Experiences as a Beginner of OpenJDK Contributor (jLove Conference)
PDF
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
ODP
Docker for Developers
PDF
Single page apps with drupal 7
PDF
今すぐ始めるCloud Foundry #hackt #hackt_k
PDF
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
PDF
JRuby on Rails Deployment: What They Didn't Tell You
PDF
Taming the Cloud Database with Apache jclouds
PDF
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
PDF
PipelineAI Optimizes Your Enterprise AI Pipeline from Distributed Training to...
PDF
Cloud Foundry Introduction - Canada - October 2012
PPTX
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
PDF
Taming AEM deployments
PDF
Moving In: how to port your content from * to Drupal
PDF
Grafana is not enough: DIY user interfaces for Prometheus
ODP
Docker for PHP Developers - Madison PHP 2017
PDF
Using Puppet - Real World Configuration Management
Webinar: Agile Network Deployment
Running the Oracle SOA Suite Environment in a Docker Container
Apps software development with Vert.X
My Experiences as a Beginner of OpenJDK Contributor (jLove Conference)
Isn't it ironic - managing a bare metal cloud (OSL TES 2015)
Docker for Developers
Single page apps with drupal 7
今すぐ始めるCloud Foundry #hackt #hackt_k
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
JRuby on Rails Deployment: What They Didn't Tell You
Taming the Cloud Database with Apache jclouds
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
PipelineAI Optimizes Your Enterprise AI Pipeline from Distributed Training to...
Cloud Foundry Introduction - Canada - October 2012
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Taming AEM deployments
Moving In: how to port your content from * to Drupal
Grafana is not enough: DIY user interfaces for Prometheus
Docker for PHP Developers - Madison PHP 2017
Using Puppet - Real World Configuration Management
Ad

Similar to Run alone: a standalone application attempt by Gabriel Sor (20)

PDF
A Glance At The Java Performance Toolbox
PPTX
Js tacktalk team dev js testing performance
PDF
Spring Boot Native written by software developers
PDF
Virtualization and Cloud Computing with Elastic Server On Demand
PPTX
K2000 Mac Imaging
PDF
Commit to excellence - Java in containers
PDF
A Glance At The Java Performance Toolbox.pdf
PDF
A Glance At The Java Performance Toolbox.pdf
PDF
The Path Towards Spring Boot Native Applications
PPTX
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
PDF
Running your Java EE 6 applications in the Cloud (FISL 12)
PPTX
No more Dockerfiles? Buildpacks to help you ship your image!
PDF
mago3D Technical Workshop Material
PDF
introduction-infra-as-a-code using terraform
PDF
Mihai Criveti - PyCon Ireland - Automate Everything
PDF
A Glance At The Java Performance Toolbox
PDF
Geode on Docker
PDF
DockerCon EU 2015: Trading Bitcoin with Docker
PDF
Running your Java EE 6 Applications in the Cloud
PDF
JFokus 2011 - Running your Java EE 6 apps in the Cloud
A Glance At The Java Performance Toolbox
Js tacktalk team dev js testing performance
Spring Boot Native written by software developers
Virtualization and Cloud Computing with Elastic Server On Demand
K2000 Mac Imaging
Commit to excellence - Java in containers
A Glance At The Java Performance Toolbox.pdf
A Glance At The Java Performance Toolbox.pdf
The Path Towards Spring Boot Native Applications
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Running your Java EE 6 applications in the Cloud (FISL 12)
No more Dockerfiles? Buildpacks to help you ship your image!
mago3D Technical Workshop Material
introduction-infra-as-a-code using terraform
Mihai Criveti - PyCon Ireland - Automate Everything
A Glance At The Java Performance Toolbox
Geode on Docker
DockerCon EU 2015: Trading Bitcoin with Docker
Running your Java EE 6 Applications in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the Cloud
Ad

More from FAST (20)

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

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing
Digital-Transformation-Roadmap-for-Companies.pptx
A comparative analysis of optical character recognition models for extracting...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
“AI and Expert System Decision Support & Business Intelligence Systems”
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Cloud computing and distributed systems.
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Run alone: a standalone application attempt by Gabriel Sor