Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
rAs #1
Member since Jun 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Loading messages - website
Hello.
I have installed - Ejabberd server.
Now I would like to use Web site to retrieve and send messages.
Which package should I download?
How do retrieve messages?
Send messages to me to work, but do not know how to retrieve messages on the website.
Please help.
Thank you.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you get incoming messages in the OnMesage handler.

When using the .NET component then your XMPP session is running on the webserver. And all events gets raised on the server. Because HTTP is a synchronous 1 way protocol the server can't notify you of new incoming events. If you want to use MatriX .NETyou have either to use polling and poll your server in an interval for new events or add a Comet (revrse AJAX) layer to your app. You can find many threads related to this problem here in the forums when using the search function.

With MatriX for Silverlight you don't have this problems. So when possible I would suggest to MatriX for Silverlight.

Alex
Avatar
rAs #3
Member since Jun 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Trying to find solutions for data retrieval using the XMPP protocol.
I do not want to retrieve data using AJAX in the loop.
I look at services like Gmail or Facebook. They do not load the incoming messages in a loop.
This is my solution of using a web application.
How does it work?
Thank you.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Google is using XMPP in many places, not only for chat. They have Flash and Comet style clients.
I don't know what Facebook is using. Either BOSH or Comet [1].

There are 2 ways for XMPP Web applications.

1) Server side XMPP connection like you have now with MatriX .NET
here the XMPP connection is running on the web server. You have to reload the page to process events, use an Ajax loop, or a comet layer. This solution does not scale very good because your server holds the XMPP connection for every browser instance.

2) Client side XMPP connection which you can achieve with MatriX for Silverlight, other JavaScript (eg. Strophe [2]) or Flash libraries. This scales because the XMPP connections runs on the browser. There is no additional load on your servers.

If you want to use .NET and one of our SDKs then there are only 2 solutions.
1) MatriX .NET and and add a Comet layer to pass events in realtime
2) MatriX for Silverlight.

All other solutions are on JavaScript only and not related to .NET.

Alex

[1] http://en.wikipedia.org/wiki/Comet_%28programming%29
[2] http://code.stanziq.com/strophe/
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: