SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
LM Datasets

           Promote data and code sharing
                        on the web




David Semeria                        Ruby Social Club Milano
david@lmframework.com                16th December 2010
@hymanroth
Objects


               Properties (data)

               Methods (code)

Interface




 LM Datasets                                 2
Objects


               Properties (data)

               Methods (code)            Functional abstraction (GOOD)

Interface




 LM Datasets                                                             3
Objects


               Properties (data)         Data abstraction (BAD)

               Methods (code)            Functional abstraction (GOOD)

Interface




 LM Datasets                                                             4
Objects


               Properties (data)          Data abstraction (BAD)

               Methods (code)             Functional abstraction (GOOD)

Interface




                            Context: web services

                             Interoperability is key


 LM Datasets                                                              5
Interoperability
Browser


              Twitter               Facebook




              Flickr                Bit.ly




LM Datasets                                    6
Interoperability
Browser


              Twitter               Facebook




              Flickr                Bit.ly




LM Datasets                                    7
How Much Glue Code?

      Twitter     Facebook               Facebook     Twitter

      Twitter      Flickr                Facebook     Flickr

      Twitter      Bit.ly                Facebook     Bit.ly



       Flickr      Twitter                 Bit.ly     Twitter

       Flickr     Facebook                 Bit.ly    Facebook

       Flickr       Bit.ly                 Bitl.ly    Flickr



                             12 sets of code

                                N2 - N
LM Datasets                                                     8
The General Case

Browser


                Service A               Service B

                Choose from N options   Choose from N options




  LM Datasets                                                   9
The General Case

Browser


                Service A                   Service B

                Choose from N options       Choose from N options




                  For N = 100           N2 – N = 99,900


  LM Datasets                                                       10
The Problem


              APIs are better than nothing, but they
              remain a major impediment to a fully
                           writable Web.


               (The same applies to corporate intranets)




LM Datasets                                                11
Datasets

              A generic                         Global data definitions

              representation for
              hierarchical data
                                                Permissions




                                        LIBRARY
                                  ( Front and back end )




                          Key word: GENERIC

LM Datasets                                                               12
Hierarchical Structures
                                      root



                                             node




                        node                                node



                                                     leaf      leaf

               node            node




leaf                  leaf                    leaf            leaf




 LM Datasets                                                          13
A 'people' tree
                                                 root



                                                    people




                          sport                                                    music



                                                             Id: bowie                 Id: clapton
                                                             name: “David Bowie”       name: “Eric Clapton”
               soccer               formula1




Id: maldini             Id: gerrard                     Id: alonso                    Id: hamilton
name: “Paolo Maldini”   name: “Steven Gerrard”          name: “Fernando Alonso”       name: “Lewis Hamilton”




 LM Datasets                                                                                           14
Generic Representation
              S          root                   node 1

                                                node 2


                        node 1                  leaf 1

                                                leaf 2

                        node 2


              R                 node 1 record

                                node 2 record


                                leaf 1 record

                                leaf 2 record
LM Datasets                                              15
JSON Example
ds: { s: { root:              { people:     1              },
           people:            { music:      1, sport:    1 },
           sport:             { soccer:     1, forumla1: 1 },

                music:    { bowie:   1, clapton: 1 },
                soccer:   { maldini: 1, gerrard: 1 },
                formula1: { alonso: 1, hamilton: 1 }
              },

        r: { people:          {   name:   “People”,            color:   “green”    },
             music:           {   name:   “Music”              color:   “black”    },
             sport:           {   name:   “Sport”              color:   “white”    },
             soccer:          {   name:   “Soccer”,            color    “red”      },
             formula1:        {   name:   “Formula One”,       color:   “yellow”   },

                  bowie:      {   name:   “David Bowie”,       color:   “black”    },
                  clapton:    {   name:   “Eric Clapton”,      color:   “black”    },
                  Maldini:    {   name:   “Paolo Maldini”,     color:   “red”      },
                  Gerrard:    {   name:   “Steven Gerrard”,    color:   “red”      },
                  Alonso:     {   name:   “Fernando Alonso”,   color:   “red”      },
                  Hamilton:   {   name:   “Lewis Hamilton”,    color:   “silver”   }
              }
     };


LM Datasets                                                                         16
Some Code Examples

    ➔   Leverage structure
              ➔   No need for recursive tree walking


    ➔   Leverage native operations
              ➔   Object property look-up much faster than array iteration.




LM Datasets                                                                   17
ID Exists ?

              function IdExists (id){
                  return ds.r[id] != null;
              }




LM Datasets                                  18
Node or Leaf ?

         function nodeOrLeaf (id){
              return (ds.s[id]) ?'node' :'leaf';
         }


         // assumes id exists




LM Datasets                                        19
Node contains id ?

         function contains (nodeId, id){
              if (ds.s[nodeId][id]){
                  return true;
              }
              return false
         }


         // assumes nodeId exists




LM Datasets                                 20
Parent Node

         function parentNode (id){
              for ( var k in ds.s ){
                  if (ds.s[k][id]){
                    return k;
                  }
              }
              //error
         }




LM Datasets                             21
Move Item

         function move ( toNodeId, id ){
              delete( ds.s[parenNode(id)][id] );
              ds.s[toNodeId][id] = 1;
         }


         // assumes all ids exist




LM Datasets                                        22
Templates


              DATASET


                               FLOW
                 +                    HTML



              TEMPLATES




LM Datasets                                  23
NODE TEMPLATE:
                  Flowing Templates
 <DIV style = “border: 2px solid {color}; padding: 10px”></DIV>

 LEAF TEMPLATE:
 <P><SPAN style = “color:{color}”>{name}</SPAN></P>




LM Datasets                                                       24
Flowing Templates
 NODE TEMPLATE:
 <DIV style = “border: 2px solid {color}; padding: 10px”></DIV>

 LEAF TEMPLATE:
 <P><SPAN style = “color:{color}”>{name}</SPAN></P>


 OUTPUT:


        David Bowie
        Eric Clapton


              Paolo Maldini
              Steven Gerrard


              Fernando Alonso
              Lewis Hamilton




LM Datasets                                                       25
Demo 1




LM Datasets            26
Data Definitions
                                  EXAMPLE DEFINITION




          Name                                    Age
          type         string                     type     integer
          minLen       1                          minVal   0
          maxLen       50                         maxVal   150
          canBeNumeric false
          regex        (w| )*
          function     checkName




LM Datasets                                                          27
Inheritance

               PEOPLE               PLACES    THINGS   ......




              BASIC INFO




        DETAILED INFO           EMAIL INFO




                   DETAILED & EMAIL INFO



LM Datasets                                                     28
Inheritance Across Root Types

               PEOPLE                           SERVICE




              BASIC INFO                        TWITTER




        DETAILED INFO                                     TWITTER INFO



      TWITTER USER is a sub-type of both:
      SERVICE / TWITTER / TWITTER INFO
                                            TWITTER USER
      PEOPLE / BASIC INFO


LM Datasets                                                         29
Inheritance



                Demo 2




LM Datasets                 30
Normalization


              Just like in the relational model, Dataset
              normalization means we don't store the
                     same information twice....




LM Datasets                                                31
Viewsets and Recordsets

                VIEWSET A             VIEWSET B
                              refs




              RECORD SET 1   sparse   RECORD SET 2




                             SERVER



LM Datasets                                          32
Demo 3
windows

        LIVERPOOL         MILAN #1                MILAN #2        DREAM TEAM




view sets

         VS - LIVERPOOL              VS - MILAN              VS – DREAM TEAM




                            RECORD SET FOOTBALLERS




                                      SERVER


    LM Datasets                                                                33
Demo 3
windows

        LIVERPOOL         MILAN #1                MILAN #2        DREAM TEAM




view sets

         VS - LIVERPOOL              VS - MILAN              VS – DREAM TEAM




                            RECORD SET FOOTBALLERS




                                      SERVER


    LM Datasets                                                                34
Demo 3
windows

        LIVERPOOL         MILAN #1                MILAN #2        DREAM TEAM




view sets

         VS - LIVERPOOL              VS - MILAN              VS – DREAM TEAM




                            RECORD SET FOOTBALLERS




                                      SERVER


    LM Datasets                                                                35
Demo 3
windows

        LIVERPOOL         MILAN #1                MILAN #2        DREAM TEAM




view sets

         VS - LIVERPOOL              VS - MILAN              VS – DREAM TEAM




                            RECORD SET FOOTBALLERS




                                      SERVER


    LM Datasets                                                                36
Demo 3
windows

        LIVERPOOL         MILAN #1                MILAN #2        DREAM TEAM




view sets

         VS - LIVERPOOL              VS - MILAN              VS – DREAM TEAM




                            RECORD SET FOOTBALLERS




                                      SERVER


    LM Datasets                                                                37
Demo 3
windows

        LIVERPOOL         MILAN #1                MILAN #2        DREAM TEAM




view sets

         VS - LIVERPOOL              VS - MILAN              VS – DREAM TEAM




                            RECORD SET FOOTBALLERS




                                      SERVER


    LM Datasets                                                                38
Summary

       ➔      Don't hide your data in objects




LM Datasets                                     39
Summary

       ➔      Don't hide your data in objects

       ➔      APIs can be an obstacle (representation)




LM Datasets                                              40
Summary

       ➔      Don't hide your data in objects

       ➔      APIs can be an obstacle (representation)

       ➔      Above all, KEEP IT GENERIC !!




LM Datasets                                              41
Summary

       ➔      Don't hide your data in objects

       ➔      APIs can be an obstacle (representation)

       ➔      Above all, KEEP IT GENERIC !!


Questions are welcome:
david@lmframework.com
@hymanroth

LM Datasets                                              42

Contenu connexe

En vedette

En vedette (14)

Propuesta de Robotica Educativa I y II ciclos
Propuesta de Robotica Educativa I y II ciclosPropuesta de Robotica Educativa I y II ciclos
Propuesta de Robotica Educativa I y II ciclos
 
Gender and Everyday Sexism
Gender and Everyday SexismGender and Everyday Sexism
Gender and Everyday Sexism
 
The Shrinking World: Political Sociology Week 3
The Shrinking World: Political Sociology Week 3The Shrinking World: Political Sociology Week 3
The Shrinking World: Political Sociology Week 3
 
From the toolshed - new smartphone app for aged care workers
From the toolshed - new smartphone app for aged care workersFrom the toolshed - new smartphone app for aged care workers
From the toolshed - new smartphone app for aged care workers
 
Sham an tony wedding vows
Sham an tony wedding vowsSham an tony wedding vows
Sham an tony wedding vows
 
Diseño de proyectos jca
Diseño de proyectos jcaDiseño de proyectos jca
Diseño de proyectos jca
 
Jca construccion de mecanismos robotica educativa
Jca construccion de mecanismos robotica educativaJca construccion de mecanismos robotica educativa
Jca construccion de mecanismos robotica educativa
 
Greenko 2012 prelims Q & A
Greenko 2012 prelims Q & AGreenko 2012 prelims Q & A
Greenko 2012 prelims Q & A
 
Greenko open 2011 prelims
Greenko open 2011 prelims Greenko open 2011 prelims
Greenko open 2011 prelims
 
Anem al supermercat_ MATERIAL TEA
Anem al supermercat_ MATERIAL TEAAnem al supermercat_ MATERIAL TEA
Anem al supermercat_ MATERIAL TEA
 
Zero to One in Aged Care
Zero to One in Aged CareZero to One in Aged Care
Zero to One in Aged Care
 
Eripm wd bgt0000 nbk
Eripm wd bgt0000 nbkEripm wd bgt0000 nbk
Eripm wd bgt0000 nbk
 
Tendances Social Media 2014
Tendances Social Media 2014 Tendances Social Media 2014
Tendances Social Media 2014
 
Week 9: Anti-Racism
Week 9: Anti-RacismWeek 9: Anti-Racism
Week 9: Anti-Racism
 

Similaire à Datasets by David Semeria

Bcn On Rails May2010 On Graph Databases
Bcn On Rails May2010 On Graph DatabasesBcn On Rails May2010 On Graph Databases
Bcn On Rails May2010 On Graph DatabasesPere Urbón-Bayes
 
HA Hadoop -ApacheCon talk
HA Hadoop -ApacheCon talkHA Hadoop -ApacheCon talk
HA Hadoop -ApacheCon talkSteve Loughran
 
Similarity on DBpedia
Similarity on DBpediaSimilarity on DBpedia
Similarity on DBpediaSamantha Lam
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL
OrientDB - the 2nd generation  of  (Multi-Model) NoSQLOrientDB - the 2nd generation  of  (Multi-Model) NoSQL
OrientDB - the 2nd generation of (Multi-Model) NoSQLLuigi Dell'Aquila
 
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta Codemotion
 
There's no such thing as big data
There's no such thing as big dataThere's no such thing as big data
There's no such thing as big dataAndrew Clegg
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)Emil Eifrem
 
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)Emil Eifrem
 
Provenance for Multimedia
Provenance for MultimediaProvenance for Multimedia
Provenance for MultimediaRaphael Troncy
 
Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey sharonyb
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)Emil Eifrem
 
Co-existence or competition - RDBMS and Hadoop
Co-existence or competition  - RDBMS and HadoopCo-existence or competition  - RDBMS and Hadoop
Co-existence or competition - RDBMS and HadoopFlytxt
 
Co existence or Competitions? RDBMS and Hadoop
Co existence or Competitions? RDBMS and HadoopCo existence or Competitions? RDBMS and Hadoop
Co existence or Competitions? RDBMS and HadoopFlytxt
 
Co existence or Competition ? - RDBMS and Hadoop
Co existence or Competition ? - RDBMS and HadoopCo existence or Competition ? - RDBMS and Hadoop
Co existence or Competition ? - RDBMS and HadoopFlytxt
 
MongoDB at the energy frontier
MongoDB at the energy frontierMongoDB at the energy frontier
MongoDB at the energy frontierValentin Kuznetsov
 
NERD meets NIF: Lifting NLP Extraction Results to the Linked Data Cloud
NERD meets NIF:  Lifting NLP Extraction Results to the Linked Data CloudNERD meets NIF:  Lifting NLP Extraction Results to the Linked Data Cloud
NERD meets NIF: Lifting NLP Extraction Results to the Linked Data CloudGiuseppe Rizzo
 

Similaire à Datasets by David Semeria (20)

Bcn On Rails May2010 On Graph Databases
Bcn On Rails May2010 On Graph DatabasesBcn On Rails May2010 On Graph Databases
Bcn On Rails May2010 On Graph Databases
 
HA Hadoop -ApacheCon talk
HA Hadoop -ApacheCon talkHA Hadoop -ApacheCon talk
HA Hadoop -ApacheCon talk
 
Similarity on DBpedia
Similarity on DBpediaSimilarity on DBpedia
Similarity on DBpedia
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL
OrientDB - the 2nd generation  of  (Multi-Model) NoSQLOrientDB - the 2nd generation  of  (Multi-Model) NoSQL
OrientDB - the 2nd generation of (Multi-Model) NoSQL
 
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
Dal modello Relazionale al Grafo: cosa cambia? By Alfonso Focareta
 
There's no such thing as big data
There's no such thing as big dataThere's no such thing as big data
There's no such thing as big data
 
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
NOSQL overview and intro to graph databases with Neo4j (Geeknight May 2010)
 
NISO Forum, Denver, Sept. 24, 2012: Opening Keynote: The Many and the One: BC...
NISO Forum, Denver, Sept. 24, 2012: Opening Keynote: The Many and the One: BC...NISO Forum, Denver, Sept. 24, 2012: Opening Keynote: The Many and the One: BC...
NISO Forum, Denver, Sept. 24, 2012: Opening Keynote: The Many and the One: BC...
 
Graph Theory and Databases
Graph Theory and DatabasesGraph Theory and Databases
Graph Theory and Databases
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
 
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
NOSQL Overview, Neo4j Intro And Production Example (QCon London 2010)
 
Eifrem neo4j
Eifrem neo4jEifrem neo4j
Eifrem neo4j
 
Provenance for Multimedia
Provenance for MultimediaProvenance for Multimedia
Provenance for Multimedia
 
Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey Couchbase at the academic bisilim, Turkey
Couchbase at the academic bisilim, Turkey
 
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)
 
Co-existence or competition - RDBMS and Hadoop
Co-existence or competition  - RDBMS and HadoopCo-existence or competition  - RDBMS and Hadoop
Co-existence or competition - RDBMS and Hadoop
 
Co existence or Competitions? RDBMS and Hadoop
Co existence or Competitions? RDBMS and HadoopCo existence or Competitions? RDBMS and Hadoop
Co existence or Competitions? RDBMS and Hadoop
 
Co existence or Competition ? - RDBMS and Hadoop
Co existence or Competition ? - RDBMS and HadoopCo existence or Competition ? - RDBMS and Hadoop
Co existence or Competition ? - RDBMS and Hadoop
 
MongoDB at the energy frontier
MongoDB at the energy frontierMongoDB at the energy frontier
MongoDB at the energy frontier
 
NERD meets NIF: Lifting NLP Extraction Results to the Linked Data Cloud
NERD meets NIF:  Lifting NLP Extraction Results to the Linked Data CloudNERD meets NIF:  Lifting NLP Extraction Results to the Linked Data Cloud
NERD meets NIF: Lifting NLP Extraction Results to the Linked Data Cloud
 

Dernier

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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Dernier (20)

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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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 ...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Datasets by David Semeria

  • 1. LM Datasets Promote data and code sharing on the web David Semeria Ruby Social Club Milano david@lmframework.com 16th December 2010 @hymanroth
  • 2. Objects Properties (data) Methods (code) Interface LM Datasets 2
  • 3. Objects Properties (data) Methods (code) Functional abstraction (GOOD) Interface LM Datasets 3
  • 4. Objects Properties (data) Data abstraction (BAD) Methods (code) Functional abstraction (GOOD) Interface LM Datasets 4
  • 5. Objects Properties (data) Data abstraction (BAD) Methods (code) Functional abstraction (GOOD) Interface Context: web services Interoperability is key LM Datasets 5
  • 6. Interoperability Browser Twitter Facebook Flickr Bit.ly LM Datasets 6
  • 7. Interoperability Browser Twitter Facebook Flickr Bit.ly LM Datasets 7
  • 8. How Much Glue Code? Twitter Facebook Facebook Twitter Twitter Flickr Facebook Flickr Twitter Bit.ly Facebook Bit.ly Flickr Twitter Bit.ly Twitter Flickr Facebook Bit.ly Facebook Flickr Bit.ly Bitl.ly Flickr 12 sets of code N2 - N LM Datasets 8
  • 9. The General Case Browser Service A Service B Choose from N options Choose from N options LM Datasets 9
  • 10. The General Case Browser Service A Service B Choose from N options Choose from N options For N = 100 N2 – N = 99,900 LM Datasets 10
  • 11. The Problem APIs are better than nothing, but they remain a major impediment to a fully writable Web. (The same applies to corporate intranets) LM Datasets 11
  • 12. Datasets A generic Global data definitions representation for hierarchical data Permissions LIBRARY ( Front and back end ) Key word: GENERIC LM Datasets 12
  • 13. Hierarchical Structures root node node node leaf leaf node node leaf leaf leaf leaf LM Datasets 13
  • 14. A 'people' tree root people sport music Id: bowie Id: clapton name: “David Bowie” name: “Eric Clapton” soccer formula1 Id: maldini Id: gerrard Id: alonso Id: hamilton name: “Paolo Maldini” name: “Steven Gerrard” name: “Fernando Alonso” name: “Lewis Hamilton” LM Datasets 14
  • 15. Generic Representation S root node 1 node 2 node 1 leaf 1 leaf 2 node 2 R node 1 record node 2 record leaf 1 record leaf 2 record LM Datasets 15
  • 16. JSON Example ds: { s: { root: { people: 1 }, people: { music: 1, sport: 1 }, sport: { soccer: 1, forumla1: 1 }, music: { bowie: 1, clapton: 1 }, soccer: { maldini: 1, gerrard: 1 }, formula1: { alonso: 1, hamilton: 1 } }, r: { people: { name: “People”, color: “green” }, music: { name: “Music” color: “black” }, sport: { name: “Sport” color: “white” }, soccer: { name: “Soccer”, color “red” }, formula1: { name: “Formula One”, color: “yellow” }, bowie: { name: “David Bowie”, color: “black” }, clapton: { name: “Eric Clapton”, color: “black” }, Maldini: { name: “Paolo Maldini”, color: “red” }, Gerrard: { name: “Steven Gerrard”, color: “red” }, Alonso: { name: “Fernando Alonso”, color: “red” }, Hamilton: { name: “Lewis Hamilton”, color: “silver” } } }; LM Datasets 16
  • 17. Some Code Examples ➔ Leverage structure ➔ No need for recursive tree walking ➔ Leverage native operations ➔ Object property look-up much faster than array iteration. LM Datasets 17
  • 18. ID Exists ? function IdExists (id){ return ds.r[id] != null; } LM Datasets 18
  • 19. Node or Leaf ? function nodeOrLeaf (id){ return (ds.s[id]) ?'node' :'leaf'; } // assumes id exists LM Datasets 19
  • 20. Node contains id ? function contains (nodeId, id){ if (ds.s[nodeId][id]){ return true; } return false } // assumes nodeId exists LM Datasets 20
  • 21. Parent Node function parentNode (id){ for ( var k in ds.s ){ if (ds.s[k][id]){ return k; } } //error } LM Datasets 21
  • 22. Move Item function move ( toNodeId, id ){ delete( ds.s[parenNode(id)][id] ); ds.s[toNodeId][id] = 1; } // assumes all ids exist LM Datasets 22
  • 23. Templates DATASET FLOW + HTML TEMPLATES LM Datasets 23
  • 24. NODE TEMPLATE: Flowing Templates <DIV style = “border: 2px solid {color}; padding: 10px”></DIV> LEAF TEMPLATE: <P><SPAN style = “color:{color}”>{name}</SPAN></P> LM Datasets 24
  • 25. Flowing Templates NODE TEMPLATE: <DIV style = “border: 2px solid {color}; padding: 10px”></DIV> LEAF TEMPLATE: <P><SPAN style = “color:{color}”>{name}</SPAN></P> OUTPUT: David Bowie Eric Clapton Paolo Maldini Steven Gerrard Fernando Alonso Lewis Hamilton LM Datasets 25
  • 27. Data Definitions EXAMPLE DEFINITION Name Age type string type integer minLen 1 minVal 0 maxLen 50 maxVal 150 canBeNumeric false regex (w| )* function checkName LM Datasets 27
  • 28. Inheritance PEOPLE PLACES THINGS ...... BASIC INFO DETAILED INFO EMAIL INFO DETAILED & EMAIL INFO LM Datasets 28
  • 29. Inheritance Across Root Types PEOPLE SERVICE BASIC INFO TWITTER DETAILED INFO TWITTER INFO TWITTER USER is a sub-type of both: SERVICE / TWITTER / TWITTER INFO TWITTER USER PEOPLE / BASIC INFO LM Datasets 29
  • 30. Inheritance Demo 2 LM Datasets 30
  • 31. Normalization Just like in the relational model, Dataset normalization means we don't store the same information twice.... LM Datasets 31
  • 32. Viewsets and Recordsets VIEWSET A VIEWSET B refs RECORD SET 1 sparse RECORD SET 2 SERVER LM Datasets 32
  • 33. Demo 3 windows LIVERPOOL MILAN #1 MILAN #2 DREAM TEAM view sets VS - LIVERPOOL VS - MILAN VS – DREAM TEAM RECORD SET FOOTBALLERS SERVER LM Datasets 33
  • 34. Demo 3 windows LIVERPOOL MILAN #1 MILAN #2 DREAM TEAM view sets VS - LIVERPOOL VS - MILAN VS – DREAM TEAM RECORD SET FOOTBALLERS SERVER LM Datasets 34
  • 35. Demo 3 windows LIVERPOOL MILAN #1 MILAN #2 DREAM TEAM view sets VS - LIVERPOOL VS - MILAN VS – DREAM TEAM RECORD SET FOOTBALLERS SERVER LM Datasets 35
  • 36. Demo 3 windows LIVERPOOL MILAN #1 MILAN #2 DREAM TEAM view sets VS - LIVERPOOL VS - MILAN VS – DREAM TEAM RECORD SET FOOTBALLERS SERVER LM Datasets 36
  • 37. Demo 3 windows LIVERPOOL MILAN #1 MILAN #2 DREAM TEAM view sets VS - LIVERPOOL VS - MILAN VS – DREAM TEAM RECORD SET FOOTBALLERS SERVER LM Datasets 37
  • 38. Demo 3 windows LIVERPOOL MILAN #1 MILAN #2 DREAM TEAM view sets VS - LIVERPOOL VS - MILAN VS – DREAM TEAM RECORD SET FOOTBALLERS SERVER LM Datasets 38
  • 39. Summary ➔ Don't hide your data in objects LM Datasets 39
  • 40. Summary ➔ Don't hide your data in objects ➔ APIs can be an obstacle (representation) LM Datasets 40
  • 41. Summary ➔ Don't hide your data in objects ➔ APIs can be an obstacle (representation) ➔ Above all, KEEP IT GENERIC !! LM Datasets 41
  • 42. Summary ➔ Don't hide your data in objects ➔ APIs can be an obstacle (representation) ➔ Above all, KEEP IT GENERIC !! Questions are welcome: david@lmframework.com @hymanroth LM Datasets 42