… | |
… | |
193 | A lot of info, but at least you can see that it does something. To only |
193 | A lot of info, but at least you can see that it does something. To only |
194 | get info about AnyEvent::MP, you can use C<AE_LOG=AnyEvent::MP=+log> in |
194 | get info about AnyEvent::MP, you can use C<AE_LOG=AnyEvent::MP=+log> in |
195 | your environment. |
195 | your environment. |
196 | |
196 | |
197 | The other environment variable that can be useful is |
197 | The other environment variable that can be useful is |
198 | C<PERL_ANYEVENT_MP_TRACE>, which, when set to a true value, will cause |
198 | C<AE_MP_TRACE>, which, when set to a true value, will cause |
199 | most messages that are sent or received to be printed. For example, F<aemp |
199 | most messages that are sent or received to be printed. For example, F<aemp |
200 | restart rijk> might output these message exchanges: |
200 | restart rijk> might output these message exchanges: |
201 | |
201 | |
202 | SND rijk <- [null,"eval","AnyEvent::Watchdog::Util::restart; ()","aemp/cerebro/z4kUPp2JT4#b"] |
202 | SND rijk <- [null,"eval","AnyEvent::Watchdog::Util::restart; ()","aemp/cerebro/z4kUPp2JT4#b"] |
203 | SND rain <- [null,"g_slave",{"'l":{"aemp/cerebro/z4kUPp2JT4":["10.0.0.1:48168"]}}] |
203 | SND rain <- [null,"g_slave",{"'l":{"aemp/cerebro/z4kUPp2JT4":["10.0.0.1:48168"]}}] |
… | |
… | |
411 | different computers. |
411 | different computers. |
412 | |
412 | |
413 | Each time you start the sender, it will send a message to all receivers it |
413 | Each time you start the sender, it will send a message to all receivers it |
414 | finds (you have to interrupt it manually afterwards). |
414 | finds (you have to interrupt it manually afterwards). |
415 | |
415 | |
416 | Additional experiments you could try include using |
416 | Additional experiments you could try include using C<AE_MP_TRACE=1> to see |
417 | C<PERL_ANYEVENT_MP_TRACE=1> to see which messages are exchanged, or |
417 | which messages are exchanged, or starting the sender before the receiver |
418 | starting the sender before the receiver and see how long it then takes to |
418 | and see how long it then takes to find the receiver. |
419 | find the receiver. |
|
|
420 | |
419 | |
421 | =head3 Splitting Network Configuration and Application Code |
420 | =head3 Splitting Network Configuration and Application Code |
422 | |
421 | |
423 | OK, so far, this works reasonably. In the real world, however, the person |
422 | OK, so far, this works reasonably. In the real world, however, the person |
424 | configuring your application to run on a specific network (the end user |
423 | configuring your application to run on a specific network (the end user |