Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 3rd, 2005, 12:55 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

okay..so here is what i plan. create a private queue for each registered users. send messages to users by invoking web service methods. the webservice reads message queues and sends them back to corresspondig users. MSMQ is used as on a buffer for storing messges sent by users over webmethods. what do u think? reply soon....

 
Old July 3rd, 2005, 01:03 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

any comments please.

 
Old July 3rd, 2005, 02:19 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

am i not clear. any questions or suggestions: mail to connect2sandeep@gmail.com
 
Old July 5th, 2005, 07:53 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you saying that your messenger clients are going to poll the queue via web services to get their messages?

This doesn't sound like a very good approach to building an "instant" messenger. This approach also sounds like it will generate a whole lot of needless network traffic.

-Peter
 
Old July 5th, 2005, 02:54 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

have any idea how msn webmessenger is implemented.

 
Old July 5th, 2005, 03:03 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

how will it generate needless network traffic. the msmq service acts only as a backend for queueing messges. messages will be sent across http using soap as string,'not the entire message' but by reading only the message body and sending to the corressponding user.
the client will communicate with the backend wit simple webmethod calls which i think has far less overhead. what do u think?

 
Old July 5th, 2005, 03:11 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

the polling is an overhead to some extent. but what is the solution to that.

 
Old July 5th, 2005, 11:26 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I imagine MSN messenger works something like one of these two scenarios:

A) I log on, the MSN client talks to the main servers and stores some information about my current connection (ip:port). When my friend logs on, he gets his buddy list which includes my ip:port. When he sends me a message, his client uses my ip:port to talk with my client. If that fails, it asks the server for the information again (in case it changed).

B) Pretty much the same as in A but the messages are routed thru the main servers instead of going directly.

I suspect that A is more likely because of several reasons:
1) Routing thru main servers would likely result in WAY too much traffic that isn't really needed if you can make a direct connection (or unless MS wants to log all our IM conversations.)
2) Back when I used one of the earlier versions of the AOL-IM clients, I'd get into this situation where I'd be chatting with my co-worker who was on my work WAN via VPN. We'd be chatting when the AOL client would log off because of some internet disruption. Despite the apparent lack of connection to the main AOL-IM servers, I could continue chatting to my friend. The only possible way this could happend is if the client had been smart enough to discover the other client over the WAN (nothing more than a internal LAN address).


If you built a client that constantly polled a main server for messages that you wanted to act in anything close to "real-time" you'd need to poll pretty often. I'd say not less often than once every 5 seconds. This would generate an enormous amount of network traffic and strain on the webservice hosting machine for what will amount to be unneeded calls. Have you seen the contents of an HTTP webservice request? It would be considerably bulky for something that fits the nature of this topic.

POST /myMessenger.asmx HTTP/1.1
Host: myWebServer
Content-Type: text/xml; charset=utf-8
Content-Length: 999
SOAPAction: "http://www.myWebSite.com/myMessenger/GetMessages"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetMessages xmlns="http://www.myWebSite.com/myMessenger">
      <gidUserGUID>guid</gidUserGUID>
    </GetMessages>
  </soap:Body>
</soap:Envelope>


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetMessagesResponse xmlns="http://www.myWebSite.com/myMessenger">
      <GetMessagesResult>string</GetMessagesResult>
    </GetMessagesResponse>
  </soap:Body>
</soap:Envelope>


-Peter
 
Old July 6th, 2005, 12:16 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

thanks for ur help. it was quite informative.
Scalability is an issue to every distributed application. while a model might work for few clients; it cannot be implemented for a large number of users.
we are planning to develop a strict web application using asp.net. and is it possible for a web application to get access to TCP/IP ports.


 
Old July 9th, 2005, 03:43 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default

i bet there is no way to communicate peer to peer using plain html or javascript.
the only way to reduce the overhead of polling is to set timeouts for idle users. the offline messages will be queued and retrieved when connection is re-established.
will it work? what do u think.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Messaging anukagni Access 10 September 1st, 2006 11:54 PM
Messaging in JAVA salahu BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 22nd, 2006 10:59 PM
sms messaging dev_sept ASP.NET 1.0 and 1.1 Professional 0 August 28th, 2005 11:55 AM
System.Messaging does not exist jimbeam36 .NET Web Services 0 November 12th, 2004 08:15 PM
Instant Messaging over IP SweetStudyRuhr Classic ASP Basics 0 July 9th, 2003 01:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.