Grafana’s Radical App Platform: WebAssembly, Kubernetes and APIs 

Grafana’s Radical App Platform: WebAssembly, Kubernetes and APIs 

Grafana Labs is widening the scope of its widely popular Grafana panels for comprehensive observability and application support beyond its current plugin options.

As revealed at the recent GrafanaCon 2024 in Amsterdam during the talk “A User’s Guide to the Open Source Grafana App Platform” and during discussions with Ryan McKinley, Grafana distinguished engineer, the reach of plugins and how Grafana will accommodate applications and their API management are among the projects in the works for its newly introduced Grafana App Platform. This means that once the project sees general availability, Grafana capabilities will be extended to accommodate applications such as storage and multiple API management and will extend its observability capabilities to offer event-driven functionalities, Kubernetes management and other capabilities, such as GitOps with Argo and Kubectl.

“Currently, we have a powerful plugin ecosystem, but it mainly focuses on key tools for data sources and panels,” McKinley said during his talk. “For apps, you can build stuff, but you’re pretty much on your own for most of them” when integrating them with your Grafana panel.

Grafana’s “agnostic” view of an app using the SDK.

Grafana currently has an endpoint that will allow the user to have an HTTP endpoint to do “whatever you want, but you don’t get access to storage or access control,” McKinley said. “We’re trying to build a platform that enables you to build all of the normal things that we build in Grafana core,” he said. “So, this should enable building more dynamic and powerful applications.”

Grafana’s app platform provides a CLI for generating code and projects, according to Grafana’s documentation. Libraries are provided. In this way, Grafana’s app platform allows users to integrate applications, providing a wider range of availability and choice for applications they would like to integrate with Grafana. This integration goes beyond the status quo of using Grafana, typically consisting of selecting a list of plugins, and then working with those exclusively.

Grafana App Platform remains a work in progress, as indicated on the GitHub page.

Meanwhile, other applications for which you might currently require observability remain out of that sphere in many ways or pose difficulties in integrating with a Grafana panel, requiring you to create your own SDKs. With the app platform once completed, the opposite is true: You can create and bring your application, and with the design and redesign of the platform manager, you’re good to go by integrating the application with a similar facility to when the user selects from a list of available plugins. This covers observability of your choice for storage, Kubernetes cluster or other types of application management for observability.

The app platform SDK currently handles interaction with storage systems before other choices are introduced. According to the project’s documentation, the storage functionality covers surfacing simple interfaces for performing normal operations on resources in storage, as well as creating controller/operator loops that react to changes in the resources in the storage system.

And Wasm?

During the Q&A portion of the talk, a question was asked about integrating Wasm apps with Grafana. “We’re definitely discussing what our options are here and which is the right one for Wasm,” McKinley said. The resource-migration possibilities WebAssembly offers “would be really powerful,” he said.

While the focus is currently on Go functions, McKinley acknowledged the potential power of incorporating Wasm for resource migration and simplifying API server development by enabling storage of more declarative style changes. Additionally, Ryan sees promise in Wasm’s security benefits, saying it “offers a robust security story.”

During an offline discussion with Grafana CTO Tom Wilkie, Wilkie said he was intrigued by the idea of leveraging WebAssembly to add an extra layer of isolation when running untrusted code within applications. They note the performance overhead but find the concept of using a Wasm-compiled JavaScript engine to execute JavaScript code within applications to be a compelling use case. “You can start to run untrusted code in your browser embedded in your application,” Wilkie said. “That is a super-interesting use case.”

However, during a follow-up conversation, McKinley said: “I would like to have a WebAssembly approach — but it is not yet on any roadmaps or even prototypes.”

Goodbye to ‘Grafana API Land’

The approach to and management of APIs with the app platform will change. Instead of having to manage everything through one custom API, there will be numerous APIs at the user’s disposal. Multiple APIs are aggregated under a single surface, McKinley said. He explained how with your Grafana panel today, API plugins are available, and with your plugin ID, the resource is provided. With the app platform, users will have access to a single API. But through that API, under the hood, “it’s pulling together APIs that are managed individually as individually managed walled gardens,” McKinley said.

The resulting app platform’s main features will include schemas and versioning for objects and APIs, object storage, watching objects, admission control for objects and as-code capabilities, Grafana Senior Software Engineer Stephanie Hingtgen described during the talk with McKinley. With the app platform, Hingtgen described how as objects are stored in a persistent storage layer, a “watch capability” at users’ disposal means that the storage engine can notify an operator in order to “act on whatever it sees when changes exist to drive the state towards our desired state.” This is done through hooks that allow the user “to put in synchronous changes when those are necessary,” Hingtgen said.

More Kubernetes

Kubernetes will provide the underlying infrastructure for the app platform’s functionality, operation and management, as it “runs underneath the hood,” McKinley said. However, if the user organization has not yet adopted Kubernetes, they will be accommodated.

“We’re using the basic building blocks of Kubernetes to build user-facing applications. So many of the rules that we think of as like what’s controlled on vs data plan are going to be pretty different,” McKinley said. “So if you’re not into Kubernetes inside of your office, your behavior won’t change, but we’re reusing the standard building blocks used to build Kubernetes to build this application platform.”

So what does this mean if your organization has heavily invested in Kubernetes infrastructures? With the Grafana app platform, it will be possible to use standard Kubernetes tools to manage the deployment. You will be able to use Argo for GitOps for CI+CD, Velero for backups and kubectl for resource management.

The post Grafana’s Radical App Platform: WebAssembly, Kubernetes and APIs  appeared first on The New Stack.

RECENT POSTS

Leave a Reply

Your email address will not be published. Required fields are marked *