You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Thomas Kratz <ei...@googlemail.com> on 2010/03/08 10:20:15 UTC

[vysper] waiting for the protocolworker to complete

Hi all,

I don't know if my question yesterday was concrete enough.

I try to send an unavailable message when the connection breaks down
and I wonder if I can somehow wait for the message to go out. Because
afterwards the session gets CLOSED and an unbind happens, which now
makes my attempt to send the unavailable break. Or is there a way to
send a Stanza synchronuosly?

Any help would be appreciated, 'cause I truly need this.

Regards Thomas

Re: [vysper] waiting for the protocolworker to complete

Posted by Bernd Fondermann <be...@googlemail.com>.
On Mon, Mar 8, 2010 at 20:34, Bernd Fondermann <bf...@brainlounge.de> wrote:
> Thomas Kratz wrote:
>> Hi all,
>>
>> I don't know if my question yesterday was concrete enough.
>>
>> I try to send an unavailable message when the connection breaks down
>> and I wonder if I can somehow wait for the message to go out.
>
> Wait a second.
>
> There are different cases:
>
> a. Client sends <pres unavail.../> and keeps connection alive
> b. Client sends <pres unavail.../> (maybe followed by a </stream:stream>
> and closes the socket
> c. Client dies, Routing is broken, Socket cannot transport packets
> successfully end-to-end and the server detects this, because the socket
> gets closed - this is without the client notifying the server of anything
> d. Server goes down and is in process of ending all sessions
>
> Up until now, I thought we were talking c., right?
> a. is (should be) already working
> b. is not fully working,  but we would be working on the wrong end then
> d. must be handled completely different.
>
> So, what is/are your case(s)?
>
>> Because
>> afterwards the session gets CLOSED and an unbind happens, which now
>> makes my attempt to send the unavailable break.
>
>> Or is there a way to
>> send a Stanza synchronuosly?
>
> in MinaBackedSessionContext there is write(Stanza). This is a hack. So
> is everything attached to VYSPER-185.

On the not-a-hack front I changed the endSession() signature.
It now receives a hint what causes the termination.

  Bernd

Re: [vysper] waiting for the protocolworker to complete

Posted by Thomas Kratz <ei...@googlemail.com>.
Hi Bernd,

right after getting home I wanted to try that. But I have trouble with
the spring setup, opened a jira for this.
Seems to be something with spring integration, but thats only a guess.

So long, see you tomorrow.

Thomas

2010/3/9 Bernd Fondermann <be...@googlemail.com>:
> On Tue, Mar 9, 2010 at 15:12, Thomas Kratz <ei...@googlemail.com> wrote:
>> HI Bernd
>>
>> I have problems applying the patch (windows machine with eclipse)
>> because its at the root of your structure (mine is not the same).
>
> You could adjust the paths in the patch file or use proper tools like
> tortoisesvn.
>
>  Bernd
>
>>
>> Regards Thomas
>>
>> 2010/3/9 Bernd Fondermann <be...@googlemail.com>:
>>> On Tue, Mar 9, 2010 at 10:09, Thomas Kratz <ei...@googlemail.com> wrote:
>>>> 2010/3/9 Bernd Fondermann <be...@googlemail.com>:
>>>>> On Tue, Mar 9, 2010 at 09:43, Thomas Kratz <ei...@googlemail.com> wrote:
>>>>>> Hi Bernd,
>>>>>>
>>>>>> yes I am talking about c)
>>>>>
>>>>> Then you can only send unavail to contacts, sending to the client too
>>>>> or even wait is pretty much pointless, isn't it?
>>>>
>>>> Yes that what I am trying to do. But I had trouble because of the
>>>> unbind makes it impossible to send to stanza to the contacts, because
>>>> the resource of the unhappy broken down client got removed.
>>>>
>>>>>
>>>>>> I already thought about the problem, that I only have to do this on
>>>>>> connection breakdown, but I did not see how to make the distinction.
>>>>>
>>>>> Pls update from svn and look at the new signature of endSession()
>>>>>
>>>>
>>>> Thats great, I think that will make it.
>>>
>>> Could you also try the patch I attached to VYSPER-185 and give a quick
>>> feedback if that helps?
>>>
>>> Thanks,
>>>
>>>  Bernd
>>>
>>
>>
>>
>> --
>> http://www.buchmanager.com
>> http://thomaskratz.blogspot.com
>>
>



-- 
http://www.buchmanager.com
http://thomaskratz.blogspot.com

Re: [vysper] waiting for the protocolworker to complete

Posted by Bernd Fondermann <be...@googlemail.com>.
On Tue, Mar 9, 2010 at 15:12, Thomas Kratz <ei...@googlemail.com> wrote:
> HI Bernd
>
> I have problems applying the patch (windows machine with eclipse)
> because its at the root of your structure (mine is not the same).

You could adjust the paths in the patch file or use proper tools like
tortoisesvn.

  Bernd

>
> Regards Thomas
>
> 2010/3/9 Bernd Fondermann <be...@googlemail.com>:
>> On Tue, Mar 9, 2010 at 10:09, Thomas Kratz <ei...@googlemail.com> wrote:
>>> 2010/3/9 Bernd Fondermann <be...@googlemail.com>:
>>>> On Tue, Mar 9, 2010 at 09:43, Thomas Kratz <ei...@googlemail.com> wrote:
>>>>> Hi Bernd,
>>>>>
>>>>> yes I am talking about c)
>>>>
>>>> Then you can only send unavail to contacts, sending to the client too
>>>> or even wait is pretty much pointless, isn't it?
>>>
>>> Yes that what I am trying to do. But I had trouble because of the
>>> unbind makes it impossible to send to stanza to the contacts, because
>>> the resource of the unhappy broken down client got removed.
>>>
>>>>
>>>>> I already thought about the problem, that I only have to do this on
>>>>> connection breakdown, but I did not see how to make the distinction.
>>>>
>>>> Pls update from svn and look at the new signature of endSession()
>>>>
>>>
>>> Thats great, I think that will make it.
>>
>> Could you also try the patch I attached to VYSPER-185 and give a quick
>> feedback if that helps?
>>
>> Thanks,
>>
>>  Bernd
>>
>
>
>
> --
> http://www.buchmanager.com
> http://thomaskratz.blogspot.com
>

Re: [vysper] waiting for the protocolworker to complete

Posted by Thomas Kratz <ei...@googlemail.com>.
HI Bernd

I have problems applying the patch (windows machine with eclipse)
because its at the root of your structure (mine is not the same).

Regards Thomas

2010/3/9 Bernd Fondermann <be...@googlemail.com>:
> On Tue, Mar 9, 2010 at 10:09, Thomas Kratz <ei...@googlemail.com> wrote:
>> 2010/3/9 Bernd Fondermann <be...@googlemail.com>:
>>> On Tue, Mar 9, 2010 at 09:43, Thomas Kratz <ei...@googlemail.com> wrote:
>>>> Hi Bernd,
>>>>
>>>> yes I am talking about c)
>>>
>>> Then you can only send unavail to contacts, sending to the client too
>>> or even wait is pretty much pointless, isn't it?
>>
>> Yes that what I am trying to do. But I had trouble because of the
>> unbind makes it impossible to send to stanza to the contacts, because
>> the resource of the unhappy broken down client got removed.
>>
>>>
>>>> I already thought about the problem, that I only have to do this on
>>>> connection breakdown, but I did not see how to make the distinction.
>>>
>>> Pls update from svn and look at the new signature of endSession()
>>>
>>
>> Thats great, I think that will make it.
>
> Could you also try the patch I attached to VYSPER-185 and give a quick
> feedback if that helps?
>
> Thanks,
>
>  Bernd
>



-- 
http://www.buchmanager.com
http://thomaskratz.blogspot.com

Re: [vysper] waiting for the protocolworker to complete

Posted by Bernd Fondermann <be...@googlemail.com>.
On Tue, Mar 9, 2010 at 10:09, Thomas Kratz <ei...@googlemail.com> wrote:
> 2010/3/9 Bernd Fondermann <be...@googlemail.com>:
>> On Tue, Mar 9, 2010 at 09:43, Thomas Kratz <ei...@googlemail.com> wrote:
>>> Hi Bernd,
>>>
>>> yes I am talking about c)
>>
>> Then you can only send unavail to contacts, sending to the client too
>> or even wait is pretty much pointless, isn't it?
>
> Yes that what I am trying to do. But I had trouble because of the
> unbind makes it impossible to send to stanza to the contacts, because
> the resource of the unhappy broken down client got removed.
>
>>
>>> I already thought about the problem, that I only have to do this on
>>> connection breakdown, but I did not see how to make the distinction.
>>
>> Pls update from svn and look at the new signature of endSession()
>>
>
> Thats great, I think that will make it.

Could you also try the patch I attached to VYSPER-185 and give a quick
feedback if that helps?

Thanks,

  Bernd

Re: [vysper] waiting for the protocolworker to complete

Posted by Thomas Kratz <ei...@googlemail.com>.
2010/3/9 Bernd Fondermann <be...@googlemail.com>:
> On Tue, Mar 9, 2010 at 09:43, Thomas Kratz <ei...@googlemail.com> wrote:
>> Hi Bernd,
>>
>> yes I am talking about c)
>
> Then you can only send unavail to contacts, sending to the client too
> or even wait is pretty much pointless, isn't it?

Yes that what I am trying to do. But I had trouble because of the
unbind makes it impossible to send to stanza to the contacts, because
the resource of the unhappy broken down client got removed.

>
>> I already thought about the problem, that I only have to do this on
>> connection breakdown, but I did not see how to make the distinction.
>
> Pls update from svn and look at the new signature of endSession()
>

Thats great, I think that will make it.

>> I
>> do not even have enough knowledge to set up a proper test case :( I
>> only can test with my smack client by now. If you gave me some
>> directions where to look at I ll try and provide a test case.
>>
>> BTW I saw that I get the avaiable message twice when a user connects,
>> that doesn't hurt me, but I guess its not intended, is it ?
>
> Can you provide more details please...
> Who get's the avail twice? The client? His contacts? Both? Who becomes
> avail first, the client or his contacts?
> May I ask you to open a JIRA for this? Thanks! :-)

I'll open a JIRA and attach my client code.

>
>>
>> Greetings from Hamburg
>> Thomas
>
> Cheers,
>
>  Bernd
>
>>
>>
>> 2010/3/8 Bernd Fondermann <bf...@brainlounge.de>:
>>> Thomas Kratz wrote:
>>>> Hi all,
>>>>
>>>> I don't know if my question yesterday was concrete enough.
>>>>
>>>> I try to send an unavailable message when the connection breaks down
>>>> and I wonder if I can somehow wait for the message to go out.
>>>
>>> Wait a second.
>>>
>>> There are different cases:
>>>
>>> a. Client sends <pres unavail.../> and keeps connection alive
>>> b. Client sends <pres unavail.../> (maybe followed by a </stream:stream>
>>> and closes the socket
>>> c. Client dies, Routing is broken, Socket cannot transport packets
>>> successfully end-to-end and the server detects this, because the socket
>>> gets closed - this is without the client notifying the server of anything
>>> d. Server goes down and is in process of ending all sessions
>>>
>>> Up until now, I thought we were talking c., right?
>>> a. is (should be) already working
>>> b. is not fully working,  but we would be working on the wrong end then
>>> d. must be handled completely different.
>>>
>>> So, what is/are your case(s)?
>>>
>>>> Because
>>>> afterwards the session gets CLOSED and an unbind happens, which now
>>>> makes my attempt to send the unavailable break.
>>>
>>>> Or is there a way to
>>>> send a Stanza synchronuosly?
>>>
>>> in MinaBackedSessionContext there is write(Stanza). This is a hack. So
>>> is everything attached to VYSPER-185.
>>>
>>>  Bernd
>>>
>>>
>>>
>>
>>
>>
>> --
>> http://www.buchmanager.com
>> http://thomaskratz.blogspot.com
>>
>



-- 
http://www.buchmanager.com
http://thomaskratz.blogspot.com

Re: [vysper] waiting for the protocolworker to complete

Posted by Bernd Fondermann <be...@googlemail.com>.
On Tue, Mar 9, 2010 at 09:43, Thomas Kratz <ei...@googlemail.com> wrote:
> Hi Bernd,
>
> yes I am talking about c)

Then you can only send unavail to contacts, sending to the client too
or even wait is pretty much pointless, isn't it?

> I already thought about the problem, that I only have to do this on
> connection breakdown, but I did not see how to make the distinction.

Pls update from svn and look at the new signature of endSession()

> I
> do not even have enough knowledge to set up a proper test case :( I
> only can test with my smack client by now. If you gave me some
> directions where to look at I ll try and provide a test case.
>
> BTW I saw that I get the avaiable message twice when a user connects,
> that doesn't hurt me, but I guess its not intended, is it ?

Can you provide more details please...
Who get's the avail twice? The client? His contacts? Both? Who becomes
avail first, the client or his contacts?
May I ask you to open a JIRA for this? Thanks! :-)

>
> Greetings from Hamburg
> Thomas

Cheers,

  Bernd

>
>
> 2010/3/8 Bernd Fondermann <bf...@brainlounge.de>:
>> Thomas Kratz wrote:
>>> Hi all,
>>>
>>> I don't know if my question yesterday was concrete enough.
>>>
>>> I try to send an unavailable message when the connection breaks down
>>> and I wonder if I can somehow wait for the message to go out.
>>
>> Wait a second.
>>
>> There are different cases:
>>
>> a. Client sends <pres unavail.../> and keeps connection alive
>> b. Client sends <pres unavail.../> (maybe followed by a </stream:stream>
>> and closes the socket
>> c. Client dies, Routing is broken, Socket cannot transport packets
>> successfully end-to-end and the server detects this, because the socket
>> gets closed - this is without the client notifying the server of anything
>> d. Server goes down and is in process of ending all sessions
>>
>> Up until now, I thought we were talking c., right?
>> a. is (should be) already working
>> b. is not fully working,  but we would be working on the wrong end then
>> d. must be handled completely different.
>>
>> So, what is/are your case(s)?
>>
>>> Because
>>> afterwards the session gets CLOSED and an unbind happens, which now
>>> makes my attempt to send the unavailable break.
>>
>>> Or is there a way to
>>> send a Stanza synchronuosly?
>>
>> in MinaBackedSessionContext there is write(Stanza). This is a hack. So
>> is everything attached to VYSPER-185.
>>
>>  Bernd
>>
>>
>>
>
>
>
> --
> http://www.buchmanager.com
> http://thomaskratz.blogspot.com
>

Re: [vysper] waiting for the protocolworker to complete

Posted by Thomas Kratz <ei...@googlemail.com>.
Hi Bernd,

yes I am talking about c)
I already thought about the problem, that I only have to do this on
connection breakdown, but I did not see how to make the distinction. I
do not even have enough knowledge to set up a proper test case :( I
only can test with my smack client by now. If you gave me some
directions where to look at I ll try and provide a test case.

BTW I saw that I get the avaiable message twice when a user connects,
that doesn't hurt me, but I guess its not intended, is it ?

Greetings from Hamburg
Thomas


2010/3/8 Bernd Fondermann <bf...@brainlounge.de>:
> Thomas Kratz wrote:
>> Hi all,
>>
>> I don't know if my question yesterday was concrete enough.
>>
>> I try to send an unavailable message when the connection breaks down
>> and I wonder if I can somehow wait for the message to go out.
>
> Wait a second.
>
> There are different cases:
>
> a. Client sends <pres unavail.../> and keeps connection alive
> b. Client sends <pres unavail.../> (maybe followed by a </stream:stream>
> and closes the socket
> c. Client dies, Routing is broken, Socket cannot transport packets
> successfully end-to-end and the server detects this, because the socket
> gets closed - this is without the client notifying the server of anything
> d. Server goes down and is in process of ending all sessions
>
> Up until now, I thought we were talking c., right?
> a. is (should be) already working
> b. is not fully working,  but we would be working on the wrong end then
> d. must be handled completely different.
>
> So, what is/are your case(s)?
>
>> Because
>> afterwards the session gets CLOSED and an unbind happens, which now
>> makes my attempt to send the unavailable break.
>
>> Or is there a way to
>> send a Stanza synchronuosly?
>
> in MinaBackedSessionContext there is write(Stanza). This is a hack. So
> is everything attached to VYSPER-185.
>
>  Bernd
>
>
>



-- 
http://www.buchmanager.com
http://thomaskratz.blogspot.com

Re: [vysper] waiting for the protocolworker to complete

Posted by Bernd Fondermann <bf...@brainlounge.de>.
Thomas Kratz wrote:
> Hi all,
> 
> I don't know if my question yesterday was concrete enough.
> 
> I try to send an unavailable message when the connection breaks down
> and I wonder if I can somehow wait for the message to go out. 

Wait a second.

There are different cases:

a. Client sends <pres unavail.../> and keeps connection alive
b. Client sends <pres unavail.../> (maybe followed by a </stream:stream>
and closes the socket
c. Client dies, Routing is broken, Socket cannot transport packets
successfully end-to-end and the server detects this, because the socket
gets closed - this is without the client notifying the server of anything
d. Server goes down and is in process of ending all sessions

Up until now, I thought we were talking c., right?
a. is (should be) already working
b. is not fully working,  but we would be working on the wrong end then
d. must be handled completely different.

So, what is/are your case(s)?

> Because
> afterwards the session gets CLOSED and an unbind happens, which now
> makes my attempt to send the unavailable break. 

> Or is there a way to
> send a Stanza synchronuosly?

in MinaBackedSessionContext there is write(Stanza). This is a hack. So
is everything attached to VYSPER-185.

  Bernd