<?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 Apurva Shah on Medium]]></title>
        <description><![CDATA[Stories by Apurva Shah on Medium]]></description>
        <link>https://medium.com/@apurva.bs?source=rss-449b0c4f4af8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KjPoT835EjjdKUb57TpSjg.png</url>
            <title>Stories by Apurva Shah on Medium</title>
            <link>https://medium.com/@apurva.bs?source=rss-449b0c4f4af8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 20:27:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@apurva.bs/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[Universal Dashboarding Platform (UDP) — Data Visualisation Platform at Myntra]]></title>
            <link>https://medium.com/myntra-engineering/universal-dashboarding-platform-udp-data-visualisation-platform-at-myntra-5f2522fcf72d?source=rss-449b0c4f4af8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f2522fcf72d</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Apurva Shah]]></dc:creator>
            <pubDate>Tue, 25 Apr 2017 19:12:57 GMT</pubDate>
            <atom:updated>2017-04-25T19:12:57.901Z</atom:updated>
            <content:encoded><![CDATA[<p>Data Products team at Myntra started building a new product once a basic capability to access data was provided to everyone at Myntra in the form of <a href="https://medium.com/myntra-engineering/data-products-self-service-query-platform-ddp-3af1d0f1123b#.37iak6jlj">DDP</a>. Next pitstop was creating a data visualisation platform for Myntra which is knows as Universal Dashboarding Platform (UDP) today.</p><blockquote>Data visualisation is very important as picture is worth a thousand words</blockquote><p>Everyone doesn’t know how to write SQL queries and hence in order to increase the use of data or to democratise data, it is important to provide users with an interface that allows them to interact with data without knowing any technical details to extract data. Users should have capability to slice and dice the data with rich set of data visualisations and create dashboards that can be used regularly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYtmldrAzKljLUoqHxzkkQ.jpeg" /><figcaption>UDP — Sample Dashboard</figcaption></figure><p><strong><em>Why should we create our own data visualisation platform when so many commercial tools are available in market already?</em></strong></p><ul><li>Build a generic platform that can serves as data catalog, data api’s and cool visualisation platform for analytics</li><li>Ability to customise the platform as per the needs of Myntra business</li><li>Standardise the basic business metrics and its definitions with a single platform</li><li>Flexibility to scale the platform as business and data grows over time</li></ul><h3>UDP Overview</h3><p>UDP comprises of Dashboards and Widgets. Each dashboard is collection of multiple widgets. Widget is independent entity that represents some form of data visualisation. Widgets are resizable and can be placed anywhere in dashboard by drag and drop. Navigation component on the left hand side allows easy accessibility across various dashboards and a filter component on the right hand side allows to filter dashboard data by specific values.</p><p>There are lots of features built in:</p><ul><li><strong><em>Share dashboards</em></strong> with team members, mark your favourite dashboards</li><li><strong><em>Schedule</em></strong> the dashboards as email reports daily/weekly/monthly</li><li><strong><em>Export</em></strong> chart widgets as image or export the data in CSV format, ability to even obtain raw data for widget in CSV format</li><li><strong><em>Compare data</em></strong> for two date ranges, allows to visualise the comparative performance for two time periods</li><li><strong><em>Explore data</em></strong> allows to play with data and visualisations, very helpful for exploring the datasets without need to create widgets or dashboards</li><li><strong><em>Business Alerting</em></strong> allows ability to define rules on metrics that will trigger alert, very useful to keep check of drastic drop/increase in any metric</li><li><strong><em>Data extracts</em></strong> provides capability to get new dataset in the metric store by writing a SQL on top of granular data in the data warehouse</li><li><strong><em>Custom drill-downs, conditional formatting, derived metrics </em></strong>etc. are the customised features that helps more with data visualisations</li></ul><h3>Technical Details</h3><p>UDP is broken down into multiple independent components that helps to achieve more than just having a data visualisation platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/0*lS_xzaur4gZqLJ8p." /><figcaption>UDP Architecture Diagram</figcaption></figure><h4>Backend Services</h4><p>There are two types of services:</p><ol><li><strong>Data Services</strong> — A generic backend services that serves data based on input parameters and is not dependent on any visualisations. This layer is exposed as REST API which are generically consumed by other applications at Myntra some of which are customer facing applications as well.</li><li><strong>UDP Services</strong> — A service layer that saves users interaction with visualisation interface. This layer is also acting as a bridge between UI and Data Services and performing very thin semantic changes on the data passing through this layer.</li></ol><ul><li><em>Java, Tomcat, Jersey, Spring &amp; Hibernate </em>for implementing REST web-services and application service layer</li></ul><h4>Data Caching</h4><p>This acts as one of the key component to help provide faster data by minimising the number of database queries. Cache hits are generally served in milliseconds and database hits take few seconds depending on the type of data being requested.</p><ul><li><em>Redis </em>is used to as data cache. Data gets stored in cache once it is requested by any user and if same data is requested by other user then it is served out of cache itself. Data is cached by generating a unique key based on request parameters of data services API</li></ul><blockquote>A pre-cacher is implemented that scans through all the dashboards created by user or accessed by users in last X days and it caches the data with default date for all the dashboards. This ensures super fast first load of any dashboard being accessed by user.</blockquote><h4>User Interface</h4><ul><li>Unity Framework of Myntra that uses <em>ReactJS</em> and <em>NodeJS</em> for user interface</li></ul><h4>Metric Store</h4><p>Data in the metric store is structured in form of collections, metrics and dimensions. Each collection stores the data of co-related metrics at specific dimensions. User can also define derived metrics by defining operations on metrics.</p><blockquote>UDP can support any ANSI SQL compliant database as metric store</blockquote><ul><li><em>AWS Redshift</em> as Metric Store</li></ul><h4>Metadata (Data Catalog)</h4><p>Metadata store acts as an understanding layer between metric data store and UDP. The metadata store is responsible to define collections, metrics and dimensions mapped to a table in SQL world. It also supports definition of each metric that is eventually displayed to end user of UDP. It supports various additional features like formula definitions, type of metrics (e.g. Aggregate Metrics Vs Snapshot Metrics), visibility of metric or dimension etc. There are set of REST API defined that enables easy discovery of collections, metrics and dimensions</p><ul><li><em>MySQL</em> is used as metadata store as well as for application data store for UDP services</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8rz__JMRNsWbzyIDq8bwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYtmldrAzKljLUoqHxzkkQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oHzjFqWACMgO2DGQMY0AVw.png" /><figcaption>UDP Visualisations</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f2522fcf72d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/myntra-engineering/universal-dashboarding-platform-udp-data-visualisation-platform-at-myntra-5f2522fcf72d">Universal Dashboarding Platform (UDP) — Data Visualisation Platform at Myntra</a> was originally published in <a href="https://medium.com/myntra-engineering">Myntra Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Products — Self Service Query Platform (DDP)]]></title>
            <link>https://medium.com/myntra-engineering/data-products-self-service-query-platform-ddp-3af1d0f1123b?source=rss-449b0c4f4af8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3af1d0f1123b</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[myntra]]></category>
            <category><![CDATA[redshift]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Apurva Shah]]></dc:creator>
            <pubDate>Thu, 02 Feb 2017 13:36:47 GMT</pubDate>
            <atom:updated>2017-02-02T13:36:47.753Z</atom:updated>
            <content:encoded><![CDATA[<p>My journey with Myntra started in early 2015 with Analytics team and I was assigned responsibility to develop data products at Myntra. This was the first time that I will work on analytics or big data, I had always been a full stack application developer on Java ecosystem.</p><p>First goal was to build a self-service platform that enables all the business users at Myntra with ability to get data, understand it and able to take decisions based on it. The journey started with building a tool that helps users to query the<strong> </strong>data available in data-warehouse</p><h3>Background</h3><p>Our data platform team had chosen <a href="https://aws.amazon.com/redshift/">Amazon Redshift</a> as it was a petabyte scale data warehouse, didn’t need any definite investment in hardware, managed services and cloud deployment that is easy to scale. Our platform team was busy migrating the warehouse from MySQL to Amazon Redshift and meanwhile there was a thought process to build a tool that can provide capability to query on Redshift rather than giving workbench access to all users. This will help in controlling data access, auditing data and even providing more capabilities on top of data warehouse.</p><h3>Data Democracy Portal (a.k.a DDP)</h3><p>A web based self-service query platform named as Data Democracy Portal, famously know as <strong>DDP</strong> at Myntra, germinated with primary goal of abstracting user access to data warehouse and provide additional capabilities to users.</p><p>First release of the tool had a single page web app that allowed user to submit the query and get the results. Data warehouse queries may take very long time to execute and hence we took a decision to have asynchronous query execution flow and send a notification email to user on completion of query.</p><p>Over the time DDP was enhanced to have many features which won’t have been possible with any traditional workbench:</p><ul><li><strong>Query List</strong>: List queries fired by user, helps to track and search queries fired by user</li><li><strong>Access Restriction</strong>: Role based access restriction on the underlying data as well as approval workflow for getting roles</li><li><strong>Schedule Query</strong>: Provides capability to re-execute user query at scheduled time (daily, weekly, monthly). This is one of the most used feature as users need to get similar data repeatedly and now they can get it by scheduling query without need of coming to DDP.</li><li><strong>Query Grouping</strong>: User can group multiple queries and schedule them</li><li><strong>Temporary table</strong>: Create temporary tables in data warehouse by uploading CSV data file</li><li><strong>Schema explorer</strong>: Allows users to explore tables and columns in data warehouse along with capability to see sample data without need of submitting a query</li><li><strong>Direct API</strong>: Generic API that allowed other applications to access data programatically</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGTB2hD9UkIOaO54jfZyFA.png" /><figcaption>Data Democracy Portal (DDP)</figcaption></figure><h3>Technical Stack Under the Hood</h3><p>DDP is basically divided into two modules at very basic level, User Interface and Application Services.</p><p><strong>User Interface (Front-End)</strong></p><ul><li>Unity Framework of Myntra that uses <em>ReactJS</em> and <em>NodeJS</em> for user interface</li></ul><blockquote><strong>Unity Framework</strong> is a user-interface framework at Myntra that is used by all the internal applications at Myntra. Teams develop reusable components using ReactJS that can be reused across multiple applications with standard interface.</blockquote><p><strong>Application Services (Back-End)</strong></p><ul><li><em>Java, Tomcat &amp; Jersey</em> for implementing REST web-services and application service layer</li><li><em>Redis</em> for implementing application Queue</li><li><em>MySQL</em> for storing application Data</li><li><em>AWS Redshift</em> as data warehouse</li></ul><h3>Performance Considerations</h3><p>As DDP became very popular with our business users, we started experiencing performance issues with Redshift. Basically if there are too many queries executing concurrently on Redshift then its performance will be impacted. Also due to concurrency limit in Redshift, many queries will wait in Redshift WLM (Work Load Management) queues and will finally get aborted based on max. query execution time configured. In order to solve this, we introduced our own queueing mechanism that ensures only <strong><em>N</em></strong> queries are executing on database at any particular time and rest are waiting in application queue for their turn. We also implemented some intelligence to allow prioritisation of queries waiting in the application queue.</p><p>DDP also started blocking of queries based on parameters like incorrect joins or having too many values within IN clause (typically data warehouse are not designed for queries having thousands of items within IN clause). In order to implement blocking of queries, DDP implemented query plan (explain plan) parser that helps us discover a lot of parameters on how a query will perform.</p><p>Even after implementing these features, many a time DDP server used to die with OOM (Out Of Memory) errors and it was because some user would fire a query that fetched data which can’t fit in application memory. Obviously we cannot have RAM equivalent to huge data available in data warehouse. We had to implement cursor based data fetch to ensure that our server never runs out of memory. Also for queries that needs very huge data we utilized <a href="http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html">UNLOAD</a> feature of Redshift which allows to directly upload the result data to S3 without need to pull the data to application server.</p><h3>Concluding Thoughts</h3><p>Looking back, DDP became the first self-service tool that enabled lot of automated reporting by user themselves even to the extent that people don’t want to move out of DDP even when well defined reports are provided to them as of today. By providing self-service of data, DDP enabled engineering team to do many important technical tasks without getting caught in data delivery and reporting only. Thanks to all the contributors and fantastic data products team who helped in building DDP.</p><p>This is just the first post from the series of products that have been built by data products team at Myntra. Stay tuned for further posts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3af1d0f1123b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/myntra-engineering/data-products-self-service-query-platform-ddp-3af1d0f1123b">Data Products — Self Service Query Platform (DDP)</a> was originally published in <a href="https://medium.com/myntra-engineering">Myntra Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>