Solved

Database or File or Dbm

Posted on 1997-07-10
2
147 Views
Last Modified: 2013-12-25
I am a newbie to CGI progrmming etc. As part of a project I have to create an application to monitor certain server. The settings for the things to be monitored on each server is to be obtained using forms. Now there are at most going to be 10 servers being monitored at a time. I have the following questions:

1. Do I store the data for each server in a file or use a database?

eg for given machine named X there is a file X_config, or a table in a DB with the things to be monitored, obtained from the form, written into the file, DB. Everytime the config is changed( by a number of users) the file, DB has to be updated. The data for each machine is the written to a temp file, from which a crontab is created?

Which is better a file or a DB?

2. Because there is the possibility of a certain number of users being able to add servers to be monitored or modify certain settings for servers, if I were to use a DB do I need to makesure there is  a lock in place everytime someone modifies a server?
0
Comment
Question by:fitzroy8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 60 total points
ID: 1829020
The choice of file or DB is a complex one. If you are not going to complex relational queries and a relatively flat file structure will do (which I suspect is the case in your application) then you might choose to use a file based database written in perl.

Another factor is how familiar you are either with a DB or perl.

If you only have a couple of handfulls of servers then, as you say, you could have a single file for each server. You would parse the file with a simple perl program. The file might be something like:-

ServerName,Proteus
Organisation,Accounts
etc,etc

You could easily read this in with a perl program. Modifications would involve reading the file in, modifying the variables and writing it out again. If there is the possibility of conflict between users then the perl 'flock' command should be used.

If you use a DB solution then there are often either automatic locking methods or ones you can call.

0
 

Author Comment

by:fitzroy8
ID: 1829021
Thanks,

I think that I'll just start off with a simple file;


0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question