Astarno

Astarno

Recommendations for real-time visualizations

Hi there,

I am looking to build a web-based application that will be responsible to visualize other (Elixir) applications in real-time for research purposes. I have already landed on using Elixir together with Phoenix and LiveView to fulfill the “web-based” and “real-time” aspects, but I have yet to find the best approach to actually draw and animate objects on the screen in combination with these technologies. I have no experience in this latter department.

An example most often says more than a 1000 words, I am basically looking to create something very similar to this: https://netflixtechblog.com/vizceral-open-source-acc0c32113fe. I should be able to draw different objects on the screen, make them interactable (e.g. clickable) to show more details and animate them. Any additional fancy functionality to make my life easier and visualizations cleaner/better is a great surplus.

If you could help me with some pointers to relevant articles, guides and/or technologies, that would be greatly appreciated!

First 3 of 3 Posts Switch mode

al2o3cr

al2o3cr

Technically you could use Vizceral as-is - it’s just Javascript! I didn’t dig far enough in to see if the API you’d get would be good / easy / etc but it’s possible.

A good place to start looking at complete Phoenix + LV + visualization solutions would be to try out Livebook. It may not be the UI you ultimately want, but the demos for process visualization and Vega should offer some inspiration.

100phlecs

100phlecs

The general gold standard (and what your Netflix example uses as well, shown in its package.json) is three.js and some animation library – in Netflix’s case, tween.js which I’ve never heard of before. Usually people pair gsap with three.js from my research.
It’s the gold standard because it’s so popular.

If your animation is strictly 2D you could instead use pixi.js, as it is pretty popular too. Even inspecting the pixi.js website, they’re using gsap to animate their fade ins/outs.
It comes down to personal preference.

Advanced animations on a webpage, or using canvas in general I wouldn’t think to be a good fit for LiveView depending on the implementation. I could see how you would be able to “fire” off multiple events which then trigger a bubble moving from one endpoint to another without changes to the DOM. I would just be prepared to write a lot of javascript and possibly pulling in another rendering engine, like React which is what your Netflix example uses – which may defeat the purpose of choosing LiveView! It really depends on how much UI state you have to handle, how much you have to keep track of on the page.

bt-maps

bt-maps

Here are a few examples that I have found useful. All three provide different approaches for visualization. Once you have have your data flowing through pubsub channels, I would likely start with js hooks. There are many mature javascript Force-Directed Graph (3D and 2D) libs out there that you could incorporate into your app.

Examples:

Phoenix + three.js : GitHub - fly-apps/globe-request-mapper · GitHub
live link

Poeticoding paid course: realtime dashboard using JS hooks with charts libraries, etc.

Phoenix backend + html canvas with Fabric.js

— All posts loaded —

Where Next?

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement