xmpp uri in camel / naming a hid resource

2013-06-23 Thread Garbage


Hello,
I doubt that I understood how to name a jid-resource when using Apache Camel. 
Perhaps it is not even possible because the xmpp endpoint will take what I 
intent to be a resource as an participant.
format for an xmpp url in camel: 
xmpp://[login@]hostname[:port][/participant][?Options]
format of a jid: node@domain/resource
Background:
I want to use xmpp in order to access a central application (which is behind a 
firewall I have no influence on) from various clients. The xmpp server will be 
the coordinator for all the clients which send commands to the central 
applicatoin which in turn will answer. I will create one openfire user per 
installation (an installation is the combination of 1 central application and n 
clients accessing it).
The idea is then to have the clients logged into the xmpp server and have a 
jabber ressource set accordingly to differentiate between them. I want to 
create only one account per installation.
In a picture the communication will look like this:
 
    +-+   
    |   application:  |
    |   installati...@xmpp.srv.net/app    |
    +-+   
 I
 I
 I
    +-+   
    |   XMPP Server   |
    |    hostname: xmpp.srv.net
    +-+ 
  
    / \
   /   \
  / \
+--    
+--    
|   contacting device #1  |    |   contacting device #n 
 |
| installat...@xmpp.srv.net/device1   |    | installat...@xmpp.srv.net/devicen  
 |
+--    
+--

Question:
How should I address the application from device1 and make sure that an 
outgoing answer to the request only reaches that device and no other device ?
I would have expected something like this, but this is where the interpretation 
of the "/" comes into my way:
from device to application:
xmpp://installati...@xmpp.srv.net/device1/installati...@xmpp.srv.net/app?password=kept&message=whatIsTwoTimesFour
from application to device:
xmpp://installati...@xmpp.srv.net/app/installati...@xmpp.srv.net/device1?passwort=secret&message=8
Any other comments concerning what I plan to do are welcome because the idea is 
quite new and I don't know if this is the ideal way !
But please don't comment on my drawing skills in ASCII art ;-)


Re: xmpp uri in camel / naming a hid resource

2013-06-23 Thread Willem jiang
Hi,

I think it is make sense to treat the installation as a chat room, then you can 
let the application and device talk to each other.  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Sunday, June 23, 2013 at 7:12 PM, garb...@gmx.de wrote:

>  
>  
> Hello,
> I doubt that I understood how to name a jid-resource when using Apache Camel. 
> Perhaps it is not even possible because the xmpp endpoint will take what I 
> intent to be a resource as an participant.
> format for an xmpp url in camel: 
> xmpp://[login@]hostname[:port][/participant][?Options]
> format of a jid: node@domain/resource
> Background:
> I want to use xmpp in order to access a central application (which is behind 
> a firewall I have no influence on) from various clients. The xmpp server will 
> be the coordinator for all the clients which send commands to the central 
> applicatoin which in turn will answer. I will create one openfire user per 
> installation (an installation is the combination of 1 central application and 
> n clients accessing it).
> The idea is then to have the clients logged into the xmpp server and have a 
> jabber ressource set accordingly to differentiate between them. I want to 
> create only one account per installation.
> In a picture the communication will look like this:
>  
> +-+  
> | application: |
> | installati...@xmpp.srv.net (mailto:installati...@xmpp.srv.net)/app |
> +-+  
> I
> I
> I
> +-+  
> | XMPP Server |
> | hostname: xmpp.srv.net (http://xmpp.srv.net)
> +-+  
> / \
> / \
> / \
> +-- 
> +--  
> | contacting device #1 | | contacting device #n |
> | installat...@xmpp.srv.net (mailto:installat...@xmpp.srv.net)/device1 | | 
> installat...@xmpp.srv.net (mailto:installat...@xmpp.srv.net)/devicen |
> +-- 
> +--
>  
> Question:
> How should I address the application from device1 and make sure that an 
> outgoing answer to the request only reaches that device and no other device ?
> I would have expected something like this, but this is where the 
> interpretation of the "/" comes into my way:
> from device to application:
> xmpp://installati...@xmpp.srv.net 
> (mailto:installati...@xmpp.srv.net)/device1/installati...@xmpp.srv.net 
> (mailto:installati...@xmpp.srv.net)/app?password=kept&message=whatIsTwoTimesFour
> from application to device:
> xmpp://installati...@xmpp.srv.net 
> (mailto:installati...@xmpp.srv.net)/app/installati...@xmpp.srv.net 
> (mailto:installati...@xmpp.srv.net)/device1?passwort=secret&message=8
> Any other comments concerning what I plan to do are welcome because the idea 
> is quite new and I don't know if this is the ideal way !
> But please don't comment on my drawing skills in ASCII art ;-)