Re: ping

David Nicol <[email protected]> Fri, 10 Jul 2026 02:32:11 -0500
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <CAFwScO8XQfW_b0wt=cnOJYg3EZ3Pt6zihPfcCbrqc9jTydCgbA@mail.gmail.com>
--0000000000004d5e3c06563cbf47
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Jul 10, 2026 at 1:06=E2=80=AFAM C.J. Collier <[email protected]>=
 wrote:

>
> It would give modern cloud-native drivers a standard interface to target,
> rather than everyone hacking their own custom event loops into individual
> DBDs.
>
> Thoughts?
>


Nice! The problem with event loops is that a system should have only one.
Is there a thing like "async-check-and-do" that will do stuff or not block,
that could get polled as part of an existing event loop?

A quick search yields https://metacpan.org/dist/POE-Component-EasyDBI for
discussion; POE wants to be the standard event loop services provider.

I'm old-school and still write loops around select(2), which allows async
comms with separate processes using a little language over a pipe,
robustly, but that's no way to define a standard interface unless the
facility gets wrapped somehow. The tradeoff of only polling after the
select times out would be acceptable, I think, although it wouldn't be as
responsive as including the protobuf system's file descriptors in the
select set.

I don't know if there is a standard for mapping a FD number to a
[on-readable, on-writable, on-error] coderef triple, aside from just doing
that with an AoA, but were I wanting to integrate an async system into an
existing select loop, I could work with that. Especially if the system
offered to take the same shape of data as an input for its own select
loop.POE might have a standard for such things, I don't know.

cheers

dln


--=20
"The profit motive is often in conflict with the aims of art." -- Ursula K.
Le Guin

--0000000000004d5e3c06563cbf47
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote gmail=
_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jul 10, 202=
6 at 1:06=E2=80=AFAM C.J. Collier &lt;<a href=3D"mailto:[email protected]=
g">[email protected]</a>&gt; wrote:</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div dir=3D"auto"><div dir=3D"auto"><div dir=3D"auto"><b=
r></div><div dir=3D"auto">It would give modern cloud-native drivers a stand=
ard interface to target, rather than everyone hacking their own custom even=
t loops into individual DBDs.</div><div dir=3D"auto"><br></div><div dir=3D"=
auto">Thoughts?</div></div></div></blockquote></div><div><br></div><div><br=
></div><div>Nice! The problem with event loops is that a system should have=
 only one. Is there a thing like &quot;async-check-and-do&quot; that will d=
o stuff or not block, that could get polled as part of an existing event lo=
op?=C2=A0</div><div><br></div><div>A quick search yields=C2=A0<a href=3D"ht=
tps://metacpan.org/dist/POE-Component-EasyDBI">https://metacpan.org/dist/PO=
E-Component-EasyDBI</a> for discussion; POE wants to be the standard event =
loop services provider.</div><div><br></div><div>I&#39;m old-school and sti=
ll write loops around select(2), which allows async comms with separate pro=
cesses using a little language over a pipe, robustly, but that&#39;s no way=
 to define a standard interface unless the facility gets wrapped somehow. T=
he tradeoff of only polling after the select times out would be acceptable,=
 I think, although it wouldn&#39;t be as responsive as including the protob=
uf system&#39;s file descriptors in the select set.</div><div><br></div><di=
v>I don&#39;t know if there is a standard for mapping a FD number to a [on-=
readable, on-writable, on-error] coderef triple, aside from just doing that=
 with an AoA, but were I wanting to integrate an async system into an exist=
ing select loop, I could work with that. Especially if the system offered t=
o take the same shape of data as an input for its own select loop.POE might=
 have a standard for such things, I don&#39;t know.</div><div><br></div><di=
v>cheers</div><div><br></div><div>dln</div><div><br></div><div><br></div><s=
pan class=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=
=3D"gmail_signature"><div dir=3D"ltr"><font face=3D"times new roman, serif"=
>&quot;The profit motive is often in conflict with the aims of art.&quot; -=
- Ursula K. Le Guin</font><br></div></div></div>

--0000000000004d5e3c06563cbf47--