Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Chat Module [Le...  Ajax chat?
Previous Previous
 
Next Next
New Post 7/12/2006 6:53 AM
User is offline e y
1 posts
10th Ranked


Ajax chat? 

hello,

more then half a year ago I made a simple Ajax based chat application, since this is dotnet nuke I bet you will use Ajax aswell...... but I never made a fully functional control of this, allthough I could have done it. mainly for the next reasons......

The biggest problem I have encountered is the balance between bandwith and server CPU usage.

every poll takes a in a few kilobytes....and after a while this is alot !(definately if you poll every second)

The answer to this problem is checking server side if there is a new message every second (in total maybe for about 20 seconds before you send something back to the client, unless there already is a new message, if this is the case the timeframe is shorter). a balance between polling and checking every second if there is a new message with server side code....

you probably have investigated this already

Actually I also have two questions. if you are willing to answer it offcourse....

1. How is the performance of a server influenced if there is server side polling? with 1 or 2 users there is no problem but what happens if there are 50 users?

2. you guys have a way of reducing those few kilobytes per poll ?

greets,

 
New Post 11/11/2006 5:58 PM
User is offline Matt Christenson
136 posts
www.RealSkydiving.com
9th Ranked


Re: Ajax chat? 
this makes me wonder, what kind of options would be available for using a non html based protocol as a primary means of chat - so that the server can push..  this could be done using the IRC protocol, or even telnet (sockets) over port 23.  It would mean having the client download a java applet or some other kind of engine to be running - but it could be worth it as far as performance goes - this could be an optional but "preferred" feature - using ajax as a standby for those who do not wish to download client software.
 
New Post 11/19/2006 2:56 AM
User is offline Rene Baron
11 posts
www.baronsolutions.ch
10th Ranked


Re: Ajax chat? 

We are currently building a DNN Chat module for one of our large customers.

The biggest challenge here is that the customer does not allow any polling at all
! (The reasons for this is that the chat-function is used as some kind of alarm box
where about 200-500 clients will concurrently register themselves as "listeners"
to the DNN-server from where they will get a message only after minutes - sometimes
even hours).

So our first reflex was to build it on Sockets - what we also have done - pragmatic
- but it rocks.

Now, the problem, when it comes to build a standard DNN Module out of this, is, that
many organisations will not allow Socket services on their or do not know how to
deal with it. This is especially true when DNN is hosted by a third party service
provider.

So what to do ? Polling again ??

As this is a general questions upon how to deal with asynchronous client-side calls
in general, we have started to experiment with the following setup:

On the client side we have embedded the chat functionality into Adobe Flash 9 (*.swf-files)
components  (using MXML and ActionScript 3.0 on Adobe Flex Builder 2) -- do not mind
this Adobe stuff - its more or less the AJAX way with more fun in it :-) --  that
either calls a .NET WebService, an ASP.PAGE (*.aspx) or some other low-level HTTP-Handler
(*.ashx).

What all those dotNet Handlers now have in common is the question,  about how to
make them hold the response back, till a message arrives from another thread (e.g.
another client sending a message).

Of course it would be simple to send all those page requests to a loop where they
will check every few seconds for new message. Beyond the fact, that this way, we
have just moved the polling problem from the client to the server, this solution
would turn out to be even worse, as it consumes your CPU on the search for nothing,
additionally wastes memory for keeping all those pending requests in a queue and
finally keeps most of the request from execution at all (leading to timeouts) because
the DNN application's Thread-Pool only allows a limited amount of pages to be executed
in parallel.

So the only way to solve this issue are "asynchronous" pages, or more generally,
asynchronous HTTP-Handlers.

This type of HTTP-handlers will create a new thread from the system pool (not the
DNN application pool). Then the HTTP-Handler will tell this new thread to wait till
it is signaled form another thread (the thread that is started when a client sends
a message) and call/revoke the original HTTP-Handler context so that it can complete
the original request for returning the originally requested result to the client.

Of course, all this is a little bit more complex to implement that it seems here
(dealing with time-outs, exceptions, locks, limited thread-pools etc.) but it is
the only way we have found working so far.

Although all this seems to work now quite well we still have the feeling that there
might be a simpler solution to this and when not that somebody might have written
a class or wrapper that deals with all those details on a higher abstraction level.

So, we are very curious what others are thinking on this and whether the DNN core-team
might advice on a general approach about how to deal with this.

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Chat Module [Le...  Ajax chat?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/
Willhite & Sharron Realtors
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
Swanzey Internet Group LLC
DotNetNuke design, development, hosting, maintenance, and training. Translation of conventional (non-DNN) sites welcomed. Cleanup of existing DNN sites welcomed.
www.swanzey.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP