SlideShare una empresa de Scribd logo
1 de 74
Descargar para leer sin conexión
Mariano Martinez Peck
                                marianopeck@gmail.com
                          http://marianopeck.wordpress.com/



                                          1

Monday, August 22, 2011
THANKS a lot!!!



                             SummerTalk 2011

                          Student: Martin Dias
                          Mentor: Mariano Martínez Peck

                                        2
Monday, August 22, 2011
Object references




                                  3
Monday, August 22, 2011
Object graph




                               4
Monday, August 22, 2011
An objet graph serializer.



                                      5
Monday, August 22, 2011
Serialize
              Input: an object graph




                                           Output: stream of bytes




                                       6
Monday, August 22, 2011
Materialize
                               (deserialize)

                   Input: stream of bytes




                                                Output: an object graph




                                            7
Monday, August 22, 2011
Once serialized...
                              Stream of bytes




            Database           File       Memory   Socket




                                      8
Monday, August 22, 2011
Fuel’s main goals
               Provide fast object serialization and materialization.

               Be flexible and easy to customize.

             Have a good OO design, well tested and
             benchmarked.

               No need of special support from the VM.

               Be a general purpose serializer.

               Allow tools to be built on top of Fuel.
                                        9
Monday, August 22, 2011
Key features
                          Fast serialization and materialization.

                          Class reshape support.

                          Serialization of any kind of object.

                          Cycles support.

                          Global objects references.

                          Buffered writing.

                          Support for some “hook methods”.
                                               10
Monday, August 22, 2011
Key Characteristics
                          Pickle format.

                          Objects grouped in clusters.

                          Analysis phase before writing.

                          Stack over recursion.

                           Two phases for writing instances and
                          references.

                          Iterative graph recreation.
                                               11
Monday, August 22, 2011
Pickle format


      Invest more time in serialization so that objects can then be
                      materialized much faster.




                                   12
Monday, August 22, 2011
Grouping objects in
                        clusters

 “Similar” objects (they share writing/loading information) are
grouped together in clusters. The most common case, yet not the
 only one, takes place when a class is a cluster for its instances.




                                13
Monday, August 22, 2011
14
Monday, August 22, 2011
Each jar has
   a specific
    type of
    element




                          14
Monday, August 22, 2011
Each jar has
   a specific
    type of
    element




    Jars are in
      order


                          14
Monday, August 22, 2011
Label:
                               - What’s inside?
  Each jar has                   - How much?
   a specific
    type of
    element




    Jars are in
      order


                          14
Monday, August 22, 2011
Label:
                               - What’s inside?
  Each jar has                   - How much?
   a specific
    type of
    element

                               Different sizes
                               and different
    Jars are in                 amounts of
      order                      elements


                          14
Monday, August 22, 2011
s/jar/cluster
                                               Label:
                                          - What’s inside?
  Each jar has                              - How much?
   a specific
    type of
    element

                                          Different sizes
                                          and different
    Jars are in                            amounts of
      order                                 elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                               Label:
                                          - What’s inside?
Each jar has                                - How much?
 a specific
  type of
  element
                                          Different sizes
                                          and different
    Jars are in                            amounts of
      order                                 elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                               Label:
                                          - What’s inside?
                                            - How much?
   Each cluster
  has a specific
  type of object


                                          Different sizes
                                          and different
    Jars are in                            amounts of
      order                                 elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                               Label:
                                          - What’s inside?
                                            - How much?
   Each cluster
  has a specific
  type of object


                                          Different sizes
                                          and different
Jars are in                                amounts of
  order                                     elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                               Label:
                                          - What’s inside?
                                            - How much?
   Each cluster
  has a specific
  type of object


                                          Different sizes
                                          and different
  Clusters are                             amounts of
    in order                                elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                               Label:
                                          - What’s inside?
   Each cluster                             - How much?
  has a specific
  type of object


                                           Different sizes
                                           and different
  Clusters are                              amounts of
    in order                                 elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                              Label:
                                           - Cluster ID
   Each cluster                            - Amount of
  has a specific                               objects
  type of object


                                          Different sizes
                                          and different
  Clusters are                             amounts of
    in order                                elements


                                14
Monday, August 22, 2011
s/jar/cluster
                                              Label:
                                           - Cluster ID
   Each cluster                            - Amount of
  has a specific                               objects
  type of object


                                          Different sizes
                                          and different
  Clusters are                             amounts of
    in order                                elements

                                14
Monday, August 22, 2011
s/jar/cluster
                                              Label:
                                           - Cluster ID
   Each cluster                            - Amount of
  has a specific                               objects
  type of object


                                          Different sizes
                                          and different
  Clusters are                             amounts of
    in order                                  objects


                                14
Monday, August 22, 2011
Pickle format basic




                           Stream
                               15
Monday, August 22, 2011
Pickle format basic




                           Stream
                               15
Monday, August 22, 2011
Pickle format basic




                           Stream
                               15
Monday, August 22, 2011
Pickle format basic




                           Stream
                               15
Monday, August 22, 2011
Why the pickle format is so fast in materialization?

            Standard serializers         Fuel pickle format




                                   16
Monday, August 22, 2011
Why the pickle format is so fast in materialization?

            Standard serializers         Fuel pickle format




                           ive                       ive n
                                                rat tio
                      urs tion
                   ec za                    Ite iza
                R                                 ial
                    eri ali                 at er
               m at                       m



                                   16
Monday, August 22, 2011
Pickle advantages
                          Batch/Bulk/Iterative materialization.

                           Efficient since types are stored and fetch only
                          once.

                           Fast because at materialization we know the
                          size of everything.

                          The generated stream is smaller.

                          More next....
                                               17
Monday, August 22, 2011
There is no silver
                              bullet...

                                               ation
                                        rializ e)
                               Fa st se       ickl
                                (with out p


                            Slow
                                 seri
                             (wit aliza
                                 h pi      tion
                                      ckle
                                           )
                                            18
Monday, August 22, 2011
Fuel requires
                          Traversing the object graph.

                          Mapping each object to a specific cluster.



                                This is done in a phase before
                                serialization called “Analysis”.



                                               19
Monday, August 22, 2011
Analysis phase
                                              1) Traverse
                                              (#fuelAccept: aVisitor)
                                              2) Fill dictionary
                                              (#fuelSerializer)



                               cluster1        aPoint      ...
                               cluster2          x          y           ...
                                  ...            ...
                            key (a cluster)          value (a set)
                                       20
Monday, August 22, 2011
Serialization
              cluster1     aPoint     ...
              cluster2       x         y            ...
                 ...         ...
  key (a cluster)           value (a set)


                                                           Cluster
                                               ID

                                               serialize: anObject on: aStream
                                               materializeFrom: aStream

                                            A cluster defines how its objects
                                            are serialized and materialized.
                                       21
Monday, August 22, 2011
Stack over recursion




 To traverse the object graph, Fuel uses a custom
  stack implementation rather than a recursion.
                          22
Monday, August 22, 2011
Basic steps
                 Serialization
                        1. Analyze.
                        2. Serialize header.
                        3. Serialize instances.
                        4. Serialize references.
                        5. Serialize root.

                 Materialization
                      1. Materialize header.
                      2. Materialize instances.
                      3. Materialize references.
                      4. Materialize root.
                                          23
Monday, August 22, 2011
Fuel for far)
                                 (so
                                     software

                          Moose export utility.

                          SandstoneDB persistence.

                          Pier kernel persistence.

                          Newspeak language.

                          Marea (my own research project!).

                                              24
Monday, August 22, 2011
Future Work
                 Continue efforts on performance optimization.

                Create a tool for loading class and trait
                packages.

                 Support user-defined Singletons.

                 Fast statistics/brief info extraction of a stored
                graph.

                 Partial loading of a stored graph.
                                          25
Monday, August 22, 2011
Future work 2

                          Enable to deploy serialization and
                          materialization behavior independently.

                           Support object replacement for serialization
                          and materialization.

                          Allow cycle detections to be disabled.

                          Partial loading.

                                               26
Monday, August 22, 2011
Serialization of primitive objects
                Memory based stream




                                      27
Monday, August 22, 2011
Serialization of primitive objects
                Memory based stream




               StOMP
               SRP
               Fuel                   27
Monday, August 22, 2011
Serialization of primitive objects
                Memory based stream        File based stream




               StOMP
               SRP
               Fuel                   27
Monday, August 22, 2011
Serialization of primitive objects
                Memory based stream        File based stream




               StOMP                            Fuel
               SRP                              SRP
               Fuel                   27        StOMP
Monday, August 22, 2011
Materialization
                          of primitive objects




                                   28
Monday, August 22, 2011
Materialization
                          of primitive objects

                                             Fuel

                                             StOMP


                                             ImageSegment




                                   28
Monday, August 22, 2011
Non primitive objects




                              29
Monday, August 22, 2011
Non primitive objects




               StOMP
               SRP
               Fuel           29
Monday, August 22, 2011
Non primitive objects




               StOMP
               SRP
               Fuel           29
Monday, August 22, 2011
Non primitive objects




               StOMP                Fuel
               SRP                  ImageSegment
               Fuel           29    StOMP
Monday, August 22, 2011
Links
         Website: http://rmod.lille.inria.fr/web/pier/
         software/Fuel

         Issue tracker: http://code.google.com/p/fuel

         Source repository: http://www.squeaksource.com/
         Fuel

         Continuous integration server: https://pharo-
         ic.lille.inria.fr/hudson/job/Fuel/

                                     30
Monday, August 22, 2011
Conclusion
                               for us
                     Excellent performance without special support
                            from VM and good OO design.




                                          31
Monday, August 22, 2011
Conclusion
                                   for YOU
                          Fuel is a vehicle. It is infrastructure. You can
                                    build cool stuff on top of it.




                                                32
Monday, August 22, 2011
Thanks!


                                Mariano Martinez Peck
                                marianopeck@gmail.com
                          http://marianopeck.wordpress.com/




Monday, August 22, 2011
Concrete example



                                 34
Monday, August 22, 2011
35
Monday, August 22, 2011
Analysis phase




                     Analysis      cluster1     aRectangle
                      phase        cluster2     anOrigin aCorner
                                   cluster3     10 20 30 40
                                key (a cluster) value (a IdentitySet)
                                    20
                                    36
Monday, August 22, 2011
cluster1               aRectangle         Serialization
   cluster2               anOrigin aCorner    instances
   cluster3               10 20 30 40           phase




Monday, August 22, 2011
cluster1               aRectangle         Serialization
   cluster2               anOrigin aCorner    instances
   cluster3               10 20 30 40           phase




Monday, August 22, 2011
cluster1               aRectangle            Serialization
   cluster2               anOrigin aCorner       instances
   cluster3               10 20 30 40              phase
            instance variable count          instance variable names

                                                                       instance
  cluster ID                     1 Rectangle 2 origi corne 1             count

   class name




Monday, August 22, 2011
cluster1               aRectangle            Serialization
   cluster2               anOrigin aCorner       instances
   cluster3               10 20 30 40              phase
            instance variable count          instance variable names

                                                                       instance
  cluster ID                     1 Rectangle 2 origi corne 1             count

   class name




Monday, August 22, 2011
cluster1               aRectangle                Serialization
   cluster2               anOrigin aCorner           instances
   cluster3               10 20 30 40                  phase
            instance variable count             instance variable names

                                                                          instance
  cluster ID                     1 Rectangle 2 origi corne 1                count

   class name                    1      Point   2   x     y    2




Monday, August 22, 2011
cluster1               aRectangle                   Serialization
   cluster2               anOrigin aCorner              instances
   cluster3               10 20 30 40                     phase
            instance variable count                 instance variable names

                                                                              instance
  cluster ID                     1 Rectangle 2 origi corne 1                    count

   class name                    1      Point   2      x      y    2

                                 54 10   20 30 40




Monday, August 22, 2011
cluster1               aRectangle                       Serialization
   cluster2               anOrigin aCorner                  references
   cluster3               10 20 30 40                         phase


   instancesIndex
                                          aRectangle 20 40 aCorner anOrigi 10 30
(IdentityDictionary)
                                                1     5    7   3      2     4   6


                                        54 10   20 30 40
                                                               instances
                                                               references


Monday, August 22, 2011
cluster1               aRectangle                       Serialization
   cluster2               anOrigin aCorner                  references
   cluster3               10 20 30 40                         phase


   instancesIndex
                                          aRectangle 20 40 aCorner anOrigi 10 30
(IdentityDictionary)
                                                1     5    7   3      2     4   6


                                        54 10   20 30 40
                                                               instances
                                        2 3
                                                               references


Monday, August 22, 2011
cluster1               aRectangle                       Serialization
   cluster2               anOrigin aCorner                  references
   cluster3               10 20 30 40                         phase


   instancesIndex
                                          aRectangle 20 40 aCorner anOrigi 10 30
(IdentityDictionary)
                                                1     5    7   3      2     4   6


                                        54 10   20 30 40
                                                               instances
                                        2 3
                                                               references

                                        4 5     6 7
Monday, August 22, 2011
cluster1               aRectangle                       Serialization
   cluster2               anOrigin aCorner                  references
   cluster3               10 20 30 40                         phase


   instancesIndex
                                          aRectangle 20 40 aCorner anOrigi 10 30
(IdentityDictionary)
                                                1     5    7   3      2     4   6


                                        54 10   20 30 40
                                                               instances
                                        2 3
                                                               references

                                        4 5     6 7
Monday, August 22, 2011
final stream




                          {
                               1 Rectangle 2 origi corne 1

             instances         1     Point    2   x   y   2

                               54 10   20 30 40


          references
                          {    2 3

                               4 5     6 7


Monday, August 22, 2011
final stream
                                          objectsCounts
                header    {    7 3           clustersCount




                          {
                               1 Rectangle 2 origi corne 1

             instances         1     Point      2   x     y   2

                               54 10   20 30 40


          references
                          {    2 3

                               4 5     6 7

               trailer    {    1         root
Monday, August 22, 2011
Materialization
                                                                      objectsCounts

                                       header {    7    3              clustersCount


                                                   1    Rectangle     2 origin   corner 1



                                instances
                                            {      1        Point     2    x       y   2



                                                   54 1 2 3 4


                                                   2 3
                                  references {
                                                   4 5 6 7

                                       trailer {
                                                    1               root

Monday, August 22, 2011
41
Monday, August 22, 2011

Más contenido relacionado

Más de ESUG

A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalkESUG
 
gt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Mediagt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social MediaESUG
 
Roassal3 update
Roassal3 updateRoassal3 update
Roassal3 updateESUG
 
VASER Control: Smart Energy
VASER Control: Smart EnergyVASER Control: Smart Energy
VASER Control: Smart EnergyESUG
 
Do you know your browser?
Do you know your browser?Do you know your browser?
Do you know your browser?ESUG
 
News on Bloc for Pharo
News on Bloc for PharoNews on Bloc for Pharo
News on Bloc for PharoESUG
 
Do you really understand Git?
Do you really understand Git?Do you really understand Git?
Do you really understand Git?ESUG
 

Más de ESUG (20)

A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalk
 
gt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Mediagt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Media
 
Roassal3 update
Roassal3 updateRoassal3 update
Roassal3 update
 
VASER Control: Smart Energy
VASER Control: Smart EnergyVASER Control: Smart Energy
VASER Control: Smart Energy
 
Do you know your browser?
Do you know your browser?Do you know your browser?
Do you know your browser?
 
News on Bloc for Pharo
News on Bloc for PharoNews on Bloc for Pharo
News on Bloc for Pharo
 
Do you really understand Git?
Do you really understand Git?Do you really understand Git?
Do you really understand Git?
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Fuel

  • 1. Mariano Martinez Peck marianopeck@gmail.com http://marianopeck.wordpress.com/ 1 Monday, August 22, 2011
  • 2. THANKS a lot!!! SummerTalk 2011 Student: Martin Dias Mentor: Mariano Martínez Peck 2 Monday, August 22, 2011
  • 3. Object references 3 Monday, August 22, 2011
  • 4. Object graph 4 Monday, August 22, 2011
  • 5. An objet graph serializer. 5 Monday, August 22, 2011
  • 6. Serialize Input: an object graph Output: stream of bytes 6 Monday, August 22, 2011
  • 7. Materialize (deserialize) Input: stream of bytes Output: an object graph 7 Monday, August 22, 2011
  • 8. Once serialized... Stream of bytes Database File Memory Socket 8 Monday, August 22, 2011
  • 9. Fuel’s main goals Provide fast object serialization and materialization. Be flexible and easy to customize. Have a good OO design, well tested and benchmarked. No need of special support from the VM. Be a general purpose serializer. Allow tools to be built on top of Fuel. 9 Monday, August 22, 2011
  • 10. Key features Fast serialization and materialization. Class reshape support. Serialization of any kind of object. Cycles support. Global objects references. Buffered writing. Support for some “hook methods”. 10 Monday, August 22, 2011
  • 11. Key Characteristics Pickle format. Objects grouped in clusters. Analysis phase before writing. Stack over recursion. Two phases for writing instances and references. Iterative graph recreation. 11 Monday, August 22, 2011
  • 12. Pickle format Invest more time in serialization so that objects can then be materialized much faster. 12 Monday, August 22, 2011
  • 13. Grouping objects in clusters “Similar” objects (they share writing/loading information) are grouped together in clusters. The most common case, yet not the only one, takes place when a class is a cluster for its instances. 13 Monday, August 22, 2011
  • 15. Each jar has a specific type of element 14 Monday, August 22, 2011
  • 16. Each jar has a specific type of element Jars are in order 14 Monday, August 22, 2011
  • 17. Label: - What’s inside? Each jar has - How much? a specific type of element Jars are in order 14 Monday, August 22, 2011
  • 18. Label: - What’s inside? Each jar has - How much? a specific type of element Different sizes and different Jars are in amounts of order elements 14 Monday, August 22, 2011
  • 19. s/jar/cluster Label: - What’s inside? Each jar has - How much? a specific type of element Different sizes and different Jars are in amounts of order elements 14 Monday, August 22, 2011
  • 20. s/jar/cluster Label: - What’s inside? Each jar has - How much? a specific type of element Different sizes and different Jars are in amounts of order elements 14 Monday, August 22, 2011
  • 21. s/jar/cluster Label: - What’s inside? - How much? Each cluster has a specific type of object Different sizes and different Jars are in amounts of order elements 14 Monday, August 22, 2011
  • 22. s/jar/cluster Label: - What’s inside? - How much? Each cluster has a specific type of object Different sizes and different Jars are in amounts of order elements 14 Monday, August 22, 2011
  • 23. s/jar/cluster Label: - What’s inside? - How much? Each cluster has a specific type of object Different sizes and different Clusters are amounts of in order elements 14 Monday, August 22, 2011
  • 24. s/jar/cluster Label: - What’s inside? Each cluster - How much? has a specific type of object Different sizes and different Clusters are amounts of in order elements 14 Monday, August 22, 2011
  • 25. s/jar/cluster Label: - Cluster ID Each cluster - Amount of has a specific objects type of object Different sizes and different Clusters are amounts of in order elements 14 Monday, August 22, 2011
  • 26. s/jar/cluster Label: - Cluster ID Each cluster - Amount of has a specific objects type of object Different sizes and different Clusters are amounts of in order elements 14 Monday, August 22, 2011
  • 27. s/jar/cluster Label: - Cluster ID Each cluster - Amount of has a specific objects type of object Different sizes and different Clusters are amounts of in order objects 14 Monday, August 22, 2011
  • 28. Pickle format basic Stream 15 Monday, August 22, 2011
  • 29. Pickle format basic Stream 15 Monday, August 22, 2011
  • 30. Pickle format basic Stream 15 Monday, August 22, 2011
  • 31. Pickle format basic Stream 15 Monday, August 22, 2011
  • 32. Why the pickle format is so fast in materialization? Standard serializers Fuel pickle format 16 Monday, August 22, 2011
  • 33. Why the pickle format is so fast in materialization? Standard serializers Fuel pickle format ive ive n rat tio urs tion ec za Ite iza R ial eri ali at er m at m 16 Monday, August 22, 2011
  • 34. Pickle advantages Batch/Bulk/Iterative materialization. Efficient since types are stored and fetch only once. Fast because at materialization we know the size of everything. The generated stream is smaller. More next.... 17 Monday, August 22, 2011
  • 35. There is no silver bullet... ation rializ e) Fa st se ickl (with out p Slow seri (wit aliza h pi tion ckle ) 18 Monday, August 22, 2011
  • 36. Fuel requires Traversing the object graph. Mapping each object to a specific cluster. This is done in a phase before serialization called “Analysis”. 19 Monday, August 22, 2011
  • 37. Analysis phase 1) Traverse (#fuelAccept: aVisitor) 2) Fill dictionary (#fuelSerializer) cluster1 aPoint ... cluster2 x y ... ... ... key (a cluster) value (a set) 20 Monday, August 22, 2011
  • 38. Serialization cluster1 aPoint ... cluster2 x y ... ... ... key (a cluster) value (a set) Cluster ID serialize: anObject on: aStream materializeFrom: aStream A cluster defines how its objects are serialized and materialized. 21 Monday, August 22, 2011
  • 39. Stack over recursion To traverse the object graph, Fuel uses a custom stack implementation rather than a recursion. 22 Monday, August 22, 2011
  • 40. Basic steps Serialization 1. Analyze. 2. Serialize header. 3. Serialize instances. 4. Serialize references. 5. Serialize root. Materialization 1. Materialize header. 2. Materialize instances. 3. Materialize references. 4. Materialize root. 23 Monday, August 22, 2011
  • 41. Fuel for far) (so software Moose export utility. SandstoneDB persistence. Pier kernel persistence. Newspeak language. Marea (my own research project!). 24 Monday, August 22, 2011
  • 42. Future Work Continue efforts on performance optimization. Create a tool for loading class and trait packages. Support user-defined Singletons. Fast statistics/brief info extraction of a stored graph. Partial loading of a stored graph. 25 Monday, August 22, 2011
  • 43. Future work 2 Enable to deploy serialization and materialization behavior independently. Support object replacement for serialization and materialization. Allow cycle detections to be disabled. Partial loading. 26 Monday, August 22, 2011
  • 44. Serialization of primitive objects Memory based stream 27 Monday, August 22, 2011
  • 45. Serialization of primitive objects Memory based stream StOMP SRP Fuel 27 Monday, August 22, 2011
  • 46. Serialization of primitive objects Memory based stream File based stream StOMP SRP Fuel 27 Monday, August 22, 2011
  • 47. Serialization of primitive objects Memory based stream File based stream StOMP Fuel SRP SRP Fuel 27 StOMP Monday, August 22, 2011
  • 48. Materialization of primitive objects 28 Monday, August 22, 2011
  • 49. Materialization of primitive objects Fuel StOMP ImageSegment 28 Monday, August 22, 2011
  • 50. Non primitive objects 29 Monday, August 22, 2011
  • 51. Non primitive objects StOMP SRP Fuel 29 Monday, August 22, 2011
  • 52. Non primitive objects StOMP SRP Fuel 29 Monday, August 22, 2011
  • 53. Non primitive objects StOMP Fuel SRP ImageSegment Fuel 29 StOMP Monday, August 22, 2011
  • 54. Links Website: http://rmod.lille.inria.fr/web/pier/ software/Fuel Issue tracker: http://code.google.com/p/fuel Source repository: http://www.squeaksource.com/ Fuel Continuous integration server: https://pharo- ic.lille.inria.fr/hudson/job/Fuel/ 30 Monday, August 22, 2011
  • 55. Conclusion for us Excellent performance without special support from VM and good OO design. 31 Monday, August 22, 2011
  • 56. Conclusion for YOU Fuel is a vehicle. It is infrastructure. You can build cool stuff on top of it. 32 Monday, August 22, 2011
  • 57. Thanks! Mariano Martinez Peck marianopeck@gmail.com http://marianopeck.wordpress.com/ Monday, August 22, 2011
  • 58. Concrete example 34 Monday, August 22, 2011
  • 60. Analysis phase Analysis cluster1 aRectangle phase cluster2 anOrigin aCorner cluster3 10 20 30 40 key (a cluster) value (a IdentitySet) 20 36 Monday, August 22, 2011
  • 61. cluster1 aRectangle Serialization cluster2 anOrigin aCorner instances cluster3 10 20 30 40 phase Monday, August 22, 2011
  • 62. cluster1 aRectangle Serialization cluster2 anOrigin aCorner instances cluster3 10 20 30 40 phase Monday, August 22, 2011
  • 63. cluster1 aRectangle Serialization cluster2 anOrigin aCorner instances cluster3 10 20 30 40 phase instance variable count instance variable names instance cluster ID 1 Rectangle 2 origi corne 1 count class name Monday, August 22, 2011
  • 64. cluster1 aRectangle Serialization cluster2 anOrigin aCorner instances cluster3 10 20 30 40 phase instance variable count instance variable names instance cluster ID 1 Rectangle 2 origi corne 1 count class name Monday, August 22, 2011
  • 65. cluster1 aRectangle Serialization cluster2 anOrigin aCorner instances cluster3 10 20 30 40 phase instance variable count instance variable names instance cluster ID 1 Rectangle 2 origi corne 1 count class name 1 Point 2 x y 2 Monday, August 22, 2011
  • 66. cluster1 aRectangle Serialization cluster2 anOrigin aCorner instances cluster3 10 20 30 40 phase instance variable count instance variable names instance cluster ID 1 Rectangle 2 origi corne 1 count class name 1 Point 2 x y 2 54 10 20 30 40 Monday, August 22, 2011
  • 67. cluster1 aRectangle Serialization cluster2 anOrigin aCorner references cluster3 10 20 30 40 phase instancesIndex aRectangle 20 40 aCorner anOrigi 10 30 (IdentityDictionary) 1 5 7 3 2 4 6 54 10 20 30 40 instances references Monday, August 22, 2011
  • 68. cluster1 aRectangle Serialization cluster2 anOrigin aCorner references cluster3 10 20 30 40 phase instancesIndex aRectangle 20 40 aCorner anOrigi 10 30 (IdentityDictionary) 1 5 7 3 2 4 6 54 10 20 30 40 instances 2 3 references Monday, August 22, 2011
  • 69. cluster1 aRectangle Serialization cluster2 anOrigin aCorner references cluster3 10 20 30 40 phase instancesIndex aRectangle 20 40 aCorner anOrigi 10 30 (IdentityDictionary) 1 5 7 3 2 4 6 54 10 20 30 40 instances 2 3 references 4 5 6 7 Monday, August 22, 2011
  • 70. cluster1 aRectangle Serialization cluster2 anOrigin aCorner references cluster3 10 20 30 40 phase instancesIndex aRectangle 20 40 aCorner anOrigi 10 30 (IdentityDictionary) 1 5 7 3 2 4 6 54 10 20 30 40 instances 2 3 references 4 5 6 7 Monday, August 22, 2011
  • 71. final stream { 1 Rectangle 2 origi corne 1 instances 1 Point 2 x y 2 54 10 20 30 40 references { 2 3 4 5 6 7 Monday, August 22, 2011
  • 72. final stream objectsCounts header { 7 3 clustersCount { 1 Rectangle 2 origi corne 1 instances 1 Point 2 x y 2 54 10 20 30 40 references { 2 3 4 5 6 7 trailer { 1 root Monday, August 22, 2011
  • 73. Materialization objectsCounts header { 7 3 clustersCount 1 Rectangle 2 origin corner 1 instances { 1 Point 2 x y 2 54 1 2 3 4 2 3 references { 4 5 6 7 trailer { 1 root Monday, August 22, 2011