rogach

rogach

I’m trying to use hot code reloading in my app. The app in question is deployed using mix releases.

As I understand it, there was once a project called Distillery, but it is now dead - most of functionality was merged into mix release. Howerver, the hot code reloading support didn’t survive the migration - according to the docs Distillery was capable of generating appup files, but now I failed to find any tools that could do anything like that. Seems that the only remaining route is to write the appups myself.

Are there any known tools that simplify the task of writing appup files? Or does everyone write the appup files by hand?

P.S. By the way, I’ve read about and am aware of many issues and pitfalls that await unlucky souls that are going down the hot code reload path. But in my particular case, the application is maintaining a significant number of stateful connections, and it will be very nice if these connections can be preserved, if possible. And the upgrades aren’t expected to be very difficult - most of the processes are using GenServers, state is kept in maps, etc.
I understand that many suggest using blue/green deployments and docker and whatever, but I think that there’s some middle ground to be had - I can always go the blue/green road if some particular upgrade is difficult to do with hot reloading, but in most of simpler cases I can save lots of pain by simply loading the updated modules.
As someone said, “there’s a distinction between relying on hot deploys and simply enjoying them”.

Showing Posts 1 to 5

ausimian

ausimian

There is castle previously announced here. It does integrate with mix releases, but does not do appup generation.

rogach

rogach OP

I saw castle. However, I was a bit worried that it’s unmaintained - it has only a brief surge of commits for a week after its inception, and then nothing.

rogach

rogach OP

In the end I decided to skip the castle - just inserted an additional step intomix release and used :release_handler directly.

However, castle code was very useful for understanding what tweaks were needed - thanks for releasing it!

shankardevy

shankardevy

@rogach can you please share your config ? I might need it as well for one of my projects and would like to see your implementation. Thanks

rogach

rogach OP

Here’s what I ended up with: How to: Tweak mix release to work with hot code reloading

Don’t hesitate to ask questions if I forgot to detail something :slight_smile:

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews