LIFE SCIENCE

Quick Load, Quick Decisions: Cutting a Critical App's Wait Time from 7 Minutes to 30 Seconds.

Uncover the game-changing strategies that empowered a leading international biotech company to revolutionize their data analytics and decision-making, all through customized Shiny app solutions.

Unlocking Client Success:

7 Shiny applications

Developing 7 Shiny applications that are driving important decisions within an organization

Optimalization

Optimizing Shiny applications to load in just 0:30 seconds, down from 7:00 minutes

Business critical for the organization

Making R Shiny and Posit business critical for the organization

Posit Workbench and Posit Connect

Installing Posit Workbench and Posit Connect

The Challenge

Scientists want to focus on the scientific process and drug discovery. Data Scientists want to support teams with data analyses and insights.

Business and Project Management want accurate insight faster for decision-making.
Appsilon focuses on developing and scaling applications, letting each team focus on its specialty.

A Promising Partnership and Long-Term Collaboration

The relationship between us, and the client started with an inbound in 2020. Now the Appsilon team extension comprises 6 people with successful ongoing cooperation.

We work with 2 teams; one handling drug discovery, and the other performing translational research (related to genes). In total, we are developing 7 Shiny applications that are driving important decisions within an organization. At the moment, we are developing 4 concurrent applications.

Installing Posit (RStudio) Products

While working with the customer, we identified a need to help with the installation of Posit Workbench, and Posit Connect for one of the teams. Posit Workbench is a great tool to develop credible insights fast in both R, and Python.

The tool is well-suited for enterprise customers who value rapid development, and real-time collaboration. Posit Connect helps data scientists share insights quickly. This strengthens the cooperation with their stakeholders.

The successful deployment of Posit products alongside well-designed Shiny applications simplifies teams’ workload. As a Partner of Posit, Appsilon can show the Proof of Value of Posit products to business departments, helping you secure the budget.

Our experience has taught us that developing a successful PoC is helpful to convince the stakeholders and prepare the organization.

Impacting the daily life of our customers

Our client can focus on delivering business value, instead of developing the apps. Thanks to our work, the role and the impact on the business of our client continues to grow.

Scientists have faster access to information, data scientists spend less time on app development, and teams have enhanced decision-making tools.

Generating value with open-source R Packages

Apart from developing custom Shiny applications, providing consulting services, and implementing commercial licenses of Posit products, we help customers deliver value with our Rhino, and Data Validator packages.

It’s about a healthy ecosystem

To make sure that our teams are having an impact, we communicate with all involved parties.

We collaborate with the Head of Discovery Process, Associate Director, Senior and regular Data Scientists, and Posit representatives to make sure that the work done will help grow the business.

Developing Shiny applications

Customized Shiny applications have revolutionized data analysis, becoming indispensable tools for timely and data-driven decision-making within the organization.

Productizing the prototypes built by trainees

Prototypes initially created by trainees have been elevated to production-ready applications, bringing innovative solutions into everyday workflows.

Posit Connect, and Posit Workbench implementation

The implementation of Posit Workbench and Posit Connect has streamlined data analytics and collaboration, simplifying complex processes and enabling easier sharing of insights.

R Shiny apps deployed on Posit Connect are business-critical for the customer

R Shiny applications deployed on Posit Connect have become essential operational tools, underlining their critical importance to day-to-day business activities.

Increasing the users of R Shiny

The expanded user base of R Shiny has amplified its impact across multiple departments, leading to more efficient workflows and a culture of data-driven decision-making.

Supporting the Business, Data teams, and Posit representatives

Ongoing support and training have empowered teams to maximize the ROI on new tools and platforms, fostering a collaborative environment that benefits the entire organization.

Results

Our optimizations reduced a key Shiny app's load time to just 30 seconds, enabling quicker, more efficient decision-making for our client.

Through the integration of Posit Workbench and Posit Connect, we also enhanced data sharing and collaborative work across teams.

These improvements have had a tangible impact, particularly in the areas of drug discovery and gene-related research

From Lag to Lightning:
Transforming a 7-Minute Load Time into a Production-Quality App

Our client, the company that works on drugs to cure cancer and other serious diseases, created an internal Shiny app.

The goal of the app was to visualize clinical data from various studies. The app was created by one person on the client’s side, a Data Scientist.

It had thousands of lines of code, it was untested and generally messy; a not uncommon occurrence when an internal project grows in scope.

Load time

The application quickly became very important for internal teams of data scientists.

Such imperfections like messy code or the lack of unit tests could be ignored, but one thing couldn’t: The application took 7 minutes to load!

Appsilon take over

Our client asked Appsilon to take over, and fix this. What we found out that the app was that the production version of the app ran on a Linux VM where the data was read from local files.
The architecture of this solution is presented below.

Interation 1: From Bottlenecks to Breakthroughs

Improving this app was a challenge. We needed to ensure the possibility of uninterrupted work on the production version, remove the bugs in the production version when they were reported by the users, improve the app infrastructure, and add requested features.

We decided to leave the maintenance of the current version to the client’s team and created a separate branch for all the new changes. As a result, the users would get access to new functionalities only after redeployment in the new, improved version. But this approach helped us avoid the costs and risks related to deployment of the new version to the Linux VM.

More time could be spent on development and getting the Posit (RStudio) Connect version to a point where it could replace the Linux VM version faster. We moved the app to Posit (RStudio) Connect and integrated it with Profiler (a data lake used by the client). The first version of the new architecture was downloading the files from Profiler to the disk and the app read from there. Then Profiler was updated and with its new functionalities, we were able to update the architecture.

The app was fetching the views directly from Profiler, without the need to process the csv files. The study was only loaded when the user selected it (compared to loading all the data at the start of the app in the previous solution). We also introduced the cache.

All the changes significantly improved the loading time for the app.
It depended on the study, but now it was about 2 – 3 minutes
. Below is the architecture of this solution.

Iteration 2: Use data lake wisely

We were happy with the results, as the improvement was huge. However, the app still loaded slow for our standards. Our teams were heavily involved in developing the other Shiny applications, so further improvements to this application were not a priority.

Until one day, an important stakeholder marked the app as “not production ready”. This meant that we had to find a way to make it faster. Our teams brainstormed, and came up with four different ideas – one proved to be particularly important.

The final solution used a new functionality of Profiler to access the database directly, instead of using Profiler API. Thanks to this, we could read only the columns that were actually used by the app instead of the whole view as was done before.

We also added a progress bar that shows percentage progress to give the user an idea of where the app is in the process. Thanks to the changes, the app took 30 – 60 seconds to load depending on the study.

Below is the current architecture.

Get a free discovery call with Appsilon's expert.

Damian's Avatar
Damian Rodziewicz
Head of Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Explore Possibilities

Take Your Business Further with Custom Data Solutions

Unlock the full potential of your enterprise with our data services, tailored to the unique needs of Fortune 500 companies. Elevate your strategy—connect with us today!

Talk to our Experts