Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantage of using Boomerang library vs Resource Timing API

I'm working on a project that is using Node.js on a back-end, and Angular.js as a front-end and I need to capture page load statistics for different resources of the app across different browsers. I was able to gather basic statistics by using Resource Timing API and storing the resulting JSON object on the server. But after reading this question on SO, I learned about Boomerang library and now I'm a bit confused. What would be the advantage of using Boomerang over Resource Timing API for a single page application (i.e. built in Angular)?

like image 398
Timka Avatar asked Feb 10 '23 16:02

Timka


1 Answers

Boomerang is an open-source library that measures the page load experience of your real users, often called Real User Monitoring (RUM). Boomerang measures many aspects of the page load experience, including all available network timings (DNS, TCP, request, response) of the main page and other important environment characteristics such as User Agent information, etc.

Boomerang was originally developed to help monitor "traditional" page loads, where each page you visit initiates a new browser navigation. In an Single-Page-App (SPA) scenario like with Angular.js, your visitors are no longer doing complete browser navigations when getting new content, as Angular is pulling in the required pieces via XHR as needed and injecting them into the DOM. Boomerang in a SPA scenario today will monitor the initial page load, but none of the subsequent SPA page loads.

If you're using ResourceTiming to gather the resources' networking statistics that you're interested in, and only care about those statistics, then you will not need Boomerang. However, if you're interested in gathering more information about the entire page load experience for the user, Boomerang gathers a lot more information about the page load experience and beacons back to your server.

Boomerang has a robust plugin infrastructure that supports extension to suite any scenario you want. While it doesn't currently "support" the SPA soft-page-load navigations out of the box, there is a plugin currently under development to help with SPAs.

like image 71
NicJ Avatar answered Feb 13 '23 06:02

NicJ