AnyEvent-KVStore-Etcd

 view release on metacpan or  search on metacpan

lib/AnyEvent/KVStore/Etcd.pm  view on Meta::CPAN

Net::Etcd uses L<AnyEvent::HTTP> for its transport layer.  It further blocks in
an L<AnyEvent> loop to wait for the response.  For obvious reasons, this does
not work.  So, the main key/value operations cannot be done from inside an
event loop.  This leads to a number of possible solutions including forking and
running the request in another process.

One option, though it does incur significant startup cost, is to use L<Coro>
and move the callback from a C<sub {}> call to an C<unblock_sub {}> call.  This
is probably the simplest approach and it works.  In general you get sequential
ordering but this is not a hard guarantee.  Another approach might be to move
processing into worker threads.

=head1 ATTRIBUTES/ACCESSORS

If accessing the module directly, the following accessors are available.  These
are not generally needed and are mostly used internally for managing the
connection to the etcd server.

These are also keys for the config hash.

All attributes are optional.



( run in 0.249 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )