Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

While that would be understandable if this were a simple unix-style tool that did one thing and only one thing, the reality is that this service does way too much stuff.

  • Fetches CB every 5 minutes (or less!)
  • Updates DB
  • Updates LHoCB (from DB)
  • Acts as a CB client when you telnet into it (WTF???) - if this is active, then the fetcher can get to be much more frequent.

I generally have one or two socket clients connected to the service at all times, so restarting the service daily would mean that those windows wouldn't have the history going back through the night (or whenever I restarted it). So I'm loathe to restart it willy-nilly.

If I were to redesign it now, I would separate these things out into pieces. The fetcher/sender would feed a pub-sub service (possibly redis). The DB-updater would be a separate process to push into the database. The update of LHoCB would be a cron job (read from db, send to perlmonks). The CB client would also listen to the pub-sub service. (Note that the CB stats already is a separate cron job.) And then your suggestion would make a lot of sense (in fact, if the fetcher and sender were separate, I could just throw it into a cron job, but then I wouldn't be able to dynamically increase the frequency of fetches based on CB usage). But I'm never going to do all that. So I'm going to live within what I've got until such a time as I grow bored of worrying about it or perlmonks itself dies.


In reply to Re^3: Last hour of cb has not updated since Aug 05, 2020. by Tanktalus
in thread Last hour of cb has not updated since Aug 05, 2020. by Lady_Aleena

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



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-23 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found