<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aditya Pawade on Medium]]></title>
        <description><![CDATA[Stories by Aditya Pawade on Medium]]></description>
        <link>https://medium.com/@aditya.pawade?source=rss-909b43b94112------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*dbQr3P4No649hoCQIPVAHQ.png</url>
            <title>Stories by Aditya Pawade on Medium</title>
            <link>https://medium.com/@aditya.pawade?source=rss-909b43b94112------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:09:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aditya.pawade/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Flipkart Commerce Graph - Evaluation of graph data stores]]></title>
            <link>https://blog.flipkart.tech/flipkart-commerce-graph-evaluation-of-graph-data-stores-8fe0f964affd?source=rss-909b43b94112------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fe0f964affd</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Aditya Pawade]]></dc:creator>
            <pubDate>Mon, 30 Jul 2018 06:48:48 GMT</pubDate>
            <atom:updated>2018-07-30T06:53:23.585Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flipkart Commerce Graph — Evaluation of graph data stores</h3><p>The shopping interests of customers keep changing with their lifestyle. A customer might want to shop for a book today and 3 months later shop for a laptop. With an increase in such behavioural changes, there was a need to relate such users. Commerce graph is one such solution at Flipkart to identify users with similar shopping patterns. It relates users and products based on the user’s behaviour on our website and apps.</p><p>Our commerce graph has approximately more than 500 million nodes and 2 billion edges. The graph involves buyers, sellers, products and categories in a single connected graph. Few use cases currently being powered by our commerce graph are:</p><ol><li>Generating features for insights ML models</li><li>Finding out heterogeneous users as beta and control set</li><li>Detecting fraudulent sellers and buyers</li><li>Sending targeted marketing campaign to users</li></ol><blockquote><em>A commerce graph is a data structure that connects products, categories, sellers and users who view or purchase products on Flipkart.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*EGL7l0Z_Dpir-4As" /></figure><p>As data traverses through a process flow in a given login session, the data graph becomes rich in information, linked, and voluminous. For a complex data-processing requirement, we needed a graph data storage solution that measures up to a set of Requirements — Functional, Non-functional and Graph-centric.</p><p>This article discusses Flipkart’s choice of Graph Data Store for Commerce Graph with details on the requirements and comparative study report of Labelled Property Graph (LPG) and Resource Description Framework (RDF).</p><h3>Requirements of Graph Data Store</h3><p>For Flipkart’s scale of data processing operations, the Graph Store needs to meet the following requirements:</p><h3>Functional Requirements</h3><h4>Bulk Read and Write</h4><p>Bulk write signals to the graph allowing high write QPS via a distributed computing system such as Spark or MR.<br>Bulk extraction that enables sharing the graph snippet dump with data scientists and avoid external dictionary reference to fetch data.</p><h4>Standard Query Language Support</h4><p>Standard Query Languages such as <a href="http://gremlindocs.spmallette.documentup.com/">Gremlin</a>, <a href="https://graphql.org/">GraphQL</a>, <a href="https://www.w3.org/TR/rdf-sparql-query/">SPARQL</a> simplify the Data Access Layer.</p><h4>Indexing Support</h4><p>Streaming updates need indexing and just-in-time modifications to support low latency queries and updated information.</p><h4>Low Latency Neighbourhood Traversal</h4><p>To traverse the Graph Data, we need to traverse the neighbourhood of nodes sometimes in n-hop traversals. The goal is to return results in a quick Turnaround Time.</p><h4>Sub Graph/Namespace Support:</h4><p>Ability to support multiple sub-graphs is a ‘good-to-have’ feature. The use of Sub-graph vs. Cross-graph queries requires prudent evaluation.</p><h3>Non-functional Requirements</h3><h4>Ease of Backups</h4><p>Support quick data back up to an external cluster and use this data to bootstrap itself with minimal intervention.</p><h4>Horizontal Scalability</h4><p>The underlying data store redistributes with no or minimal downtime with addition of new machines.</p><h4>Replication</h4><p>Ability to replicate data in a parallel node to make sure of an uninterrupted serve of Graph Data, if the current node fails.</p><h4>Consistency</h4><p>Support read-after-write consistency as every change in the environment of a node triggers a change notification to other systems, which query this node to update their models</p><h3>Graph-centric Requirements</h3><ul><li>Store connections as a graph</li><li>Support multiple access patterns</li><li>Allow quick traversal of the graph</li></ul><p>In addition, the Graph Store has to be available, idempotent, consistent, and scalable with increase in data storage &amp; access.</p><h3>Graph Storage Model Evaluation</h3><p>We considered the following Graph Data Storage Models:</p><ul><li>Labelled Property Graph (LPG)</li><li>Resource Description Framework (RDF)</li><li>Specialised Data Storage Model</li></ul><p>Here’s a Summary Content Card of a well-defined search query on google. We will use this as an example to show the differences in modelling of LPG &amp; RDF Graphs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/0*iyuF_1eiGxQe3M04" /><figcaption><em>Google uses Knowledge Graph to highlight summary cards next to the search results.</em></figcaption></figure><h3>Labelled Property Graph (LPG) Store</h3><p>The<strong> LPG Storage model </strong>is extensible and used when extensive storage and the ability to write a query are the requirements.</p><p>An LPG store has the following characteristics:</p><ul><li>The vertices (nodes) have a uniquely identifiable ID and a set of key-value pairs, or properties, that characterise them.</li><li>The edges (relations) have an ID, a type and a set of key value of pairs, or properties that characterise the connections.</li></ul><p>The following labelled property graph depicts the Summary Card illustration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*rbXFmq_hdVQA0AkEUn6xZg.png" /></figure><p>The LPG has certain elements in common with the RDF graph along with the following imperatives:</p><ul><li>The Nodes have an internal structure. <strong>Example</strong>: The Node ‘v-wall’ has properties such as <em>name</em> and <em>genre</em> to characterise the content stored in the node.</li><li>The Values of attributes do not represent the vertices in the graph. <strong>Example</strong>: The node ‘v-floyd’ has properties such as <em>Name</em> to characterize the content stored in the node.</li></ul><h3>The Resource Description Framework ( RDF) Store</h3><p><strong>RDF Storage model </strong>is mostly used in solutions which exchange data and metadata.<strong> </strong>At the core, is this notion of a ‘Triple’, which is a statement composed of three elements that represent two vertices connected by an edge. It’s called <strong><em>subject-predicate-object</em></strong>.</p><ul><li><strong>Subject</strong> is a resource, or a Node in the graph</li><li><strong>Predicate</strong> represents an edge–a Relationship</li><li><strong>Object</strong> is to be another node or a literal value. From the RDF perspective, this is another vertex.</li><li><strong>Resources</strong> (vertices/nodes) and <strong>Relationships</strong> (edges) are identified by a URI, which is a unique identifier</li></ul><p>The following RDF graph depicts the Summary Card illustration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*nZsxcpZf7AlnfU1N" /></figure><p>RDF store creates an atomic decomposition of the data, and we may find nodes in the graph that are resources and also literal values.</p><p>Resource Description Framework (RDF) triple stores and Labeled Property Graphs (LPG) provide ways to explore and depict the connected data. These data storage models have different strengths in different use cases. The Custom Data Store (Specialized Store) is a chosen Graph Data Storage model combining the properties of both RDF and LPG.</p><p>Here is a comparison chart of the three Graph Data Storage models based on various popular database study aspects.</p><h3>Storage Model Comparison: <br>LPG vs. RDF vs. Specialized / Custom Stores</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zpL5eXsbicu14L49" /></figure><h3>Conclusion</h3><p>After careful consideration of the aforesaid pointers, we have chosen the Labelled Property Graph (LPG) powered via <a href="http://janusgraph.org/">Janus Graph</a> (a fork of Titan Graph) as our way forward to implement data storage solution in our Commerce Graph Data Store.</p><p>While RDF is about ‘Data Exchange’, LPG is about ‘Storage and Query’. With customer-centricity as the crux of anything we do at Flipkart, LPG data store has enabled us to use its inherent strengths such as supporting bulk graph analysis and horizontal scalability, to connect the user behaviour and serve multiple use cases.</p><p><em>Watch this space for more insightful articles on the technical study, evaluation, and choices we make at Flipkart! Your Claps on this post encourage us and comments empower us to contribute better to the Technical World!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fe0f964affd" width="1" height="1" alt=""><hr><p><a href="https://blog.flipkart.tech/flipkart-commerce-graph-evaluation-of-graph-data-stores-8fe0f964affd">Flipkart Commerce Graph - Evaluation of graph data stores</a> was originally published in <a href="https://blog.flipkart.tech/">Flipkart Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>