473,699 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

real time sql query

Hi,
I am making a web-based chat but to get the msg from the database i
need to refresh the page and that will make load and extra bandwidth
on the server so i want to make the query in real time ( only the new
msg to be received without refresh the whole page ), Any one in here
knows how to get data from sql database without having to refresh
page?
thanks all for your time

Aug 24 '07 #1
3 2889
flashvarss wrote:
Any one in here knows how to get data from sql database without having
to refresh page?
Other than periodically refreshing the page, you have two options:

1. Using AJAX to continuously poll the server;
2. The "multipart/x-mixed-replace" MIME type;
3. Server-sent events <http://labs.opera.com/news/2006/09/01>.

A page refresh will offer the widest range of browser support. AJAX will
work in any reasonably modern browser with Javascript enabled. Multipart/
X-Mixed-Replace is an old Netscape 1.x push technology, which is still
supported in Gecko-based browsers, plus Opera and Safari, but not Internet
Explorer. Server-sent events, although the neatest solution are only
supported by one browser so far -- Opera 9.x -- expect wider browser
support in the future.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 65 days, 2:30.]

TrivialEncoder/0.2
http://tobyinkster.co.uk/blog/2007/0...ivial-encoder/
Aug 24 '07 #2
| AJAX and other html-based solutions are heavy, ugly and incompatible.
|
| Why don't you simply use flash?

because flash sux.

hmmm...ajax is 'heavy' and 'ugly'. care to quantify and qualify? oh, and
ajax says, 'whatever you say bounces of me and sticks to you'.
Aug 25 '07 #3
On Aug 25, 10:04 pm, "Steve" <no....@example .comwrote:
| AJAX and other html-based solutions are heavy, ugly and incompatible.
|
| Why don't you simply use flash?

because flash sux.

hmmm...ajax is 'heavy' and 'ugly'. care to quantify and qualify? oh, and
ajax says, 'whatever you say bounces of me and sticks to you'.
But i want something very fast, example of magma chat server ( you
cant find it now ), its a frame based chat that is very fast to load,
the body of it

body.html - this is the streaming chat frame where the chat will
pop up as people post it. This is done through the
use of a special HTTP header declaring it as a
chunked data transfer...i think (but dont know)

How is that can be done?

Aug 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1718
by: John R | last post by:
I found this old thread while looking for some type of compression solution myself. Long story short, I contacted Lester and ended up writing an LZO solution just as Mark had mentioned below. Thought this could also benifit someone out there so I'm reposting. Here's a link to the source code: http://www.servangle.net/udf_lzo/ BTW, Lester got his zlib implementation working as well. Hopefully these will both be posted on MySQL website...
4
2047
by: Aaron W. West | last post by:
Timings... sometimes there are almost too many ways to do the same thing. The only significant findings I see from all the below timings is: 1) Integer math is generally fastest, naturally. Bigint math isn't much slower, for integers that all fit within an integer. 2) Converting float to varchar is relatively slow, and should be avoided if possible. Converting from integer to varchar or varchar to int is several times faster.
1
2438
by: Evan Smith | last post by:
My database is suffering from poor performance of late. Reports that used to run in a reasonable time, now take a while. The explain output show that the query is fully indexed, and the statistics are up to date. Using a statement monitor I was able to determine that a particular query took 545 seconds of real time to run, yet only 19 seconds of CPU. According to my system monitoring tools, I had plenty of idle CPU cycles and free memory...
2
1221
by: Sosh123 | last post by:
Hi, I was wondering if there is a way with VS.NET and SQLsvr/MSDE to monitor query activity in real time whilst I am debugging an ASP.NET application. I want to see when queries are made to the SQL server, so that I can check the effectiveness of my fragment caching. Any info appreciated!
30
3299
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None, 'abc', '12345') # demonstrate map's None fill-in feature The motivation is to provide a means for looping over all data elements
11
12998
by: Mike9900 | last post by:
How can I get the real system date/time if the user fakes the date, for example by setting the system date back. -- Mike
5
1139
by: =?Utf-8?B?TWljaGFlbCBkZSBWZXJh?= | last post by:
To all, Not sure on how to approach this but what would be the best practice in showing status of a query that does an aggregation or count of some sort. if I were to have a sql statement that does select count(c1) from t1 how would I be able to show a green, yellow or red light type object that uses my query to determine a threshold. For example, if my count query went up to 85 then show red, between 75 to 85 show yellow, between 65...
6
3296
by: mattdaddym | last post by:
Hi all, I'm looking for a way to show my users the progress of their sql queries. I've implemented Microsoft Ajax in order to show a progress bar, but I would love to be able to show: number of rows loaded vs total rows I tried a few searches for this, but haven't come up with the right key words I guess. Right now I have zilch. So, it's easy enough to get
6
5405
by: Pete Kane | last post by:
Hi All, does anyone know a site that I can query share prices programmatically ( possibly passing in a stock symbol )?
0
9172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.