SlideShare a Scribd company logo
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

More Related Content

Similar to Datasets

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
Andrew 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
 
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...
National Information Standards Organization (NISO)
 
Graph Theory and Databases
Graph Theory and DatabasesGraph Theory and Databases
Graph Theory and Databases
Pere Urbón-Bayes
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
Moumie Soulemane
 
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
 
Eifrem neo4j
Eifrem neo4jEifrem neo4j
Eifrem neo4j
Shridhar Joshi
 
Provenance for Multimedia
Provenance for MultimediaProvenance for Multimedia
Provenance for Multimedia
Raphael 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 Hadoop
Flytxt
 
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
Flytxt
 
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
Flytxt
 
MongoDB at the energy frontier
MongoDB at the energy frontierMongoDB at the energy frontier
MongoDB at the energy frontier
Valentin 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 Cloud
Giuseppe Rizzo
 
SQL on Hadoop: Defining the New Generation of Analytic SQL Databases
SQL on Hadoop: Defining the New Generation of Analytic SQL DatabasesSQL on Hadoop: Defining the New Generation of Analytic SQL Databases
SQL on Hadoop: Defining the New Generation of Analytic SQL Databases
OReillyStrata
 
Laserdata i skyen - Geomatikkdagene 2013
Laserdata i skyen - Geomatikkdagene 2013Laserdata i skyen - Geomatikkdagene 2013
Laserdata i skyen - Geomatikkdagene 2013
Geodata AS
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
Lorenzo Alberton
 
Big Data & Cloud - Infinite Monkey Theorem
Big Data & Cloud - Infinite Monkey TheoremBig Data & Cloud - Infinite Monkey Theorem
Big Data & Cloud - Infinite Monkey Theorem
Jim Kaskade
 
Data Aggregation System
Data Aggregation SystemData Aggregation System
Data Aggregation System
Valentin Kuznetsov
 

Similar to Datasets (20)

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
 
SQL on Hadoop: Defining the New Generation of Analytic SQL Databases
SQL on Hadoop: Defining the New Generation of Analytic SQL DatabasesSQL on Hadoop: Defining the New Generation of Analytic SQL Databases
SQL on Hadoop: Defining the New Generation of Analytic SQL Databases
 
Laserdata i skyen - Geomatikkdagene 2013
Laserdata i skyen - Geomatikkdagene 2013Laserdata i skyen - Geomatikkdagene 2013
Laserdata i skyen - Geomatikkdagene 2013
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
 
Big Data & Cloud - Infinite Monkey Theorem
Big Data & Cloud - Infinite Monkey TheoremBig Data & Cloud - Infinite Monkey Theorem
Big Data & Cloud - Infinite Monkey Theorem
 
Data Aggregation System
Data Aggregation SystemData Aggregation System
Data Aggregation System
 

Recently uploaded

Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 

Recently uploaded (20)

Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 

Datasets

  • 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