Author |
Topic |
|
Matt8109
New Member
64 Posts |
Posted - 24 April 2002 : 18:37:43
|
Ok, this may sound crazy but I am going to write an ASP IM system for my site. It is going to be like a regular AIM window that stays open and you can send messages to and fro. I was wondering what kind of database structure I sould have.
If someone starts a conversation, should I make a new table in the database, then delete it when they stop the conversation? Or should I store all the IMs in one large table and just loop through printing out all the messages that belong to that IM session? Looping through all of the IMs seems wasteful of the CPU, when you have alot of people on, that could put alot of stress on the system, right?
Or is there another way to do this? I want this to be in the snitz DB so all the username and password stuff is right there.
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 24 April 2002 : 19:25:42
|
You could save yourself the trouble and download the PM Pager or download it to see how it works. But it does essentially what you want.
@tomic
http://www.skepticfriends.org |
|
|
Doug G
Support Moderator
USA
6493 Posts |
Posted - 24 April 2002 : 23:44:46
|
I'd worry more about my communication structure than the db structure. Like how you will "push" a message out to a browser unless the client is polling?
====== Doug G ====== |
|
|
Matt8109
New Member
64 Posts |
Posted - 25 April 2002 : 17:00:38
|
quote:
You could save yourself the trouble and download the PM Pager or download it to see how it works. But it does essentially what you want.
I have it installed already and it keeps all of the PMs send, so it is really not pratical.
quote: Like how you will "push" a message out to a browser unless the client is polling?
The user will have to open a sperate window, like a buddy list, and sign on to the system using their snitz username and password. That page will refresh every 15 seconds. If there is an IM for them in the DB, then it will pop up in another window, then they will be able to talk like you do in a ASP chat, where the page refreshes every so often.
|
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 25 April 2002 : 17:10:02
|
quote: I have it installed already and it keeps all of the PMs send, so it is really not pratical.
everything you are talking about is in the PM Pager. it functions the exact same way you are talking about.
Brad Web Hosting with SQL Server @ $24.95 per month
|
|
|
Matt8109
New Member
64 Posts |
Posted - 25 April 2002 : 17:25:39
|
quote: everything you are talking about is in the PM Pager. it functions the exact same way you are talking about.
Not really, it stores all of the information in the database under PM so everytime a person has a conversation with someone else, 50+ PMs are added to the database and downloading a database to get rid of all of the PMs is not what I want to be doing.
|
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 25 April 2002 : 18:46:22
|
Set up another table for Instant_PMs perhaps and have them delete themselves when the session expires or just have code that allows them a lifespan of only 24 hours.
@tomic
http://www.skepticfriends.org |
|
|
Jeepaholic
Average Member
USA
697 Posts |
Posted - 25 April 2002 : 19:54:32
|
Just delete the entry when the receiving user reads it.
Al Bsharah Jeepaholics Anonymous |
|
|
Matt8109
New Member
64 Posts |
Posted - 25 April 2002 : 19:57:32
|
I dont really want to use the PM Pager mod. Can you jst answer my question above?
Thanks.
|
|
|
Bunce
New Member
Australia
84 Posts |
Posted - 25 April 2002 : 20:51:51
|
quote:
quote: everything you are talking about is in the PM Pager. it functions the exact same way you are talking about.
Not really, it stores all of the information in the database under PM so everytime a person has a conversation with someone else, 50+ PMs are added to the database and downloading a database to get rid of all of the PMs is not what I want to be doing.
Why would you download the database to delete the messages?? Take note of @tomic and Jeepaholic's post about how you could do this in code.
You say you want us to answer your question - code examples have been referred to - in the PM Pager. If you don't want to use the mod, then don't, but any help we give you will refer to code that is very similar to that in the mod.
The only other way you can keep track of your mmessages would be to use flat file storage (FSO), sessions, cookies or perhaps even the querystring, but all of these would generaly be MORE CPU or memory intensive than a database, and harder to code for.
Andrew
====================================================== There have been many, many forum posts made throughout the world... This was one of them! |
|
|
Bunce
New Member
Australia
84 Posts |
Posted - 25 April 2002 : 20:53:12
|
(Oops, Double Post)
Edited by - Bunce on 26 April 2002 00:23:56 |
|
|
bjlt
Senior Member
1144 Posts |
Posted - 26 April 2002 : 01:09:09
|
you can use the pm pager and then a link to a chatroom or irc channel for the users. I also have a user/buddy watch mod developed and integrated with the pm pager. check it here:
http://beijinglife.com
test test
Edited by - bjlt on 26 April 2002 01:15:55 |
|
|
|
Topic |
|