473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Real time

Hi all,

I'm trying to display a real-time data in one form or another (i.e.
animation/graphic file, or just a text) in asp.net.
The data for the images/text is retrieved from a SQL Server database.

I have a few plans in mind:
- I could have an aspx page that would use GDI+ classes to generate the
graphics and let the page refreshes the images at a regular interval. The
drawback is though, there may be a dozen of images in a single page, which
means that there would be a dozen or so postbacks at every iteration, hence,
demanding a lot of CPU time at the server as well as the client machine.
- I could have a single aspx page that would refresh at a regular interval.
Obviously I will have to have a pre-made images for each possible states.
- Another alternative is to use Flash as it could talk to SQL Server
directly using the Xml objects. Setting up flash movies in an aspx page is
quite tedious job though. While browsing through the net I found several
libaries that could actually let me generate SWF file in .NET, but most of
them are still in Alpha stages, so I'm not very comfortable of using them.

Can anyone please give me a suggestion on what the most efficient way of
doing this is? Maybe somebody has even done this before.

Many thanks
Ted
Nov 18 '05 #1
3 1744
Hi

Maybe I don't understand you but for images its not complex
getting only the image not the whole page....

function doIt(newSrc){
var img = new Image();
img.src = newSrc;
img.onload = doDisplay;
img.onerror = errHandler;
}

function doDisplay(){
document.images["imgName"].src = this.src; // imgName is the target img
}

function errHandler(){
// Handle error
}

Obliviously a very basic example...

Preloading images...
function preLoad(){
var a = new Array();
for( i = 0; i < preload.arguments.length; i++ )
{
a[ i ] = new Image();
a[ i ].src = "PATH/" + iPreload.arguments[i];
}
}

preLoad("img1.gif","img2.gif","img3.jpg");
For text you could use webservices or a hidden iframe to load the data
http://msdn.microsoft.com/downloads/...ce/default.asp
DHTML sdk
http://msdn.microsoft.com/library/de...ence_entry.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
"Ted Burhan" <tb*****@nospam.com.au> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
Hi all,

I'm trying to display a real-time data in one form or another (i.e.
animation/graphic file, or just a text) in asp.net.
The data for the images/text is retrieved from a SQL Server database.

I have a few plans in mind:
- I could have an aspx page that would use GDI+ classes to generate the
graphics and let the page refreshes the images at a regular interval. The
drawback is though, there may be a dozen of images in a single page, which
means that there would be a dozen or so postbacks at every iteration,
hence,
demanding a lot of CPU time at the server as well as the client machine.
- I could have a single aspx page that would refresh at a regular
interval.
Obviously I will have to have a pre-made images for each possible states.
- Another alternative is to use Flash as it could talk to SQL Server
directly using the Xml objects. Setting up flash movies in an aspx page is
quite tedious job though. While browsing through the net I found several
libaries that could actually let me generate SWF file in .NET, but most of
them are still in Alpha stages, so I'm not very comfortable of using them.

Can anyone please give me a suggestion on what the most efficient way of
doing this is? Maybe somebody has even done this before.

Many thanks
Ted

Nov 18 '05 #2
Hi Vidar,

Thank you for replying.
It might help if I explain briefly what I'm trying to achieve.
I have a Windows 2000 server connected to a mining device via some sort of
serial port communication.
The server listens to the port and decypher the incoming data stream from
that serial port and store them in
the appropriate places in the Database (SQL Server 2000). Data frame
generally comes in at around 100ms intervals.
One of the tables in the database is used to represent the current values of
the device attributes
I.e.
tblTagValues
==========
TagID int
Value real

The asp.net application is responsible for reading those "current" tag
values and display them in one form or another
(semaphores/flags, gauges, etc..). I understand that because of the nature
of web brower and internet latency, I may
not be able to achieve real-time presentation of the data, but we can
accomodate sub 5 seconds delay (near real time).
Can you suggest what the best method to achieve this is?

Ted
"Vidar Petursson" <th**************************@icysoft.com> wrote in
message news:ed*************@tk2msftngp13.phx.gbl...
Hi

Maybe I don't understand you but for images its not complex
getting only the image not the whole page....

function doIt(newSrc){
var img = new Image();
img.src = newSrc;
img.onload = doDisplay;
img.onerror = errHandler;
}

function doDisplay(){
document.images["imgName"].src = this.src; // imgName is the target img
}

function errHandler(){
// Handle error
}

Obliviously a very basic example...

Preloading images...
function preLoad(){
var a = new Array();
for( i = 0; i < preload.arguments.length; i++ )
{
a[ i ] = new Image();
a[ i ].src = "PATH/" + iPreload.arguments[i];
}
}

preLoad("img1.gif","img2.gif","img3.jpg");
For text you could use webservices or a hidden iframe to load the data
http://msdn.microsoft.com/downloads/...ce/default.asp DHTML sdk
http://msdn.microsoft.com/library/de...ence_entry.asp
--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
"Ted Burhan" <tb*****@nospam.com.au> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
Hi all,

I'm trying to display a real-time data in one form or another (i.e.
animation/graphic file, or just a text) in asp.net.
The data for the images/text is retrieved from a SQL Server database.

I have a few plans in mind:
- I could have an aspx page that would use GDI+ classes to generate the
graphics and let the page refreshes the images at a regular interval. The drawback is though, there may be a dozen of images in a single page, which means that there would be a dozen or so postbacks at every iteration,
hence,
demanding a lot of CPU time at the server as well as the client machine.
- I could have a single aspx page that would refresh at a regular
interval.
Obviously I will have to have a pre-made images for each possible states. - Another alternative is to use Flash as it could talk to SQL Server
directly using the Xml objects. Setting up flash movies in an aspx page is quite tedious job though. While browsing through the net I found several
libaries that could actually let me generate SWF file in .NET, but most of them are still in Alpha stages, so I'm not very comfortable of using them.
Can anyone please give me a suggestion on what the most efficient way of
doing this is? Maybe somebody has even done this before.

Many thanks
Ted


Nov 18 '05 #3
Last year we went with the SWF solution. The SWF posted an HTTP Request to
an ASPX page on the server which generated an image, based upon the
parameters sent by the SWF, stored it in a temp folder, and returned the URL
of the image file to the SWF, which then requested the image file. It was
not necessary to dynamically-create the SWF. We simply built a SWF that
behaved as I've described. The only thing dynamically-generated was the
image file.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Ted Burhan" <tb*****@nospam.com.au> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
Hi all,

I'm trying to display a real-time data in one form or another (i.e.
animation/graphic file, or just a text) in asp.net.
The data for the images/text is retrieved from a SQL Server database.

I have a few plans in mind:
- I could have an aspx page that would use GDI+ classes to generate the
graphics and let the page refreshes the images at a regular interval. The
drawback is though, there may be a dozen of images in a single page, which
means that there would be a dozen or so postbacks at every iteration, hence, demanding a lot of CPU time at the server as well as the client machine.
- I could have a single aspx page that would refresh at a regular interval. Obviously I will have to have a pre-made images for each possible states.
- Another alternative is to use Flash as it could talk to SQL Server
directly using the Xml objects. Setting up flash movies in an aspx page is
quite tedious job though. While browsing through the net I found several
libaries that could actually let me generate SWF file in .NET, but most of
them are still in Alpha stages, so I'm not very comfortable of using them.

Can anyone please give me a suggestion on what the most efficient way of
doing this is? Maybe somebody has even done this before.

Many thanks
Ted

Nov 18 '05 #4

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

Similar topics

18
by: Ken | last post by:
Hi. Can anyone refer me to any articles about the compatibility between c++ polymorphism and real-time programming? I'm currently on a real-time c++ project, and we're having a discussion...
0
by: Aashish | last post by:
Hi, I am currently working on building a real-time data mart. Am using DTS as the ETL tool and MS SQL 2000 as the database. The current infrastructure includes 2 4 Proc (1GHz) Xeon based servers,...
1
by: catherene | last post by:
hai, in IEEE software jan/feb 2003 an article was published regarding suitability of C# and .NET in real-time systems. can anybody is doing research on its analysis of schedulability. kindly...
175
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be...
10
by: Martin Hughes | last post by:
Hi guys, I was wondering if anyone could give me some advice. I am looking to develop an ASP.NET application that will enable several workstations to access real time telemetry data received...
0
by: Johannes Nix | last post by:
Hi, this might be of interest for people who are look for practical information on doing real-time signal processing, possibly using multiple CPUs, and wonder whether it's possible to use...
2
by: Blubaugh, David A. | last post by:
To All, I have done some additional research into the possibility of utilizing Python for hard real time development. I have seen on various websites where this has been discussed before on...
3
by: Kurt Mueller | last post by:
David, Am 07.10.2008 um 01:25 schrieb Blubaugh, David A.: As others mentioned before, python is not the right tool for "HARD REAL TIME". But: Maybe you can isolate the part of your...
4
by: The Doctor | last post by:
Hey people, I have two applications: the server, which creates a server socket, waits for a real-time signal, and if it receives one, it creates a client socket. The client, which will...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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,...

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.