kuon

kuon

Embeded phoenix instance for offline Live View support

I just finished my first LiveView powered app. And I am really happy about the whole app structure and organization.

The only thing missing from LiveView is mobile app/offline support.

So I had an idea. I’m quite sure I am not the first, but I could not find any discussion of it.

What about some sort of SDK with an embedded phoenix server running on the client. I know erlang can be compiled on both iOS and android (or at least it used to work).

Basically it would be:

phoenix (server)->phoenix (client)->webview (client)

I know it is not a simple project, as it requires quite a few elements:

  • Compiling erlang and elixir for iOS and Android
  • Creating a caching DB for client data (ETS saved to file?)
  • Sync protocol and conflict resolution between the two phoenix instances

Live View wouldn’t need any changes, but views, instead of using ecto to load data, would use some library that run the code remotely, and gracefully fallback in case of the user being offline.

I have a rough idea of the architecture, and again, I know it is not a small task, but as removing JS has been so successful (for me, and I think others), I’d like to extend the idea to mobile app.

What are your thoughts? If there is some real interest, I might dedicate times to this.

First Post!

OvermindDL1

OvermindDL1

There is an Elixir/Beam to Javascript compiler that could likely be leveraged for that. Otherwise if you are making an app for installation just use the native ecosystem.

Most Liked

marcalchca

marcalchca

Hi, has this idea been abandoned?
I’m very much interested in being able to use LiveView for offline scenarios.
I’d like to build PWAs as an easier to maintain alternative for native mobile apps.

So your idea about having an offline “version” of LiveView features, would be perfect.

Thanks for letting me know.
I’m new to Elixir / Phoenix, planning to reorient my consultancy to full-stack development.

Best regards
Marc

Where Next?

Popular in Discussions Top

AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31771 143
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
joeerl
I’m playing with Elixir - It’s fun. I think @rvirding does give Elixir courses these days. Re: files and database - when I given Erlang ...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
nunobernardes99
Hi there Elixir friends :vulcan_salute: In a recent task I was on, I needed to check in two dates which of them is the maximum and which...
New
shishini
I think this twitter post and youtube video didn’t get as much attention as I hoped I am still new to Elixir, so can’t really judge ...
New

Other popular topics Top

hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement