Hacker News new | ask | show | jobs
by Ankhers 2451 days ago
I believe I have only heard about automatic recovery for forms. Would this "stash" you mentioned be more general for recovering state?

For what it's worth, I very much appreciate the work you and everyone involved has done for LV (and more generally, Phoenix).

1 comments

Yes, in the above gist the connect are params used, so connect params are a general purpose mechanism for state recovery. In the above example a form is used, but on mount you can do whatever you'd like with the data. Thanks!
Will the data in the “stash” need to be verified on the server? Currently I treat connect params as user data and parse and verify it. I’m unclear if a more general data stash would cause potential security issues.

Secondly, has there been any discussion for supporting server side draining or moving the process to another node?

Phoenix is built around a middleware known as Plug, and most things are Plugs, you can add a Plug to separately handle the verification I would guess
Awesome. I look forward to having this idea formalized and I will give it another go.