You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Mansour Al Akeel <ma...@gmail.com> on 2018/05/13 15:39:15 UTC

Service Bus, connecting services behind firewall

Hello all,

We have a situation where we need to connect multiple application in
different networks. We are trying to avoid opening a firewall hole.
I have posted a question in ServiceMix users mailing list explaining what
we need.

http://mail-archives.apache.org/mod_mbox/servicemix-users/
201805.mbox/%3CCAFvvX%3DZ-EbDo9T8388dCrVAfxiNjEZ-
AY785o7oU%3DKya7-3WBw%40mail.gmail.com%3E

As I am searching, I found Microsoft Azure addresses exactly this use case.
They use what is termed as relays.
http://mail-archives.apache.org/mod_mbox/servicemix-users/
201805.mbox/%3CCAFvvX%3DZ-EbDo9T8388dCrVAfxiNjEZ-
AY785o7oU%3DKya7-3WBw%40mail.gmail.com%3E

Since I need to expose services from clients behind firewall, I was
considering doing this in Qpid by creating multiple queues (in virtualhost)
for each client. Each virtual host have a queue to pass the input for the
service. When the service complete (on the client), it provides the output
on another queue within the same virtual host. Requests and replies are
matched based on correlation it. The response is served back through a
restful service to original caller, after matching request-response.

While I haven't used Azure, it looks they are exposing the service as a
webservice using SOAP bindings. Not necessary what I hoped, but it does the
job.
Is there something equivalent to Azure Service Bus in Qpid that we can
utilize for our use case ?



Thank you

Re: Service Bus, connecting services behind firewall

Posted by Ted Ross <tr...@redhat.com>.
On Tue, May 15, 2018 at 2:38 AM, Gordon Sim <gs...@redhat.com> wrote:
> On 15/05/18 04:49, Mansour Al Akeel wrote:
>>
>> Gordon,
>> Thank you for replying. I am sorry I didn't explain it well. Maybe I was
>> relying on the link on ServiceMix mailing list. I will try to explain it
>> again here.
>>
>> We have two systems, on separate networks. System A and System B. Each of
>> them provide different services. Some services in System A, need to call
>> services on System B. However, since each of them on a different network,
>> we have to rely on opening holes in the firewalls.
>>
>> I think we can replace the existing setup, with a AMQP. For example a
>> service on system A (Service A), can call a service on System B (Service
>> B), buy connecting to an instance of QPID, and send a message to a queue
>> called INPUT_A. Service B would get this message, and process it, then
>> reply on queue OUTPUT_B. Service A would then select the reply based on
>> CorrelationId, and match it with the request.

There's a much better pattern for request/reply that uses temporary
addresses for the client.  This causes replies to be sent directly to
the clients without the need for a selector.

>
>
> Yes, you can use queues. You can also communicate end-to-end using the
> dispatch router.

+1..  Queues are not a real benefit for the Request/Reply pattern
unless the clients and servers are not present at the same time.
Using the router allows you to get the cross-datacenter benefit
reliably without the need for clustered brokers or backing stores.

>
>> Therefore we can establish a connection between those two services.
>> This is summarized in the request/response pattern. I was wondering if
>> there's a library that allows to do this without having to deal with the
>> details. After searching, I found something close to what I have in mind
>> (and you replied to the user).
>>
>>
>> http://qpid.2158936.n2.nabble.com/RPC-over-AMQP-with-Hessian-td5103076.html
>>
>> Here's an RPC over messaging, (or Request/Reply) implementation by
>> RabbitMQ, https://www.rabbitmq.com/tutorials/tutorial-six-java.html
>
>
> There is a simple client/server (i.e. request/response) example included in
> the qpid jms examples[1][2]
>
>> I will check out the project "https://github.com/ebourg/qpid-hessian" and
>> test it out. If there's nothing similar to in the Qpid, it will be nice to
>> have it.
>
>
> That looks pretty old, I suspect you will have to tweak things to get it to
> work at all.
>
>
> [1]
> https://git1-us-west.apache.org/repos/asf?p=qpid-jms.git;a=blob;f=qpid-jms-examples/src/main/java/org/apache/qpid/jms/example/Client.java;h=482af7954c28d4e99c0bafc7b689e97fe17869b6;hb=HEAD
> [2]
> https://git1-us-west.apache.org/repos/asf?p=qpid-jms.git;a=blob;f=qpid-jms-examples/src/main/java/org/apache/qpid/jms/example/Server.java;h=ef12d6b6d67fcf654ebb49af9a49e30aad5a61c3;hb=HEAD
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Service Bus, connecting services behind firewall

Posted by Gordon Sim <gs...@redhat.com>.
On 15/05/18 04:49, Mansour Al Akeel wrote:
> Gordon,
> Thank you for replying. I am sorry I didn't explain it well. Maybe I was
> relying on the link on ServiceMix mailing list. I will try to explain it
> again here.
> 
> We have two systems, on separate networks. System A and System B. Each of
> them provide different services. Some services in System A, need to call
> services on System B. However, since each of them on a different network,
> we have to rely on opening holes in the firewalls.
> 
> I think we can replace the existing setup, with a AMQP. For example a
> service on system A (Service A), can call a service on System B (Service
> B), buy connecting to an instance of QPID, and send a message to a queue
> called INPUT_A. Service B would get this message, and process it, then
> reply on queue OUTPUT_B. Service A would then select the reply based on
> CorrelationId, and match it with the request.

Yes, you can use queues. You can also communicate end-to-end using the 
dispatch router.

> Therefore we can establish a connection between those two services.
> This is summarized in the request/response pattern. I was wondering if
> there's a library that allows to do this without having to deal with the
> details. After searching, I found something close to what I have in mind
> (and you replied to the user).
> 
> http://qpid.2158936.n2.nabble.com/RPC-over-AMQP-with-Hessian-td5103076.html
> 
> Here's an RPC over messaging, (or Request/Reply) implementation by
> RabbitMQ, https://www.rabbitmq.com/tutorials/tutorial-six-java.html

There is a simple client/server (i.e. request/response) example included 
in the qpid jms examples[1][2]

> I will check out the project "https://github.com/ebourg/qpid-hessian" and
> test it out. If there's nothing similar to in the Qpid, it will be nice to
> have it.

That looks pretty old, I suspect you will have to tweak things to get it 
to work at all.


[1] 
https://git1-us-west.apache.org/repos/asf?p=qpid-jms.git;a=blob;f=qpid-jms-examples/src/main/java/org/apache/qpid/jms/example/Client.java;h=482af7954c28d4e99c0bafc7b689e97fe17869b6;hb=HEAD
[2] 
https://git1-us-west.apache.org/repos/asf?p=qpid-jms.git;a=blob;f=qpid-jms-examples/src/main/java/org/apache/qpid/jms/example/Server.java;h=ef12d6b6d67fcf654ebb49af9a49e30aad5a61c3;hb=HEAD

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Service Bus, connecting services behind firewall

Posted by Mansour Al Akeel <ma...@gmail.com>.
Gordon,
Thank you for replying. I am sorry I didn't explain it well. Maybe I was
relying on the link on ServiceMix mailing list. I will try to explain it
again here.

We have two systems, on separate networks. System A and System B. Each of
them provide different services. Some services in System A, need to call
services on System B. However, since each of them on a different network,
we have to rely on opening holes in the firewalls.

I think we can replace the existing setup, with a AMQP. For example a
service on system A (Service A), can call a service on System B (Service
B), buy connecting to an instance of QPID, and send a message to a queue
called INPUT_A. Service B would get this message, and process it, then
reply on queue OUTPUT_B. Service A would then select the reply based on
CorrelationId, and match it with the request.

Therefore we can establish a connection between those two services.
This is summarized in the request/response pattern. I was wondering if
there's a library that allows to do this without having to deal with the
details. After searching, I found something close to what I have in mind
(and you replied to the user).

http://qpid.2158936.n2.nabble.com/RPC-over-AMQP-with-Hessian-td5103076.html

Here's an RPC over messaging, (or Request/Reply) implementation by
RabbitMQ, https://www.rabbitmq.com/tutorials/tutorial-six-java.html

I will check out the project "https://github.com/ebourg/qpid-hessian" and
test it out. If there's nothing similar to in the Qpid, it will be nice to
have it.



On Mon, May 14, 2018 at 12:32 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 13/05/18 16:39, Mansour Al Akeel wrote:
>
>> Hello all,
>>
>> We have a situation where we need to connect multiple application in
>> different networks. We are trying to avoid opening a firewall hole.
>> I have posted a question in ServiceMix users mailing list explaining what
>> we need.
>>
>> http://mail-archives.apache.org/mod_mbox/servicemix-users/
>> 201805.mbox/%3CCAFvvX%3DZ-EbDo9T8388dCrVAfxiNjEZ-
>> AY785o7oU%3DKya7-3WBw%40mail.gmail.com%3E
>>
>> As I am searching, I found Microsoft Azure addresses exactly this use
>> case.
>> They use what is termed as relays.
>> http://mail-archives.apache.org/mod_mbox/servicemix-users/
>> 201805.mbox/%3CCAFvvX%3DZ-EbDo9T8388dCrVAfxiNjEZ-
>> AY785o7oU%3DKya7-3WBw%40mail.gmail.com%3E
>>
>> Since I need to expose services from clients behind firewall, I was
>> considering doing this in Qpid by creating multiple queues (in
>> virtualhost)
>> for each client. Each virtual host have a queue to pass the input for the
>> service. When the service complete (on the client), it provides the output
>> on another queue within the same virtual host. Requests and replies are
>> matched based on correlation it. The response is served back through a
>> restful service to original caller, after matching request-response.
>>
>> While I haven't used Azure, it looks they are exposing the service as a
>> webservice using SOAP bindings. Not necessary what I hoped, but it does
>> the
>> job.
>> Is there something equivalent to Azure Service Bus in Qpid that we can
>> utilize for our use case ?
>>
>>
> I'm not completely sure what you are looking for. However the Qpid
> dispatch router[1] allows you to communicate with services behind a
> firewall without requiring inbound connections through that firewall.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Service Bus, connecting services behind firewall

Posted by Gordon Sim <gs...@redhat.com>.
On 13/05/18 16:39, Mansour Al Akeel wrote:
> Hello all,
> 
> We have a situation where we need to connect multiple application in
> different networks. We are trying to avoid opening a firewall hole.
> I have posted a question in ServiceMix users mailing list explaining what
> we need.
> 
> http://mail-archives.apache.org/mod_mbox/servicemix-users/
> 201805.mbox/%3CCAFvvX%3DZ-EbDo9T8388dCrVAfxiNjEZ-
> AY785o7oU%3DKya7-3WBw%40mail.gmail.com%3E
> 
> As I am searching, I found Microsoft Azure addresses exactly this use case.
> They use what is termed as relays.
> http://mail-archives.apache.org/mod_mbox/servicemix-users/
> 201805.mbox/%3CCAFvvX%3DZ-EbDo9T8388dCrVAfxiNjEZ-
> AY785o7oU%3DKya7-3WBw%40mail.gmail.com%3E
> 
> Since I need to expose services from clients behind firewall, I was
> considering doing this in Qpid by creating multiple queues (in virtualhost)
> for each client. Each virtual host have a queue to pass the input for the
> service. When the service complete (on the client), it provides the output
> on another queue within the same virtual host. Requests and replies are
> matched based on correlation it. The response is served back through a
> restful service to original caller, after matching request-response.
> 
> While I haven't used Azure, it looks they are exposing the service as a
> webservice using SOAP bindings. Not necessary what I hoped, but it does the
> job.
> Is there something equivalent to Azure Service Bus in Qpid that we can
> utilize for our use case ?
> 

I'm not completely sure what you are looking for. However the Qpid 
dispatch router[1] allows you to communicate with services behind a 
firewall without requiring inbound connections through that firewall.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org