I want to implement "hot reload" of the tables and columns meta-data in the following project:

qto - github
https://qto.fi - click just login to get to the ui ...

The page life cycle / control flow goes as follows:

- user requests a page - the Mojoicious framework builds the "empty templates" and servers t +hem to the browser - once loaded to the browser, client side axios http requests fetch t +he data from the back-end - vue does the data-binding on the client side by using BOTH the data + for the page and the global tables and columns meta-data

by not-breaking however the horizontal scalability provided the world's best framework Mojolicious

the variant would be to have the following flow of events:

- 1) alter table in postgres - 2) reload a metatable from UI ( to tell to the Application Layer to + reload the meta-data) - 3) the meta data hash ref of hash refs is accessible to all the per +l processes

The current implementation does not implement this "hot reload" to all the hypnotoad processes ... which breaks the listings in the UI, because they are meta-data "aware" ...

Could it be wise to complicate the current setup by adding Redis with publish subscribe mechanism for the meta-data only ?

Could it be implemented by some kind of interprocess signalling / communication - one proc reloads the meta-data and somehow signlas to the others ... as at the end those DDL changes on the db site will probably not occur so often ...

Could some kind of quick hack not requiring a lot of work be implemented ?


In reply to multiprocess run-time data structure sharing in Mojolicious web app ... by YordanGeorgiev

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.