Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Idle Forge ProjectsIdle Forge ProjectsChatChatAjax chat?Ajax chat?
Previous
 
Next
New Post
7/12/2006 9:53 AM
 

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 9:58 PM
 
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 6:56 AM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Idle Forge ProjectsIdle Forge ProjectsChatChatAjax chat?Ajax chat?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out