views:

417

answers:

4

Hello everyone,

i am implementing a chat system in asp.net, much like google chat and i use xmhttp to send and receive data, and i am using a single table to store all chat for all user.

i wanted to create global temporary tables in sql using a XMLHttpRequest so as to be abl to organise data better(instead of storing all the chat in a sigle table which can(i dont know for sure) cause locking issues when many users are accessing it.)

also for my system i don't have to store the chat and so i thought that a global temporary table would be better since it will already be dropped and save me the trouble of clearing it.

but the after the table has been created by the Xmlhttprequest it gets dropped just after its creation....why this happen i don't know....i also have removed all connection closing lines but still no luck

so what should i do?? also if anyone knows of any online resources that can points me about best practices to follow please tell me.

+1  A: 

Your table won't have locking issues with many users accessing it. Temporary tables are not meant to be shared cross-call, and you're going to wind up with far more roadblocks down that path. It is probably better to simply store your data in a table, then poll the table.

The only time you could have "locking issues" is if the users are attempting to write the same chunk of data to the same row at the same time ... which shouldn't be happening in a chat application.

Additionally, Google Chat uses a COMET style implementation instead of a polling implementation. It has been my experience that COMET > polling in terms of user experience.

JustLoren
so whaT should i do , tell me how can i handle it.
Abhisheks.net
sorry dear i don't know about COMET style so please tell me about it.and thank to reply me.
Abhisheks.net
http://en.wikipedia.org/wiki/Comet_%28programming%29
RedFilter
ya dear, i see that, but i never use of it so if you have any application of it that is online then it will very helpful for me.
Abhisheks.net
A: 

You're not supposed to keep any chat messages on your database actually... unless you're implementing offline messages.

Bassel Alkhateeb
A: 

Hi,

I've recently published an opensource chatting application over at CodePlex. It uses a XML datastore and uses Linq to XML for CRUD. Check it out @ http://aspnetjquerychat.codeplex.com/

Ali Kazmi
A: 

Hi Ali, I think your project has not yet been published. I am unable to access your project.

Sreenivasa