Beekeeper::Service::Router - Route messages between backend and frontend buses
Version 0.06
$self->bind_remote_session( address => "frontend.user-123" ); $self->send_notification( method => 'myapp.private_message', address => 'frontend.user-123', params => 'hello', ); $self->unbind_remote_session; $self->unbind_remote_address( address => "frontend.user-123" );
Router workers shovel requests messages between frontend and backend brokers.
Additionally, routers include some primitives that can be used to implement session management and push notifications.
If the application does not bind client sessions the routers can scale really well, as you can have a lot of them in a large number of servers.
But please note that when the application does use the session binding mechanism all routers will need to share an address table, and this shared table will not scale as well as the rest of the system. So a better strategy (some kind of partition) will be needed for applications with a large number of concurrent clients.
Make authorization data persist for remote caller session and optionally assign an arbitrary address to the remote client.
The authorization data can be used to store a session ID or other tokens which identify requests as coming from a particular remote client.
If an address is provided it can be used to push notifications to the client. The same address can be assigned to multiple remote clients, and all of them will receive the notifications sent to it. This is intended to allow to push notifications to users logged into multiple devices.
Clear the authorization data and address assignment of a single remote caller session.
This does not affect other remote clients which share the same address. This is intended to implement "logout from this device" functionality.
Clear the authorization data and address assignment of all remote clients which were assigned the given address.
This is intended to implement "logout from all devices" functionality.
Beekeeper::Service::Router::Worker
José Micó, jose.mico@gmail.com
jose.mico@gmail.com
Copyright 2015-2021 José Micó.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language itself.
This software is distributed in the hope that it will be useful, but it is provided “as is” and without any express or implied warranties. For details, see the full text of the license in the file LICENSE.
To install Beekeeper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beekeeper
CPAN shell
perl -MCPAN -e shell install Beekeeper
For more information on module installation, please visit the detailed CPAN module installation guide.