473,382 Members | 1,353 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,382 software developers and data experts.

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 1286
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***********************@news.xs4all.nl>,
Martin P. Hellwig <mh******@xs4all.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***********************@news.xs4all.nl>,
Martin P. Hellwig <mh******@xs4all.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.news.blueyonder.co.uk> ,
John Pote <jo******@blueyonder.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
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...
2
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...
34
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,...
4
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...
7
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...
6
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
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...
4
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...
4
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.