SlideShare a Scribd company logo
Fuel

a fast and flexible object deployment tool
Intro
Goal in a nutshell

Store objects and restore them fast.

              The store time is
               desired but not
                  the focus.


              It will work with any
            kind of objects, but its
                main goal is with
            classes and methods.
Other goals

●   Have a minimal loading package (to work in
    Seed kernels).
●   Be useful for Marea project.
●   Other projects can use it for storing their objects
    (for example, a Fuel export/import extension is
    being integrated on Moose Suite).
●   Maybe also allow to choose a fast-storing write
    strategy (for these cases in which there is no
    worry for for reading time but for writing).
Other goals (II)

●   Allow other ways of reading the stream:
    ●   Brief info extraction: do a light read of the stream, to
        extract some information without restoring the
        objects.
    ●   Partial loading: sometimes we don't want to restore
        entirely the stored graph.
Problems
Identity: reference vs. creation
●   Certain objects in the image must preserve its
    identity
●   i.e. when loading, certain objects correspond to
    ones already present in the system, and so
    should't be created 'duplicating' them.
●   Some of them should be detected implicitly, like
    the Smalltalk globals.
●   Another ones should be explicited by the user.
    A typical example are the singleton instances,
    MyModel uniqueInstance.
Cycles

   ●   When traversing the
       graph is necessary to
       check for cycles.
   ●   This check has a high
       cost, but only affects
       on storing time.
Class shape changing
        When loading an object,
        it can happen that its
        class has changed. So
        we could:
        ●   Have some automatic
            tolerance.
        ●   Help the user to solve
            conflicts easily.
Portability
●   Between Fuel versions:
    ●   When restoring from a stream, we should look what
        version was used to store it, and then act in
        consequence.
●   Between Pharo versions:
    ●   Suppose that CompiledMethod implementation
        changes. We should be able to adapt the original
        format, or at least detect a problem and throw an
        error.
●   Between dialects:
    ●   At the moment is not a goal.
Minimal loading


●   Fuel would be used for binary loading of
    packages in a minimal system, even without a
    Compiler.
●   The packages for loading should work alone.
    Independent of the ones for storing.
Known implementations
●   Parcels (VW)
●   ReferenceStream / SmartRefStream
●   Magma
●   Monticello2
●   SRP (VW)
●   BOSS (VW)
●   ObjectDumper (GNU Smalltalk)
●   SIXX
Our solution
Principles


On its pickle format, Fuel takes two ideas used in
Parcels:
●   Clustering the objects of the graph.
●   Iterative loading, to avoid recursive parsing
    algorithms.
Clustering


●   The objects of the graph will be stored in a
    sequence of clusters.
●   Each cluster groups instances that share
    loading information.
●   That shared information is stored once,
    reducing the overhead when loading.
Iterative loading

●   The loading process is done by reading linearly
    the stream, without a recursive algorithm to
    reconstruct the graph.
●   The graph is stored in two parts:
    ●   Vertexes: Information for the instantiation of the
        objects.
    ●   Edges: Information for restoring the references
        between objects.

More Related Content

Similar to Presentation

[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...
[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...
[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...
PingCAP
 
Intro to Mage for Data Engineering WorkflowOrchestration
Intro to Mage for Data Engineering WorkflowOrchestrationIntro to Mage for Data Engineering WorkflowOrchestration
Intro to Mage for Data Engineering WorkflowOrchestration
arungansi
 
Why Concurrency is hard ?
Why Concurrency is hard ?Why Concurrency is hard ?
Why Concurrency is hard ?
Ramith Jayasinghe
 
Introductionofdatastructure 110731092019-phpapp01
Introductionofdatastructure 110731092019-phpapp01Introductionofdatastructure 110731092019-phpapp01
Introductionofdatastructure 110731092019-phpapp01
Jay Patel
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
Jeremy Leisy
 
Concurrency - Why it's hard ?
Concurrency - Why it's hard ?Concurrency - Why it's hard ?
Concurrency - Why it's hard ?
Ramith Jayasinghe
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistency
seldo
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
SadhanaParameswaran
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
Deep Kapadia
 
Advanced memory allocation
Advanced memory allocationAdvanced memory allocation
Advanced memory allocation
Joris Bonnefoy
 
Anatomy of in memory processing in Spark
Anatomy of in memory processing in SparkAnatomy of in memory processing in Spark
Anatomy of in memory processing in Spark
datamantra
 
Zero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using DockerZero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using Docker
Tomasz Rękawek
 
Zero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerZero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using Docker
Robert Munteanu
 
Python: Thanks for the memories
Python: Thanks for the memoriesPython: Thanks for the memories
Python: Thanks for the memories
Danil Ineev
 
Post-graduate course: Object technology: Persistence.
Post-graduate course: Object technology: Persistence.Post-graduate course: Object technology: Persistence.
Post-graduate course: Object technology: Persistence.
Baltasar García Perez-Schofield
 
Scaling Up with PHP and AWS
Scaling Up with PHP and AWSScaling Up with PHP and AWS
Scaling Up with PHP and AWS
Heath Dutton ☕
 
C for Cuda - Small Introduction to GPU computing
C for Cuda - Small Introduction to GPU computingC for Cuda - Small Introduction to GPU computing
C for Cuda - Small Introduction to GPU computing
IPALab
 
War Stories: DIY Kafka
War Stories: DIY KafkaWar Stories: DIY Kafka
War Stories: DIY Kafka
confluent
 
Linux Device Driver v3 [Chapter 2]
Linux Device Driver v3 [Chapter 2]Linux Device Driver v3 [Chapter 2]
Linux Device Driver v3 [Chapter 2]
Anupam Datta
 
Attacking the WebKit Heap
Attacking the WebKit HeapAttacking the WebKit Heap
Attacking the WebKit Heap
Michael Scovetta
 

Similar to Presentation (20)

[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...
[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...
[Paper reading] Interleaving with Coroutines: A Practical Approach for Robust...
 
Intro to Mage for Data Engineering WorkflowOrchestration
Intro to Mage for Data Engineering WorkflowOrchestrationIntro to Mage for Data Engineering WorkflowOrchestration
Intro to Mage for Data Engineering WorkflowOrchestration
 
Why Concurrency is hard ?
Why Concurrency is hard ?Why Concurrency is hard ?
Why Concurrency is hard ?
 
Introductionofdatastructure 110731092019-phpapp01
Introductionofdatastructure 110731092019-phpapp01Introductionofdatastructure 110731092019-phpapp01
Introductionofdatastructure 110731092019-phpapp01
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Concurrency - Why it's hard ?
Concurrency - Why it's hard ?Concurrency - Why it's hard ?
Concurrency - Why it's hard ?
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistency
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
 
Advanced memory allocation
Advanced memory allocationAdvanced memory allocation
Advanced memory allocation
 
Anatomy of in memory processing in Spark
Anatomy of in memory processing in SparkAnatomy of in memory processing in Spark
Anatomy of in memory processing in Spark
 
Zero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using DockerZero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using Docker
 
Zero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerZero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using Docker
 
Python: Thanks for the memories
Python: Thanks for the memoriesPython: Thanks for the memories
Python: Thanks for the memories
 
Post-graduate course: Object technology: Persistence.
Post-graduate course: Object technology: Persistence.Post-graduate course: Object technology: Persistence.
Post-graduate course: Object technology: Persistence.
 
Scaling Up with PHP and AWS
Scaling Up with PHP and AWSScaling Up with PHP and AWS
Scaling Up with PHP and AWS
 
C for Cuda - Small Introduction to GPU computing
C for Cuda - Small Introduction to GPU computingC for Cuda - Small Introduction to GPU computing
C for Cuda - Small Introduction to GPU computing
 
War Stories: DIY Kafka
War Stories: DIY KafkaWar Stories: DIY Kafka
War Stories: DIY Kafka
 
Linux Device Driver v3 [Chapter 2]
Linux Device Driver v3 [Chapter 2]Linux Device Driver v3 [Chapter 2]
Linux Device Driver v3 [Chapter 2]
 
Attacking the WebKit Heap
Attacking the WebKit HeapAttacking the WebKit Heap
Attacking the WebKit Heap
 

Presentation

  • 1. Fuel a fast and flexible object deployment tool
  • 3. Goal in a nutshell Store objects and restore them fast. The store time is desired but not the focus. It will work with any kind of objects, but its main goal is with classes and methods.
  • 4. Other goals ● Have a minimal loading package (to work in Seed kernels). ● Be useful for Marea project. ● Other projects can use it for storing their objects (for example, a Fuel export/import extension is being integrated on Moose Suite). ● Maybe also allow to choose a fast-storing write strategy (for these cases in which there is no worry for for reading time but for writing).
  • 5. Other goals (II) ● Allow other ways of reading the stream: ● Brief info extraction: do a light read of the stream, to extract some information without restoring the objects. ● Partial loading: sometimes we don't want to restore entirely the stored graph.
  • 7. Identity: reference vs. creation ● Certain objects in the image must preserve its identity ● i.e. when loading, certain objects correspond to ones already present in the system, and so should't be created 'duplicating' them. ● Some of them should be detected implicitly, like the Smalltalk globals. ● Another ones should be explicited by the user. A typical example are the singleton instances, MyModel uniqueInstance.
  • 8. Cycles ● When traversing the graph is necessary to check for cycles. ● This check has a high cost, but only affects on storing time.
  • 9. Class shape changing When loading an object, it can happen that its class has changed. So we could: ● Have some automatic tolerance. ● Help the user to solve conflicts easily.
  • 10. Portability ● Between Fuel versions: ● When restoring from a stream, we should look what version was used to store it, and then act in consequence. ● Between Pharo versions: ● Suppose that CompiledMethod implementation changes. We should be able to adapt the original format, or at least detect a problem and throw an error. ● Between dialects: ● At the moment is not a goal.
  • 11. Minimal loading ● Fuel would be used for binary loading of packages in a minimal system, even without a Compiler. ● The packages for loading should work alone. Independent of the ones for storing.
  • 12. Known implementations ● Parcels (VW) ● ReferenceStream / SmartRefStream ● Magma ● Monticello2 ● SRP (VW) ● BOSS (VW) ● ObjectDumper (GNU Smalltalk) ● SIXX
  • 14. Principles On its pickle format, Fuel takes two ideas used in Parcels: ● Clustering the objects of the graph. ● Iterative loading, to avoid recursive parsing algorithms.
  • 15. Clustering ● The objects of the graph will be stored in a sequence of clusters. ● Each cluster groups instances that share loading information. ● That shared information is stored once, reducing the overhead when loading.
  • 16. Iterative loading ● The loading process is done by reading linearly the stream, without a recursive algorithm to reconstruct the graph. ● The graph is stored in two parts: ● Vertexes: Information for the instantiation of the objects. ● Edges: Information for restoring the references between objects.