<div dir="ltr"><br><br><div class="gmail_quote">On Sun, Sep 7, 2008 at 7:41 PM, Ben Hood <span dir="ltr"><<a href="mailto:0x6e6562@gmail.com">0x6e6562@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Edwin,<br>
<br>
On Sun, Sep 7, 2008 at 10:32 PM, Edwin Fine<br>
<div class="Ih2E3d"><<a href="mailto:rabbitmq-discuss_efine@usa.net">rabbitmq-discuss_efine@usa.net</a>> wrote:<br>
><br>
</div><div class="Ih2E3d">> As the most up to date client code currently stands, amqp_channel calls<br>
> rabbit_amqqueue in a handle_info function. Although this handle_info<br>
> function is used only by the direct client, I am uncomfortable with having<br>
> server-specific code mixed in with pure client code. There should be a clean<br>
> separation of concerns and all "direct" code, which calls into the<br>
> server-specific code, should be in one module, and the network-only code in<br>
> another.<br>
<br>
</div>The clean separation has been accomplished by having both modes of<br>
operation (embedded vs TCP) implemented in separate driver modules.<br>
<br>
So if you want to build a network only package, you can just leave out<br>
the amqp_direct_driver module.<br>
<br>
Hence with all due respect, I would disagree that concerns have been mixed.</blockquote><div><br>With all due respect in return, check out this code from amqp_connection.erl:<br><br><span style="font-family: courier new,monospace;">%% Starts a new network channel.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">handle_call({network, ChannelNumber, OutOfBand}, From, State) -></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> handle_start({ChannelNumber, OutOfBand},</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fun amqp_network_driver:open_channel/3,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> fun amqp_network_driver:close_channel/1,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fun amqp_network_driver:do/2,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> fun amqp_network_driver:do/3,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> State);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">%% Starts a new direct channel.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">handle_call({direct, ChannelNumber, OutOfBand}, From, State) -></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> handle_start({ChannelNumber, OutOfBand},</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fun amqp_direct_driver:open_channel/3,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> fun amqp_direct_driver:close_channel/1,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fun amqp_direct_driver:do/2,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> fun amqp_direct_driver:do/3,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> State);</span><br><br>This ties the module to amqp_direct_driver by naming it. xref will show this code is dependent on amqp_direct_driver. Dialyzer will complain if amqp_direct_driver is not there. This call should be handled somewhere else. In my humble opinion.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
> amqp_network_driver calls rabbit_framing_channel, which in turn calls<br>
> rabbit_channel. So indirectly, the network client uses rabbit_channel and<br>
> needs it in the common distribution.<br>
<br>
</div>This is true, but this only pertains to the do/2 and do/3 calls, which<br>
*could* be abstracted out of the rabbit_channel module with not too<br>
many changes.</blockquote><div> </div><div>Well, then, let's factor it out. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> So, ignoring modules provided by Erlang/OTP, and the network client modules<br>
> themselves, the following modules are needed by the network client:<br>
><br>
> hessian<br>
<br>
</div>I have just deleted the reference to hessian (bug19334). This was<br>
something experimental and should not be in the client code base.</blockquote><div> </div><div>Ok, good to know! <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="Wj3C7c"><br>
> rabbit_binary_generator<br>
> rabbit_framing<br>
> rabbit_framing_channel<br>
> rabbit_heartbeat<br>
> rabbit_misc<br>
> rabbit_reader<br>
> rabbit_writer<br>
<br>
</div></div><font color="#888888">Ben<br>
</font></blockquote><div><br>Regards,<br>Edwin<br><br></div></div></div>