Ankhers

Ankhers

Holodeck: a showcase app for the Hologram framework

Hey folks,

I’ve been contributing to Hologram and building applications with it lately. It just hit a big milestone: v0.9 was recently released and includes real-time features (release post here if you want to read more). This release has unblocked me from building real applications with it. So, to learn the framework better, I put together a small project to test out how Hologram holds up in a real, albeit very small, project. The result is Holodeck.

It currently includes three applications:

  • Chat - Pick a name, create/join rooms, and chat. Messages are persisted and broadcast to everyone in the room over a Hologram subscription. Joining a room pulls the full room history.
  • Dashboard - A live look at the running BEAM: per-core CPU, memory breakdown, scheduler/uptime info, and the top processes (sortable by memory, reductions, or pid). It also streams the app’s logs into the page live.
  • Polls - Create a simple poll, vote, and watch the results update live. The results page also demos Hologram’s JS interop by working directly with Chart.js.

Keep in mind that I left a few things out on purpose, since I wanted to focus on Hologram and on keeping the app easy to pick up and use. So there’s no authentication in chat, a fixed number of answers in polls, and so on.

Live demo: https://holodeck-divine-dream-8428.fly.dev
Source: ~ankhers/holodeck - A showcase of different hologram applications - sourcehut git

Feedback is welcome! If you know a better way to accomplish something, please let me know. And if there’s another part of Hologram you’d like to see demoed, say the word and I’ll see about building it. Contributions are welcome too.

Most Liked

nxy7

nxy7

Chat is also broken, swallows some messages for some reason (I think they’re visible after refresh though)

bartblast

bartblast

Creator of Hologram

Cool stuff, congrats!

If you open the browser console there are a few errors (a FunctionClauseError among them) that I suspect are behind the funky behaviour, so that’s probably where I’d start. (Happy to help if you get stuck)

One separate note: the broadcasting goes through Hologram.Realtime.* directly, which is meant more as an escape hatch. For chat it’s better to use put_broadcast from inside a handler - it’s transactional, so the send is tied to the handler succeeding. It’s usually a small change too: if whatever does the broadcast is reachable from a handler that carries the server struct (like init/3 or command/3), you just thread that server struct down to it and call put_broadcast there.

jam

jam

Cool! For some reason, on mobile the buttons don’t seem to work. For example I wasn’t able to create a chat room.

The source hut link has a typo. I found the repo here ~ankhers/holodeck - A showcase of different hologram applications - sourcehut git but can’t seem to find the hologram specific code.

Where Next?

Popular in Discussions Top

matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New
owaisqayum
I have a sample string sentence = "Hello, world ... 123 *** ^%&*())^% %%:>" From this string, I want to only keep the integers, ...
New
mmport80
I have put far too much effort into Dialyzer over the last year or so - and basically - I doubt it’s worth the effort. It’s not as easy ...
New
AlexMcConnell
The reason that Rails is as popular as it is is because it’s very easy for relatively inexperienced developers to get a lot of work done....
588 19568 166
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19204 150
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18146 126
New
PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
100phlecs
Are there any downsides, like perf issues, to putting all functional components in CoreComponents as long as you prefix it with the conte...
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New

Other popular topics Top

ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

We're in Beta

About us Mission Statement