Skip to main content

Modern Analytics Stack

· 4 min read
Siva Dirisala
Creator of SQL Frames

Technologies like React have pushed the boundaries of web applications from each interaction is a separate page to the entire app being in a single page tremendously improving the user experience. These technologies also support server-side rendering making it possible to render the entire markup on the server. This helped to create next generation static site generators that leverage this wonderful Javascript technology and provide highly interactive web sites that are pre-rendered and generated making the entire site static to serve the content which can then become dynamic if needed on the client-side using JavaScript.

This resulted in a design paradigm called JAMSTACK for making websites and docs.

Remember JQuery and other libraries before React, Angular and Vue web app development frameworks came into existence? While JQuery provided a way to write cross-browser applications, React and related technologies provided a new paradigm to web application development called Single Page Applications (SPAs). SPAs manage the state of the application and render part of the webpage that changed. Since DOM manipulation is expensive, rendering the model to the UI using virtual dom (VDOM), doing a diff with the underlying DOM and finally making minimal changes to the DOM required to keep it in sync with the model is a powerful technique that enabled very smooth UX.

The key for building complex single page applications is the separation of the model and presentation. Historically analytics has the separation of the model and presentation similar to the pre-SPA applications, the model (mostly a SQL query) on the server and the final presentation (likely a chart or a pivot table) on the client. This often results in painfully slow user interactions when there is a heavy load on the server. That is why even a highly scalable solution like Big Query still provides an accelerator called Big Query BI Engine. This is still done on the server side and while it mitigates the problem with in-memory analytics, it doesn't completely eliminate it.

Single Page Analytics

SQL Frames envisioned, single page analytics, a technology where the analytics model and the presentation can live on the client side providing milliseconds latency interactions. Since the model definition exists on the client, it can intelligently decide whether to present the results from the in-browser in-memory cache or need to fetch them from the server. Further the model is not limited to just caching a bunch of data. Instead, the model comes with a full DQL analytics engine that supports data transformations using familiar SQL constructs.

JAMSTACK Analytics

Historically analytics have been limited to dashboards. Dashboards are mostly rigid in their layout and do not offer the kind of user interactions that users have come to expect using great websites in their personal lives. Analytics UX needs modernization and this can be done leveraging JAMSTACK.

JAMSTACK analytics provides the following advantages to the users

  1. Ability to mix traditional data analytics components like tables and charts with other types of media and text to tell the story.
  2. Data analysts can craft the narrative of their data using simple markup.
  3. Data from multiple sources can be brought together and stitched into a single interactive analytics website.

One barrier to creating JAMSTACK analytics is the availability of analytics widgets that can play well with JAMSTACK. SQL Frames is designed ground up to be a Typescript based analytics engine with powerful UI and charting capabilities ensuring it can be integrated with JAMSTACK. In fact, this website is based on jamstack and the examples in the documentation are live interactive widgets that are executed on page load.

Here is an example of embedding a jamstack analytics component directly into this blog post. The S.penguins data below is shared across all the pages within this website. Click on any bar in the chart below to see the interactivity among the charts and also the table below it.

Loading...

SQL Frames provides this and many more features to make it easy for you to craft your data story or consume the story created by someone else. See the documentation for more details.