FWIW, websockets are The Best® way to do live updates and such in a web GUI. Ajax can only pull (client initiated request) but websockets can pull and push (server sends data without being asked and they have *much* smaller overhead for long running connections). With Ajax, you'll always have to be asking the server, should I update, should I update? Works fine of course and I do it all the time. I'd love to switch to websockets in many places but I'm not a websocket dev yet (only toyed with it to date) so I can't give more advice or caveats.
Update: Corion mentioned something below that I’m also going to try and sounds easier. I’ve been playing with Mojo and this kind of stuff – Writing websocket chat using Mojolicious Lite. I was going to write a log file tailer with it as my first production project but R&D is verrrrrryyyyy far down on my work list for awhile now (and I have no free time at home either).
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|