473,624 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hi reliability files, writing,reading ,maintaining

Hello, help/advice appreciated.

Background:
I am writing some web scripts in python to receive small amounts of data
from remote sensors and store the data in a file. 50 to 100 bytes every 5 or
10 minutes. A new file for each day is anticipated. Of considerable
importance is the long term availability of this data and it's gathering and
storage without gaps.

As the remote sensors have little on board storage it is important that a
web server is available to receive the data. To that end two separately
located servers will be running at all times and updating each other as new
data arrives.

I also assume each server will maintain two copies of the current data file,
only one of which would be open at any one time, and some means of
indicating if a file write has failed and which file contains valid data.
The latter is not so important as the data itself will indicate both its
completeness (missing samples) and its newness because of a time stamp with
each sample.
I would wish to secure this data gathering against crashes of the OS,
hardware failures and power outages.

So my request:
1. Are there any python modules 'out there' that might help in securely
writing such files.
2. Can anyone suggest a book or two on this kind of file management. (These
kind of problems must have been solved in the financial world many times).

Many thanks,

John Pote


Feb 9 '06 #1
4 1302
John Pote wrote:
<cut>
So my request:
1. Are there any python modules 'out there' that might help in securely
writing such files.
2. Can anyone suggest a book or two on this kind of file management. (These
kind of problems must have been solved in the financial world many times).

<cut>
I can't answer your specific questions but I got the feeling that you're
barking at the wrong tree ;-)

You don't want to solve this in you application, file management is what
the OS and hardware is about. "Military" grade solutions are often
(depending on their criticalness) double or triple hot spares in the
same room which can be seen as a "unit" and these units are duplicated
on remote locations (at least 25km of each other) syncing their data
with standard tools like rsync.

If you don't have military budget, I would suggest to do it a little
less expensive, like having a couple of Solaris machines (three or four
will do it) in the same room, using a part of their diskspace for ZFS.

Then let your application write your data to that ZFS partition and if
you are particular paranoid you can build in a checksum that can be
calculated by other machines without the need for the original received
data (ZFS has a built-in mechanism for that so you might just want to
call that).

There is nothing wrong for assuming a certain level of hardware, well at
least not if its very clearly communicated to all parties.
ZFS is open source (by SUN) but currently only implemented in Solaris,
which you also can (commercially) use without charge.

Now you only got to figure out how to implement a heartbeat mechanism
between you fail-over applications :-)

--
mph
Feb 9 '06 #2
In article <43************ ***********@new s.xs4all.nl>,
Martin P. Hellwig <mh******@xs4al l.nl> wrote:
John Pote wrote:
<cut>
So my request:
1. Are there any python modules 'out there' that might help in securely
writing such files.
2. Can anyone suggest a book or two on this kind of file management. (These
kind of problems must have been solved in the financial world many times).

<cut>
I can't answer your specific questions but I got the feeling that you're
barking at the wrong tree ;-)

You don't want to solve this in you application, file management is what
the OS and hardware is about. "Military" grade solutions are often
(depending on their criticalness) double or triple hot spares in the
same room which can be seen as a "unit" and these units are duplicated
on remote locations (at least 25km of each other) syncing their data
with standard tools like rsync.

If you don't have military budget, I would suggest to do it a little
less expensive, like having a couple of Solaris machines (three or four
will do it) in the same room, using a part of their diskspace for ZFS.

Then let your application write your data to that ZFS partition and if
you are particular paranoid you can build in a checksum that can be
calculated by other machines without the need for the original received
data (ZFS has a built-in mechanism for that so you might just want to
call that).

There is nothing wrong for assuming a certain level of hardware, well at
least not if its very clearly communicated to all parties.
ZFS is open source (by SUN) but currently only implemented in Solaris,
which you also can (commercially) use without charge.

Now you only got to figure out how to implement a heartbeat mechanism
between you fail-over applications :-)

Feb 9 '06 #3
Thanks for all the replies,
<cut from Cameron Laird>
Also, the whole idea of basing reliability on HTTP uploads of 50 bytes
at a time sounds to me a bit ... strained. There *must* be simpler
ways--and simpler goes a long way in the direction of trustworthy.

The motivation to look at http: is the widespread avaiability of internet
connections and standard servers able to run CGI scripts. In particular the
availability of low cost GPRS modems (solar panel and/or wind gen) is very
attractive for remote locations where there is no power, telephone line or
cable company.

However, I take your point about HTTP uploads of 50 or so bytes is a little
overhead heavy. Recently I've come to know of reasonably priced fully
managed dedicated servers in secure buildings. So I am now thinking of a
direct TCP/IP port connection. I know Python can do this as I found the
appropriate standard modules and set up a simple proving system on my
private network (one port listener, one sender - no problem!). Are there
security issues in this approach?

I realise http: reliability is not a great as it might be but we have a
reasonable amount of time for re-tries (an hour or two) if some packets get
lost. My recent experience of telneting to our server in London (I'm in the
midlands) is quite revealing. Round trip time is generally sub .5 sec. Makes
me think all that waiting for web pages is the server rather than the
internet itself.

Any thoughts on *simpler* ways to achieve my goal of remote data to web
servers greatly appriciated.

It would still be useful to have anyones thoughts on securely writing the
data to disk files. The off the shelf "military" approach suggested by
Martin Hellwig is outside our budget.

Thanks again.

John

"Cameron Laird" <cl****@lairds. us> wrote in message
news:kt******** ****@lairds.us. .. In article <43************ ***********@new s.xs4all.nl>,
Martin P. Hellwig <mh******@xs4al l.nl> wrote:
John Pote wrote:
<cut>
So my request:
1. Are there any python modules 'out there' that might help in securely
writing such files.
2. Can anyone suggest a book or two on this kind of file management.
(These
kind of problems must have been solved in the financial world many
times).

<cut>
I can't answer your specific questions but I got the feeling that you're
barking at the wrong tree ;-)

You don't want to solve this in you application, file management is what
the OS and hardware is about. "Military" grade solutions are often
(depending on their criticalness) double or triple hot spares in the
same room which can be seen as a "unit" and these units are duplicated
on remote locations (at least 25km of each other) syncing their data
with standard tools like rsync.

If you don't have military budget, I would suggest to do it a little
less expensive, like having a couple of Solaris machines (three or four
will do it) in the same room, using a part of their diskspace for ZFS.

Then let your application write your data to that ZFS partition and if
you are particular paranoid you can build in a checksum that can be
calculated by other machines without the need for the original received
data (ZFS has a built-in mechanism for that so you might just want to
call that).

There is nothing wrong for assuming a certain level of hardware, well at
least not if its very clearly communicated to all parties.
ZFS is open source (by SUN) but currently only implemented in Solaris,
which you also can (commercially) use without charge.

Now you only got to figure out how to implement a heartbeat mechanism
between you fail-over applications :-)

.
.
.
Also, the whole idea of basing reliability on HTTP uploads of 50 bytes
at a time sounds to me a bit ... strained. There *must* be simpler
ways--and simpler goes a long way in the direction of trustworthy.

Feb 9 '06 #4
In article <1u************ ********@fe2.ne ws.blueyonder.c o.uk>,
John Pote <jo******@bluey onder.co.uk> wrote:
Feb 10 '06 #5

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

Similar topics

77
5665
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a database from SQL Server to Oracle or DB2 or vice versa... and that's it.... And a lot of these enterprises don't need it as they already know what database they are going to use and they don't plan on switching in and out database in the first...
2
436
by: Tim Blizard | last post by:
I know this topic has been discussed before but I couldn't find any thread more recent than about 18 months and was interested in what conclusions people had come to recently. Invariably 3 advantages of XML config files are promoted; 1. The .NET framework provides built-in support for reading application configuration data from .config files very easily 2. Using these files makes it possible to deploy an application using
34
6403
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple, probably a few hundred lines of code in Python. There is a need to interact with network using the socket module, and then probably a need to do something hardware- related which will get its own driver written in C.
4
3683
by: knapak | last post by:
Hello I'm a self instructed amateur attempting to read a huge file from disk... so bear with me please... I just learned that reading a file in binary is faster than text. So I wrote the following code that compiles OK. It runs and shows the requested output. However, after execution, it pops one of those windows to send error reports online to the porgram creator. I have managed to find where the error is but can't see what's wrong....
7
1518
by: John Pote | last post by:
Hello, help/advice appreciated. Background: I am writing some web scripts in python to receive small amounts of data from remote sensors and store the data in a file. 50 to 100 bytes every 5 or 10 minutes. A new file for each day is anticipated. Of considerable importance is the long term availability of this data and it's gathering and storage without gaps. As the remote sensors have little on board storage it is important that a
6
5259
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
41
2091
by: Carl J. Van Arsdall | last post by:
Hey everyone, I have a question about python threads. Before anyone goes further, this is not a debate about threads vs. processes, just a question. With that, are python threads reliable? Or rather, are they safe? I've had some strange errors in the past, I use threading.lock for my critical sections, but I wonder if that is really good enough. Does anyone have any conclusive evidence that python threads/locks are safe or unsafe?
4
2252
by: tdahsu | last post by:
All, I'd appreciate any help. I've got a list of files in a directory, and I'd like to iterate through that list and process each one. Rather than do that serially, I was thinking I should start five threads and process five files at a time. Is this a good idea? I picked the number five at random... I was thinking that I might check the number of processors and start a multiple of that, but then I remembered KISS and it seemed that...
4
1504
by: daveh551 | last post by:
I have done a Google search on this, and the hits seem to indicate that there's probably not a computationally easy way to do it, but I'll ask anyway before I go off and re-invent the wheel. I have user control do display a specified image file (.jpg) from a database. Files may have arbitrary height, width, and aspect ratios. I have height and width properties on the control to fit the image display into the appropriate space on the...
0
8174
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
8680
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
8624
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
8336
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
7164
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
6111
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
5565
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
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.