473,657 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's the best way to stream data to disk in enterprise application?

Hi All,

I'm writing an application that is accepting data from possibly 100's
of clients. The amount of data I get is around 3 or 4 KB per second
per client. The data that is streamed from the client can last
anywhere from a few seconds to maybe an hour.

My question is, with all this data coming in what is the best way to
write this information to disk. At the moment I am simply storing up
the data in a memory buffer and when the client disconnects I write
all the data to disk in one go. I am worried that writing it all in
one go might prove to be quite cpu intensive and also I am worried
that this won't scale because I am storing everything in memory until
the end of the session which means I could have alot of data in
memory.

I have thought about having smaller buffers which write the data out
when they get full, IE after every 1MB of data for example. Another
idea was to just stream the data out to disk as soon as it arrives.
Another idea I had was to add the session to a queue when it has
finished and have a low priority thread service this queue to write
the data to disk.

Any ideas would be appreciated and maybe some idea on the nest way to
code the idea would be good also.

Many thanks
Nov 17 '05 #1
0 1041

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

Similar topics

0
2378
by: Peter Hitchmough | last post by:
What is the *truth* when it comes to configuring Oracle files on an Enterprise Virtual Array like an HP EVA3000 or EVA5000 or an EMC Symmetrix frame. As I Understand It - A Virtual Array is a storage appliance with a large number of disks (say over 50), dual-path controller access and, significantly, a very large disk cache. The cache is supported by front-end and back-end (disk-side) processors and a range of algorithms that aim to...
6
3697
by: Ian Robertson | last post by:
I am trying to write a function that takes a reference to an object as its arguement. The object is created in another function and I am trying to pass the object to another function from within the function that created the object. I have cut out some code as I dont think showing a for loop is helpful. void TMP3_Main_Form::LoadMP3() { TMemoryStream *MP3Stream = new TMemoryStream();...
26
4460
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using System.EnterpriseServices;
16
9095
by: Ali | last post by:
Hi I want to write (or read) to a stream, but the data is not byte array I converted the data to byte array manually, but it is very slow, (becuse the data is very large) Is another way for this kind of writing and reading best regard Ali.
6
12232
by: genc ymeri | last post by:
Hi, We are struggeling to upload a file through a C# webClient into JBoss web server. Meanwhile we are able to upload a file from the webserver itself. The problem is only with C# webClient . The code is pretty simple. string uriString = saveTargetToAddress.Text; string postData = textOutput.Text; try
8
15593
by: TJ | last post by:
I need to be able to pass a pointer to a (managed code) Stream object to a COM method so it can serialize its data into the stream. I have a C# application that makes uses of Randolf Duke's MimeSniffer COM component (http://www.codeproject.com/internet/mimesniffer.asp). My application (pop3ImageGrabber) uses MimeSniffer to identify each image attachment in emails that have been collected from a POP3 mailbox. MimeSniffer gives the...
8
2941
by: Eric Anderson | last post by:
I have some files that sit on a FTP server. These files contain data stored in a tab-separated format. I need to download these files and insert/update them in a MySQL database. My current basic strategy is to do the following: 1) Login to the ftp server using the FTP library in PHP 2) Create a variable that acts like a file handle using Stream_Var in PEAR. 3) Use ftp_fget() to read a remote file into this variable (this is so I don't...
13
3101
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those sorts of clients. Mine are all small businesses whose sites will never reach those sorts of scales. I deal with businesses whose sites get maybe a few hundred visitors per day (some not even that much) and get no more than ten orders per day....
17
2294
by: Luc Mercier | last post by:
Hi Folks, I'm new here, and I need some advice for what tool to use. I'm using XML for benchmarking purposes. I'm writing some scientific programs which I want to analyze. My program generates large XML logs giving semi-structured information on the flow of the program. The XML tree looks like the method calls tree, but at a much higher level, and I add many values of some variables.
0
8312
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
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
8732
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
8504
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
8606
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
4159
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
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.