Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

The Monastery Gates

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


erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

If you're new here please read PerlMonks FAQ
and Create a new user.

Wall of Larry Quest
Starts at: Feb 26, 2024 at 05:00
Ends at: Dec 31, 2024 at 04:59
Current Status: Active
2 replies by jdporter

    By now you've all seen The St. Larry Wall Shrine. Well, it could use a fresh coat of gold leaf and shellac. Therefore, we are soliciting Larry-related items to be placed on the shrine. Links to offsite content are good; or if you have small bits of content, such as quotes, you'd like to contribute, that's fine too. Please reply to this Quest with your humble offerings. Thank you! And may St. Larry bless your codings and your debuggings.

poll ideas quest 2024
Starts at: Jan 01, 2024 at 00:00
Ends at: Dec 31, 2024 at 23:59
Current Status: Active
5 replies by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Perl News
List of 2024 TPRC Science Track Talks Videos
on Jul 02, 2024 at 15:08
0 replies by oodler
2024 Golden PERL Award voting ends 6/27 4PM PDT
on Jun 27, 2024 at 00:51
2 replies by oodler
    Sorry I didn't get this out here earlier, but Perl Community (parent org of the Science Perl Committee that is initiated the Science Track) is giving out a "peoples choice" award at the end of Conference Lightning Talks. It's sincere gesture from us and allows anyone to vote for anyone in the Perl community at large, as a "thank you" from us.

    link to Google voting form

    The Science Track talks have been great, some are even starting to come online. Thanks to everyone who made this happen, especially the TPRC Planning Committee.
Naming a CPAN module that watches for closed sockets
2 direct replies — Read more / Contribute
on Jul 23, 2024 at 16:02
    So, at work we recently embarked on a quest to kill off long-running database queries by web worker processes whose clients have closed their browser tab, or likewise clicked a cancel button attached to their AJAX request. The main problem was that the whole backend is blocking-style, using a preforked Plack server, and there was no way to monitor for events on the socket while the database query was in progress. (nor did the Plack server even provide access to the socket) While the correct way is to use nonblocking queries and an event-loop webserver, that scale of a rewrite is not practical. Another possible option is to alter an existing plack server with fancy hooks to kill a query, but again, the single-threaded nature of the code prevents a lot of this.

    Well, believe it or not, we actually managed to accomplish this feat with the existing app and Plack server using an Inline::C pthread and PadWalker and shelling out to run mysql -e 'kill $conn_id' and some other insanity, but IT WORKS!

    To celebrate this achievement, I would like to bundle it up in a CPAN module. The main goal is to abort/kill/cancel everything a single-threaded web worker is doing (in a highly configurable manner, of course) whenever we lose the ability to reply to the requestor. The best name I have so far is IO::SocketStatusSignaler IO::SocketStatusTrigger. Anyone have other ideas?

    I'm also happy to entertain conversations about less-insane methods for solving this problem.


    API Preview:

    # When the client goes away, terminate the current process # and also kill the mysql query that is running on the server. my $watch= watch_socket( socket => $socket, event => EVENT_EOF|EVENT_EPIPE, actions => [ [ run => 'mysql', -e => "kill $id" ], [ kill => $$, SIGKILL ], ] );
Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-07-24 16:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.