blib/lib/XAS/Spooler.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/XAS/Docs/Spooler/Installation.pm ↑ Summary
1 package XAS::Spooler;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.02';
7  
8 1 1;
9  
10 __END__
11  
12 =head1 NAME
13  
14 XAS::Spooler - A set of procedures and modules to implement a spooler
15  
16 =head1 DESCRIPTION
17  
18 The spooler is used for messaging within XAS. A spooler is as old as computing.
19 Computer lore has it that IBM coined the term SPOOL and used spoolers to
20 buffer line printer output. In our case it is being used to implement a store
21 and forward messaging scheme. Which in itself, is almost as old a spooling.
22  
23 When a process wants to send a message, it creates a spool file. The spool file
24 is a serialized Perl data structure in L<JSON|http://json.org/> format, with
25 special headers. The spooler scans the spool directory and sends the packet
26 to an appropriate queue on a message queue server. L<XAS::Collector|XAS::Collector>
27 is used as the endpoint to handle those messages. The messaging protocol used
28 by the message queue server is known as L<STOMP|http://stomp.github.io/>,
29 which is a text based protocol.
30  
31 The reason to do all of this, is to decouple the message sender from the
32 message receiver. This simplifies the sender. There is no need to implement
33 all of the logic to open network connections and the maintenance of those
34 connections. It also allows for buffering of the message stream. A fast sender
35 doesn't have to worry about a slow receiver. The spooler takes care of this.
36  
37 =head1 UTILITIES
38  
39 This module provides the following utilities.
40  
41 =head2 xas-spooler
42  
43 This is the actual spooler. It reads a configuration file to determine which
44 spool directories to scan. The configuration file also says which queues to
45 use for those packets.
46  
47 The configuration file is documented here: L<XAS::Apps::Spooler::Process|XAS::Apps::Spooler::Process>
48  
49 =over 4
50  
51 =item B<xas-spooler --help>
52  
53 This will display a brief help screen on command options.
54  
55 =item B<xas-spooler --manual>
56  
57 This will display the utilities man page.
58  
59 =back
60  
61 =head1 SEE ALSO
62  
63 =over 4
64  
65 =item L<XAS::Docs::Spooler::Installation|XAS::Docs::Spooler::Installation>
66  
67 =item L<XAS::Apps::Spooler::Process|XAS::Apps::Spooler::Process>
68  
69 =item L<XAS::Spooler::Connector|XAS::Spooler::Connector>
70  
71 =item L<XAS::Spooler::Processor|XAS::Spooler::Processor>
72  
73 =item L<XAS::Spooler|XAS::Spooler>
74  
75 =item L<XAS|XAS>
76  
77 =back
78  
79 =head1 AUTHOR
80  
81 Kevin L. Esteb, E<lt>kevin@kesteb.usE<gt>
82  
83 =head1 COPYRIGHT AND LICENSE
84  
85 Copyright (c) 2012-2015 Kevin L. Esteb
86  
87 This is free software; you can redistribute it and/or modify it under
88 the terms of the Artistic License 2.0. For details, see the full text
89 of the license at http://www.perlfoundation.org/artistic_license_2_0.
90  
91 =cut
« blib/lib/XAS/Docs/Spooler/Installation.pm ↑ Summary