SlideShare a Scribd company logo
1 of 34
Download to read offline
Photo: Large Magellanic Cloud, ESO




                                                                                19./20. Oktober 2010
                                                                                           Nürnberg
                                                                            www.databasepro-powerdays.de



                                                                                            sones




          Graph Data in the cloud
          using .NET
 Achim Friedland <achim@sones.de>    Database Pro Power Days , 10/20/2010                                  1
Photo: funky64, flickr




                  For 35 years information has been
                 well-defined data within some tables
                    jailed in closed database silos.




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   2
Photo: shamballah, flickr




                     The relational model and SQL have
                     become much too limited for open
                    linked data and cloud requirements.
                            == graph data




 Achim Friedland <achim@sones.de>           Database Pro Power Days , 10/20/2010   3
Photo: shamballah, flickr




                     Application 1     Application 2
                                                                     Applications can
                                                                     not access, under-
                                                                     stand and process
                                   ?     ?
                                                                     unknown relational
                            DB 1             DB 2
                                                                     data easily.



 Achim Friedland <achim@sones.de>               Database Pro Power Days , 10/20/2010      4
Photo: Gephi, flickr




                                    1. Graph-Databases




 Achim Friedland <achim@sones.de>       Database Pro Power Days , 10/20/2010   5
Photo: Gephi, flickr




                            The Property-Graph Model


          Vertex
                                    Edge
                       Alice                      Friends                         Bob
                        ID = 1              since = 2009/09/21                     ID = 2
                       Age = 21            reason = classmates                    Age = 23

                                                                     Edge-                    Vertex-
                                                                   Properties                Properties




 Achim Friedland <achim@sones.de>          Database Pro Power Days , 10/20/2010                           6
Photo: Gephi, flickr




                            The Property-Graph Model


                                                                            Direct linking
            ID                      1                                      without external
            TYPE                    Person                                     indices
            REVISION                20101014…                                                 Bob
            Name                    Alice                                                      ID = 2
            Age                     21                                                        Age = 23


            Boyfriend
            Friends

            FavColors               Red, Green                                                 Carol
                                                                                                ID = 3
            Address.Street          1 Infinite Loop                                            Age = 20
            Address.Town            Cupertino
                                                                       Close to Object- and
                                                                       Document-Databases
 Achim Friedland <achim@sones.de>          Database Pro Power Days , 10/20/2010                           7
Photo: Gephi, flickr




                       The Property-Graph Model
                                               using RDF-like semantics
                                                                              + Unambiguous identifiers
                                                                              + Named relations
                                                                              + Close to RDF molecules
    ID                    ID    http://test.com/vertices/1
    rdf:type              TYPE http://test.com/#person
    sones:revId           REVISION          20101014…                                             Bob
    foaf:name             Name              Alice                                                 ID = 2
    foaf:age              Age               21                                                   Age = 23


    person      Boyfriend
    Set<person> Friends

    List<string> FavColors                  Red, Green                                            Carol
                                                                                                   ID = 3
    XML                   Address                                                                 Age = 20
    gn:streeet            Address.Street    1 Infinite Loop
    gn:town               Address.Town      Cupertino
 Achim Friedland <achim@sones.de>           Database Pro Power Days , 10/20/2010                             8
Photo: Large Magellanic Cloud, ESO




                                Graph-Databases in a cloud
                                                               • Vertices and edges are resources
                                                               • Access via e.g. http://test.com/vertices/[$id]
                                                               • Common CRUD operations (GET, POST, PUT…)



                                                                                         + Atomicity
                                                                                         + Statelessness
                                                                                         + Idempotence
                                                                                         + Parallelism
                                      GraphDB

                                       REST

                                     Hypermedia             • Representation must be „link-aware“
                                                                e.g. XML+XLINK, ATOM, RDFa…
                                                            • Representation should be self-describing

 Achim Friedland <achim@sones.de>                 Database Pro Power Days , 10/20/2010                            9
Photo: bombeador, flickr




            Graph
     2. The Object-relational
          Impedance Mismatch
 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   10
Photo: bombeador, flickr




      Inflexible relational schemata

             • Expensive ALTER TABLE operations
             • Entity-Attribute-Value Model ↔ RDF
             • No semi-/unstructured data
                    XML, JSON, … hierarchies, graphs, … binary data
             • No Multi-Attribute Values
                    List<String>, Set<Integer>, Set<Person>
             • No simple way for versioned data

 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   11
Photo: bombeador, flickr




      Relational Anti-Patterns:

             • Relations via foreign key constraints
                    No explicit concept for relations
                    No index-free adjacency
             • Querying relational data via JOINs is hard
                    Just storing a graph was never a challenge ;)
             • No recursive JOINs
                    Inefficient query processing
                    (Except: Oracle’s “CONNECTED BY”)


 Achim Friedland <achim@sones.de>    Database Pro Power Days , 10/20/2010   12
Photo: shamballah, flickr




       SQL and Cloud-Readiness?

             • No explicit scaling or partitioning within
               the relational model
             • No JOINs between different databases
               and/or vendors
             • No well interaction with state-of-the-art
               web technologies
                     e.g. HTTP/REST, Hypermedia, Semantic Web


 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   13
Photo: Gephi, flickr




                       3. Benefits of Graph-Databases




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   14
Photo: Gephi, flickr




                The explicit graph data model
             provides a higher level of abstraction
              and a better understanding of the
                        domain model.



 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   15
Photo: Gephi, flickr




                       Index-free adjacency provides an
                        improved scalability, data-locality
                          and a superior graph traversal
                                  performance.

                              ( Independent of the size of the graph )

 Achim Friedland <achim@sones.de>        Database Pro Power Days , 10/20/2010   16
Photo: squacco, flickr




                  Consistency criteria and indices for
                    simple attributes up to complex
                          subgraph structures.




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   17
Photo: Khem, flickr




           Traversing linked information, finding
                shortest-paths, do semantic
                          partitions.




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   18
Photo: NASA, flickr




           personal                 social        item-related

                      Recommendation and discovery
                      of potentially interessting linked
                                 information.




 Achim Friedland <achim@sones.de>            Database Pro Power Days , 10/20/2010   19
Photo: Birger Hoppe, flickr




            Good integration into state-of-the-art
               programming concepts and web
                        technologies.




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   20
Photo: Large Magellanic Cloud, ESO




                     Graph-Databases, REST and RDF
                   symantics are a solid foundation for
                             cloud services




 Achim Friedland <achim@sones.de>    Database Pro Power Days , 10/20/2010   21
Photo: Gephi, flickr




                         4. Graph data in the cloud
                              using .NET / Mono




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   22
Photo: sones




                                    sones GraphDB

         •     URL                     http://www.sones.de
         •     License                 AGPLv3
         •     Language                C# 4.0
         •     Goals                   Management of linked data
         •     Concurrency             MVCC
         •     Repl./Scaling           p2p (alpha)
         •     Persistency             Proprietary file system
         •     Cloud                   Connector for Microsoft Azure



 Achim Friedland <achim@sones.de>     Database Pro Power Days , 10/20/2010   23
Photo: sones




                                     sones Architecture

                                                       GraphDS
                                             REST, WebShell, C# API


                                                      GraphDB
                                         GQL, Graph Traversals, Indices


                                                  GraphFS
                                     Object Management, (De-)Serialization


                                    Host File System / Microsoft Azure



 Achim Friedland <achim@sones.de>            Database Pro Power Days , 10/20/2010   24
Photo: sones




                                               Shared nothing


                                                                             GraphDB 1

                                                 GraphDS 1
                                                                             GraphFS 1
               User
                                       it
                                    depends…
                                                                                         Azure
                                                                             GraphFS 2
                                                 GraphDS 2

                                                                             GraphDB 2




 Achim Friedland <achim@sones.de>                Database Pro Power Days , 10/20/2010            25
Photo: sones




                           sones Property-Hypergraph

                                                                   Edge

                                                                          User Friend                    Bob
                                                                                                          ID = 2
                                                                      since = 2009/09/21
                                     Hyperedge                                                          Alter = 23


                 Alice              SET<User> Friends
                  ID = 1                                                                Virtual -Edge
                                     SetMaxNumber = 12
                Alter = 21

                                    Hyperedge-Properties
                                                                          User Friend                   Carol
                                                                                                          ID = 3
                                                                      since = 2010/04/11
                                                                                                        Alter = 20




 Achim Friedland <achim@sones.de>                Database Pro Power Days , 10/20/2010                                26
Photo: sones




                           sones Property-Hypergraph


         • Properties may include code as data
                Think of stored procedures; C#: Func<…>, ExpressionTrees

         • Allows hyperedge calculations be done among
           the set of their edges
                (GetMinWeight, SetMaxNumber, …)




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010
                                        NoSQL Frankfurt , 9/28/2010        27
Photo: Shayne Kaye, flickr




                             sones Graph Query Language

              FROM User SELECT User.Friends.Friends.Name

          •         “SQL for graphs” providing a user-friendly DSL for ad-
                    hoc graph queries and graph discovery
          •         Functions and aggregates are type-safe and can be
                    extended by your own plug-ins, e.g.
                    • SELECT COUNT(User.Friends)
                    • SELECT User.Friends.Random(2)
                    • SELECT User.Friends.Name.Substring(2,5)




 Achim Friedland <achim@sones.de>       Database Pro Power Days , 10/20/2010   28
Photo: Gephi, flickr




                        sones Graph Query Language
          // sones gql example

             CREATE VERTEX User
                    ADD ATTRIBUTES (String Name, SET<User> Friends)
                    INDICES (Name)
                    MANDATORY (Name)

             INSERT INTO User VALUES (Name = "Alice", Age = 21)
             INSERT INTO User VALUES (Name = "Bob", Age = 23)

             LINK User(Name = ‘Alice') VIA Friends TO User(Name = ‘Bob')
             LINK User(Name = ‘Bob') VIA Friends TO User(Name = ‘Alice‘)



 Achim Friedland <achim@sones.de>    Database Pro Power Days , 10/20/2010   29
Photo: Gephi, flickr




                                          C# API
          // C# API type creation

             var _Person = _GraphDB.TypeManager.
                   CreateVertex(„Person“).
                   AddString(„Name“, mandatory: true, indexed: true).
                   AddLoop(„Friends”, hyperEdge: true).
                   execute();

              Type _PersonT = _GraphDB.TypeManager.
                              GenerateType(_Person);




 Achim Friedland <achim@sones.de>   Database Pro Power Days , 10/20/2010   30
Photo: Gephi, flickr




                                                  C# API
          // C# API vertex initialization

              Person _Alice = _GraphDB.TypeManager.ActivateVertex(
                                         _Person, new VertexUUID(1));

              _Alice.Name             = „Alice“;

              dynamic _Alice2         = _Alice;
              _Alice.Age              = 21;
              _Alice.bdayparty        = (Action) (() => { _Alice.Age++; });

              _Alice.bdayparty();




 Achim Friedland <achim@sones.de>           Database Pro Power Days , 10/20/2010   31
Photo: Gephi, flickr




                                                     C# API
          // sones C# API example

            var _Friends = new GraphAttribute(„Friends“, Type: „foaf:knows“);

            var _Bob                = _GraphDB.TypeManager.ActivateVertex(
                                                           _Person, new VertexUUID(2));

            _Alice.Link(_Friends, _Bob);
            _Bob.Link(_Friends, _Alice);




 Achim Friedland <achim@sones.de>              Database Pro Power Days , 10/20/2010       32
Photo: Gephi, flickr




                                                  C# API
          // Graph Traversals

             Public T TraverseVertex<T> (
                 IVertex                             myStartVertex,
                 TraversalOperation                  TraversalOperation =
                                                         TraversalOperation.BreathFirst,
                       Func<IVertex, IEdge, Boolean> myFollowThisEdge   = null,
                       Func<IVertex, Boolean>        myMatchEvaluator   = null,
                       Action<IVertex>               myMatchAction      = null,
                       Func<TraversalState, Boolean> myStopEvaluator    = null,
                       Func<IEnumerable<IVertex>, T> myWhenFinished     = null)
             {
                          // Traverse the graph
             }




 Achim Friedland <achim@sones.de>           Database Pro Power Days , 10/20/2010           33
sones
      For more information…




                                            achim@sones.de
                                      http://www.twitter.com/ahzf
                                   http://www.twitter.com/graphdbs

Achim Friedland <achim@sones.de>         Database Pro Power Days , 10/20/2010           34

More Related Content

Viewers also liked

Context-Aware Access Control for RDF Graph Stores
Context-Aware Access Control for RDF Graph StoresContext-Aware Access Control for RDF Graph Stores
Context-Aware Access Control for RDF Graph StoresSerena Villata
 
Supporting Argumentative Discussions Management in the Web
Supporting Argumentative Discussions Management in the WebSupporting Argumentative Discussions Management in the Web
Supporting Argumentative Discussions Management in the WebSerena Villata
 
Fosdem 2011 - A Common Graph Database Access Layer for .Net and Mono
Fosdem 2011 - A Common Graph Database Access Layer for .Net and MonoFosdem 2011 - A Common Graph Database Access Layer for .Net and Mono
Fosdem 2011 - A Common Graph Database Access Layer for .Net and MonoAchim Friedland
 
Security and Privacy in the current e-mobility charging infrastructure
Security and Privacy in the current e-mobility charging infrastructureSecurity and Privacy in the current e-mobility charging infrastructure
Security and Privacy in the current e-mobility charging infrastructureAchim Friedland
 
Context-Aware Access Control and Presentation of Linked Data
Context-Aware Access Control and Presentation of Linked DataContext-Aware Access Control and Presentation of Linked Data
Context-Aware Access Control and Presentation of Linked DataLuca Costabello
 
On-Demand RDF Graph Databases in the Cloud
On-Demand RDF Graph Databases in the CloudOn-Demand RDF Graph Databases in the Cloud
On-Demand RDF Graph Databases in the CloudMarin Dimitrov
 
BigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-ReduceBigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-ReduceLilia Sfaxi
 

Viewers also liked (12)

Context-Aware Access Control for RDF Graph Stores
Context-Aware Access Control for RDF Graph StoresContext-Aware Access Control for RDF Graph Stores
Context-Aware Access Control for RDF Graph Stores
 
Supporting Argumentative Discussions Management in the Web
Supporting Argumentative Discussions Management in the WebSupporting Argumentative Discussions Management in the Web
Supporting Argumentative Discussions Management in the Web
 
Fosdem 2011 - A Common Graph Database Access Layer for .Net and Mono
Fosdem 2011 - A Common Graph Database Access Layer for .Net and MonoFosdem 2011 - A Common Graph Database Access Layer for .Net and Mono
Fosdem 2011 - A Common Graph Database Access Layer for .Net and Mono
 
Abstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF DatasetsAbstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF Datasets
 
Access Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract ModelsAccess Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract Models
 
Hadoop HDFS Concepts
Hadoop HDFS ConceptsHadoop HDFS Concepts
Hadoop HDFS Concepts
 
Security and Privacy in the current e-mobility charging infrastructure
Security and Privacy in the current e-mobility charging infrastructureSecurity and Privacy in the current e-mobility charging infrastructure
Security and Privacy in the current e-mobility charging infrastructure
 
Big Data Concepts
Big Data ConceptsBig Data Concepts
Big Data Concepts
 
Context-Aware Access Control and Presentation of Linked Data
Context-Aware Access Control and Presentation of Linked DataContext-Aware Access Control and Presentation of Linked Data
Context-Aware Access Control and Presentation of Linked Data
 
Hadoop Graph Analysis par Thomas Vial
Hadoop Graph Analysis par Thomas VialHadoop Graph Analysis par Thomas Vial
Hadoop Graph Analysis par Thomas Vial
 
On-Demand RDF Graph Databases in the Cloud
On-Demand RDF Graph Databases in the CloudOn-Demand RDF Graph Databases in the Cloud
On-Demand RDF Graph Databases in the Cloud
 
BigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-ReduceBigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-Reduce
 

More from Achim Friedland

Open Source Transparency Software for E-Mobility
Open Source Transparency Software for E-MobilityOpen Source Transparency Software for E-Mobility
Open Source Transparency Software for E-MobilityAchim Friedland
 
11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...
11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...
11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...Achim Friedland
 
Chargy - E-Mobility Transparency Software
Chargy - E-Mobility Transparency SoftwareChargy - E-Mobility Transparency Software
Chargy - E-Mobility Transparency SoftwareAchim Friedland
 
Öffentliche Daten nutzen! Nur wie bekommen?
Öffentliche Daten nutzen! Nur wie bekommen?Öffentliche Daten nutzen! Nur wie bekommen?
Öffentliche Daten nutzen! Nur wie bekommen?Achim Friedland
 
Re-Using Open Data for Smart e-Mobility
Re-Using Open Data for Smart e-MobilityRe-Using Open Data for Smart e-Mobility
Re-Using Open Data for Smart e-MobilityAchim Friedland
 
Open Charging Cloud @ E-World 2017 in Essen
Open Charging Cloud @ E-World 2017 in EssenOpen Charging Cloud @ E-World 2017 in Essen
Open Charging Cloud @ E-World 2017 in EssenAchim Friedland
 
Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...
Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...
Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...Achim Friedland
 
Open Charging Cloud - Manage, Share and Incentivize Open Data
Open Charging Cloud - Manage, Share and Incentivize Open DataOpen Charging Cloud - Manage, Share and Incentivize Open Data
Open Charging Cloud - Manage, Share and Incentivize Open DataAchim Friedland
 
Towards a Security-aware Network Virtualization
Towards a Security-aware Network VirtualizationTowards a Security-aware Network Virtualization
Towards a Security-aware Network VirtualizationAchim Friedland
 
A Generalized Label-Forwarding Architecture for the Future Internet
A Generalized Label-Forwarding Architecture for the Future InternetA Generalized Label-Forwarding Architecture for the Future Internet
A Generalized Label-Forwarding Architecture for the Future InternetAchim Friedland
 
1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real WorldAchim Friedland
 
NoSQL Frankfurt 2010 - The GraphDB Landscape and sones
NoSQL Frankfurt 2010  - The GraphDB Landscape and sonesNoSQL Frankfurt 2010  - The GraphDB Landscape and sones
NoSQL Frankfurt 2010 - The GraphDB Landscape and sonesAchim Friedland
 

More from Achim Friedland (12)

Open Source Transparency Software for E-Mobility
Open Source Transparency Software for E-MobilityOpen Source Transparency Software for E-Mobility
Open Source Transparency Software for E-Mobility
 
11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...
11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...
11. Workshop der Fachgruppe Recht „IKT für Elektromobilität III“ - Chargy Ope...
 
Chargy - E-Mobility Transparency Software
Chargy - E-Mobility Transparency SoftwareChargy - E-Mobility Transparency Software
Chargy - E-Mobility Transparency Software
 
Öffentliche Daten nutzen! Nur wie bekommen?
Öffentliche Daten nutzen! Nur wie bekommen?Öffentliche Daten nutzen! Nur wie bekommen?
Öffentliche Daten nutzen! Nur wie bekommen?
 
Re-Using Open Data for Smart e-Mobility
Re-Using Open Data for Smart e-MobilityRe-Using Open Data for Smart e-Mobility
Re-Using Open Data for Smart e-Mobility
 
Open Charging Cloud @ E-World 2017 in Essen
Open Charging Cloud @ E-World 2017 in EssenOpen Charging Cloud @ E-World 2017 in Essen
Open Charging Cloud @ E-World 2017 in Essen
 
Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...
Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...
Can the e-Mobility Charging Infrastructure be a Blueprint for other IoT Proje...
 
Open Charging Cloud - Manage, Share and Incentivize Open Data
Open Charging Cloud - Manage, Share and Incentivize Open DataOpen Charging Cloud - Manage, Share and Incentivize Open Data
Open Charging Cloud - Manage, Share and Incentivize Open Data
 
Towards a Security-aware Network Virtualization
Towards a Security-aware Network VirtualizationTowards a Security-aware Network Virtualization
Towards a Security-aware Network Virtualization
 
A Generalized Label-Forwarding Architecture for the Future Internet
A Generalized Label-Forwarding Architecture for the Future InternetA Generalized Label-Forwarding Architecture for the Future Internet
A Generalized Label-Forwarding Architecture for the Future Internet
 
1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World
 
NoSQL Frankfurt 2010 - The GraphDB Landscape and sones
NoSQL Frankfurt 2010  - The GraphDB Landscape and sonesNoSQL Frankfurt 2010  - The GraphDB Landscape and sones
NoSQL Frankfurt 2010 - The GraphDB Landscape and sones
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Database Pro Power Days 2010 - Graph data in the cloud using .NET

  • 1. Photo: Large Magellanic Cloud, ESO 19./20. Oktober 2010 Nürnberg www.databasepro-powerdays.de sones Graph Data in the cloud using .NET Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 1
  • 2. Photo: funky64, flickr For 35 years information has been well-defined data within some tables jailed in closed database silos. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 2
  • 3. Photo: shamballah, flickr The relational model and SQL have become much too limited for open linked data and cloud requirements. == graph data Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 3
  • 4. Photo: shamballah, flickr Application 1 Application 2 Applications can not access, under- stand and process ? ? unknown relational DB 1 DB 2 data easily. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 4
  • 5. Photo: Gephi, flickr 1. Graph-Databases Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 5
  • 6. Photo: Gephi, flickr The Property-Graph Model Vertex Edge Alice Friends Bob ID = 1 since = 2009/09/21 ID = 2 Age = 21 reason = classmates Age = 23 Edge- Vertex- Properties Properties Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 6
  • 7. Photo: Gephi, flickr The Property-Graph Model Direct linking ID 1 without external TYPE Person indices REVISION 20101014… Bob Name Alice ID = 2 Age 21 Age = 23 Boyfriend Friends FavColors Red, Green Carol ID = 3 Address.Street 1 Infinite Loop Age = 20 Address.Town Cupertino Close to Object- and Document-Databases Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 7
  • 8. Photo: Gephi, flickr The Property-Graph Model using RDF-like semantics + Unambiguous identifiers + Named relations + Close to RDF molecules ID ID http://test.com/vertices/1 rdf:type TYPE http://test.com/#person sones:revId REVISION 20101014… Bob foaf:name Name Alice ID = 2 foaf:age Age 21 Age = 23 person Boyfriend Set<person> Friends List<string> FavColors Red, Green Carol ID = 3 XML Address Age = 20 gn:streeet Address.Street 1 Infinite Loop gn:town Address.Town Cupertino Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 8
  • 9. Photo: Large Magellanic Cloud, ESO Graph-Databases in a cloud • Vertices and edges are resources • Access via e.g. http://test.com/vertices/[$id] • Common CRUD operations (GET, POST, PUT…) + Atomicity + Statelessness + Idempotence + Parallelism GraphDB REST Hypermedia • Representation must be „link-aware“ e.g. XML+XLINK, ATOM, RDFa… • Representation should be self-describing Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 9
  • 10. Photo: bombeador, flickr Graph 2. The Object-relational Impedance Mismatch Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 10
  • 11. Photo: bombeador, flickr Inflexible relational schemata • Expensive ALTER TABLE operations • Entity-Attribute-Value Model ↔ RDF • No semi-/unstructured data XML, JSON, … hierarchies, graphs, … binary data • No Multi-Attribute Values List<String>, Set<Integer>, Set<Person> • No simple way for versioned data Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 11
  • 12. Photo: bombeador, flickr Relational Anti-Patterns: • Relations via foreign key constraints No explicit concept for relations No index-free adjacency • Querying relational data via JOINs is hard Just storing a graph was never a challenge ;) • No recursive JOINs Inefficient query processing (Except: Oracle’s “CONNECTED BY”) Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 12
  • 13. Photo: shamballah, flickr SQL and Cloud-Readiness? • No explicit scaling or partitioning within the relational model • No JOINs between different databases and/or vendors • No well interaction with state-of-the-art web technologies e.g. HTTP/REST, Hypermedia, Semantic Web Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 13
  • 14. Photo: Gephi, flickr 3. Benefits of Graph-Databases Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 14
  • 15. Photo: Gephi, flickr The explicit graph data model provides a higher level of abstraction and a better understanding of the domain model. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 15
  • 16. Photo: Gephi, flickr Index-free adjacency provides an improved scalability, data-locality and a superior graph traversal performance. ( Independent of the size of the graph ) Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 16
  • 17. Photo: squacco, flickr Consistency criteria and indices for simple attributes up to complex subgraph structures. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 17
  • 18. Photo: Khem, flickr Traversing linked information, finding shortest-paths, do semantic partitions. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 18
  • 19. Photo: NASA, flickr personal social item-related Recommendation and discovery of potentially interessting linked information. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 19
  • 20. Photo: Birger Hoppe, flickr Good integration into state-of-the-art programming concepts and web technologies. Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 20
  • 21. Photo: Large Magellanic Cloud, ESO Graph-Databases, REST and RDF symantics are a solid foundation for cloud services Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 21
  • 22. Photo: Gephi, flickr 4. Graph data in the cloud using .NET / Mono Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 22
  • 23. Photo: sones sones GraphDB • URL http://www.sones.de • License AGPLv3 • Language C# 4.0 • Goals Management of linked data • Concurrency MVCC • Repl./Scaling p2p (alpha) • Persistency Proprietary file system • Cloud Connector for Microsoft Azure Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 23
  • 24. Photo: sones sones Architecture GraphDS REST, WebShell, C# API GraphDB GQL, Graph Traversals, Indices GraphFS Object Management, (De-)Serialization Host File System / Microsoft Azure Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 24
  • 25. Photo: sones Shared nothing GraphDB 1 GraphDS 1 GraphFS 1 User it depends… Azure GraphFS 2 GraphDS 2 GraphDB 2 Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 25
  • 26. Photo: sones sones Property-Hypergraph Edge User Friend Bob ID = 2 since = 2009/09/21 Hyperedge Alter = 23 Alice SET<User> Friends ID = 1 Virtual -Edge SetMaxNumber = 12 Alter = 21 Hyperedge-Properties User Friend Carol ID = 3 since = 2010/04/11 Alter = 20 Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 26
  • 27. Photo: sones sones Property-Hypergraph • Properties may include code as data Think of stored procedures; C#: Func<…>, ExpressionTrees • Allows hyperedge calculations be done among the set of their edges (GetMinWeight, SetMaxNumber, …) Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 NoSQL Frankfurt , 9/28/2010 27
  • 28. Photo: Shayne Kaye, flickr sones Graph Query Language FROM User SELECT User.Friends.Friends.Name • “SQL for graphs” providing a user-friendly DSL for ad- hoc graph queries and graph discovery • Functions and aggregates are type-safe and can be extended by your own plug-ins, e.g. • SELECT COUNT(User.Friends) • SELECT User.Friends.Random(2) • SELECT User.Friends.Name.Substring(2,5) Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 28
  • 29. Photo: Gephi, flickr sones Graph Query Language // sones gql example CREATE VERTEX User ADD ATTRIBUTES (String Name, SET<User> Friends) INDICES (Name) MANDATORY (Name) INSERT INTO User VALUES (Name = "Alice", Age = 21) INSERT INTO User VALUES (Name = "Bob", Age = 23) LINK User(Name = ‘Alice') VIA Friends TO User(Name = ‘Bob') LINK User(Name = ‘Bob') VIA Friends TO User(Name = ‘Alice‘) Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 29
  • 30. Photo: Gephi, flickr C# API // C# API type creation var _Person = _GraphDB.TypeManager. CreateVertex(„Person“). AddString(„Name“, mandatory: true, indexed: true). AddLoop(„Friends”, hyperEdge: true). execute(); Type _PersonT = _GraphDB.TypeManager. GenerateType(_Person); Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 30
  • 31. Photo: Gephi, flickr C# API // C# API vertex initialization Person _Alice = _GraphDB.TypeManager.ActivateVertex( _Person, new VertexUUID(1)); _Alice.Name = „Alice“; dynamic _Alice2 = _Alice; _Alice.Age = 21; _Alice.bdayparty = (Action) (() => { _Alice.Age++; }); _Alice.bdayparty(); Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 31
  • 32. Photo: Gephi, flickr C# API // sones C# API example var _Friends = new GraphAttribute(„Friends“, Type: „foaf:knows“); var _Bob = _GraphDB.TypeManager.ActivateVertex( _Person, new VertexUUID(2)); _Alice.Link(_Friends, _Bob); _Bob.Link(_Friends, _Alice); Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 32
  • 33. Photo: Gephi, flickr C# API // Graph Traversals Public T TraverseVertex<T> ( IVertex myStartVertex, TraversalOperation TraversalOperation = TraversalOperation.BreathFirst, Func<IVertex, IEdge, Boolean> myFollowThisEdge = null, Func<IVertex, Boolean> myMatchEvaluator = null, Action<IVertex> myMatchAction = null, Func<TraversalState, Boolean> myStopEvaluator = null, Func<IEnumerable<IVertex>, T> myWhenFinished = null) { // Traverse the graph } Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 33
  • 34. sones For more information… achim@sones.de http://www.twitter.com/ahzf http://www.twitter.com/graphdbs Achim Friedland <achim@sones.de> Database Pro Power Days , 10/20/2010 34