Not logged in. · Lost password · Register
Forum: MatriX RSS
Page: previous  1  2 
Avatar
Alex #16
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post ID 8722
no problem, you're welcome. This is what this forum is for ;-).

The serializer access your getter property the first time when you read the value. This is why MatriX is extremely fast compared to other components.
Avatar
Lightbarrier #17
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: Out of Order Results
I apologize for asking this one as it falls more into xmpp then Matrix however, when I receive the conversations they appear out of order by date as the example below shows. I could request all the conversations then sort them however, that would defeat the purpose of only requesting what I need as the time calls for it, do you have any idea how to retrieve the conversations in sorted order preferably from earliest to latest.

Thanks again.

Request:
  1. <iq id="hotel.agent1" type="get" xmlns="jabber:client">
  2.  <list with="hotel.agent1@jasdfjajdf" xmlns="urn:xmpp:archive">
  3.     <set xmlns="http://jabber.org/protocol/rsm">
  4.       <max>99</max>
  5.     </set>
  6.  </list>
  7. </iq>

Results:
  1. <list xmlns="urn:xmpp:archive">
  2.  <chat with="hotel.agent1@jasdfjajdf" start="2014-08-13T00:50:03.880Z" />
  3.  <chat with="hotel.agent1@jasdfjajdf" start="2014-08-07T18:38:39.157Z" />
  4.  <chat with="hotel.agent1@jasdfjajdf" start="2014-08-12T22:37:44.628Z" />
  5.  <set xmlns="http://jabber.org/protocol/rsm">
  6.     <first index="0">4</first>
  7.     <last>82</last>
  8.     <count>3</count>
  9.  </set>
  10. </list>
Avatar
Alex #18
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello

XEP-0136 sauis:

Quote by from XEP-0136, 7.1 Retrieving a List of Collections:
The server MUST list the collections (empty <chat/> elements including all attributes) in chronological order when responding to any request.

When the ordering does not match then I guess this is a bug on your server. or the server got confused during your tests. During testing (trial & error) it happens that wrong packets get sent to a server which can result in such weird responses. I would try to reset the server. It the problem still remains then you should contact the server vendor.

Because the result is an Enumerable in your MatriX class you could just use Linq's OrderBy to sort them by date. But still will still be an issue when you have a result set with several pages when the server mixes the dates between several pages.
Avatar
Lightbarrier #19
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Thanks, I'll try resetting the server here in a little bit.

I actually had some questions on paging though which has been giving me some trouble. To give some examples of where I'm stuck I've listed the XEP-0136 xml code for paging below through a list of collections/conversations.

Request First Page:
  1. <iq type='get' id='juliet1'>
  2.  <list xmlns='urn:xmpp:archive'
  3.         with='juliet@capulet.com'>
  4.     <set xmlns='http://jabber.org/protocol/rsm'>
  5.       <max>30</max>
  6.     </set>
  7.  </list>
  8. </iq>

Request Second Page:
  1. <iq type='get' id='list2'>
  2.  <list xmlns='urn:xmpp:archive'
  3.         start='1469-07-21T02:00:00Z'>
  4.     <set xmlns='http://jabber.org/protocol/rsm'>
  5.       <max>30</max>
  6.       <after>1469-07-21T03:16:37Zbalcony@house.capulet.com</after>
  7.     </set>
  8.  </list>
  9. </iq>

From the looks of things even though id='list2', with a number at the end to show that their retrieving the second page I don't think it has anything to do with retrieving the second page unless your suppose to use the same id you used for the first one.

"after" also confuses me as it looks like their concatenating the last date they care about with the user they care about, but I've also noticed start is a slightly different date, so I'm confused how this pairs up with after.

And then there's set in the results of my example below, here I request only 1 collection/conversation. It gives the index along with it, I feel that the last index could be used to help in knowing what page to retrieve next(exp: Conversations after index) however, I haven't found a example of that.

Result of Request for 1 Collection/Conversation:
  1. <list xmlns="urn:xmpp:archive">
  2.     <chat with="hotel.agent1@mnndfamds" start="2014-08-07T18:38:39.157Z" />
  3.     <set xmlns="http://jabber.org/protocol/rsm">
  4.       <first index="0">4</first>
  5.       <last>4</last>
  6.       <count>3</count>
  7.     </set>
  8.  </list>

Thanks again for your assistance.
This post was edited on 2014-08-13, 20:44 by Lightbarrier.
Avatar
Alex #20
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Result sets are separate XEP and defined in XEP-0059: Result Set Management.
This is the XEP which gets used in XEP-0136 for the paging.
I think you can find answers to all your questions in this XEP. When there are still open questions after reading this XEP please come back to me.

In MatriX XEP-0136 is implemented in the Matrix.Xmpp.ResultSetManagement namespace.

Alex
Avatar
Lightbarrier #21
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: Done
Thanks for the link Alex I got it working with that, as I thought it was the last index all along.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page: previous  1  2 
Forum: MatriX RSS