recovering connection after network partition

Skip to first unread message

Feb 2, 2021, 6:27:55 PMFeb 2
to Nitrogen Project / The Nitrogen Web Framework for Erlang
I was testing a project im doing. Its a webapp.
The app contains lots of background work in comets.

When nitrogen comets recover connection they can be directed to
trigger an action on the client. Thats neat. I was thinking
of using that to ensure the clients recover their viewport to a
sane state after losing the connection. This can also happen when
they shutdown the browser, or they restart their smartphones.
The thing is, most browsers are affected by network partition
most of the time.

My current stack is Nitrogen plus a layer of concepts on top of it
to simplify my technical reach in terms of usability towards the final

Anyways... I was thinking launching a comet transparently with
#comet{reconnect_actions="location=location"}. To make this happen. Right?
I actually implemented it weeks ago but I then deleted the code.

But I also remembered that I have dashboard to admin these "features" I want to activate easily from a dashboard. Much like phpmyadmin. Im thinking about that event. Im thinking about also registering the event on a database, storing the ip of the client, the browser, the user-agent, the page he was watching and other relevant info. This data is useful to monitor the health of the app and maybe detect patterns where people using certain browsers are affected by bugs.

Have you seen or worked in this kind of monitoring? I know there is NAGIOS and those systems. But I'm thinking embedding that processing right into Nitrogen.
I actually have a dashboard, the data is there, and without much thinking the thing proved very useful dashboard. Its raw and crude but the knobs are there. Its broken now because I have changed many internals. But I will do a better design of it.

Another one. Have you implemented system monitoring features in nitrogen? What are the problems they solved?  

Jesse Gumm

Feb 3, 2021, 8:57:34 PMFeb 3
to nitrogenweb
Hey Franklin,

Interesting ideas.  Yes, if the reconnect_action triggers, you could very well just reload page as you mocked up, if that's an acceptable solution.  Maybe something to catch it if users are entering data or something, to prompt ("Hey something happened that would cause us to reload the page, but we see you're working on something right now. What do you want to do?" - or something like that - I dunno).

I haven't personally tapped into any monitoring systems yet, though I've written a basic Nitrogen process inspector, just to see if any individual processes are getting out of hand.  It's okay, not as complete as observer, but it runs in the browser, so there's that.

I also have a *really* dumb thing I made to try to figure out the cause of a system crash by dumping the processlist and some process_info data to disk every second:

I don't even remember if that helped me solve my problem, but the system dump didn't work for some reason, so I needed a fallback.

I'd love to build a monitoring system into Nitrogen, though.  I think that'd be neat, and I'm super open to ideas and pull requests on this front.


You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || || @jessegumm
Reply all
Reply to author
0 new messages