E
E
Evgeny Elchev2015-08-10 11:52:55
Delphi
Evgeny Elchev, 2015-08-10 11:52:55

Problems with continuous reading of a file from a network folder?

Hello. I don't even know where to put this question. We have a program in our organization that uses files exclusively as a repository of information. It has a server part that maintains a database every second (actually writes information to files) and client applications that read these files. They get access to them through network folders, that is, the user connects a network drive, the program opens the database files on this drive for reading at startup, and during operation it simply reads new lines from the files (the files open once when the program starts and, accordingly, are closed when its closure) We will miss how good or bad this architecture is.
The essence of the problem is that in our organization computers began to appear where this system fails. Let me explain. The network drive is available and through the explorer all files are available and open. When the program starts, it opens files without any problems and receives information, but then something strange happens, it does not see that the file is being appended, and accordingly does not update the information.
The program is written in Delphi and uses the system functions of Windows API ReadFile from Kernel32.dll.
A bit of information on problematic computers:
1) We have more than 5 thousand PCs scattered throughout the country in our organization, and errors occur, well, maybe by 3-5%.
2) The computers themselves have nothing in common, they are different hardware, different OS builds.
3) We have a batch of 50 monoblocks in one wing for 49 everything works, but not for 50, although one is the same, and even the OS on them is oem (logically it should be the same).
We tried to communicate with the developers, they claim that the problem is not in the software, but in the system, but we have already broken our heads trying to understand where in the system such strange behavior is formed.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
TyzhSysAdmin, 2015-08-10
@POS_troi

How good or bad this architecture is will be missed.

There is no need to miss this.
Such quirks work with a bang while we have a small number of clients, with their growth we begin to run into all sorts of restrictions, both software and physical.
My opinion is that the problem is in the software, according to the description of the work of this software, I see solutions "at random" and scalability is clearly not included. And in general, using a network ball for non-stop data exchange is a perversion.
Offer the developers to still do their job (if the software is custom-made) and rewrite your lasoped to work with the database.
In general, the software was clearly made on the basis of "solving the problem here and now" and did not think about tomorrow.

A
Ai Lab, 2015-08-10
@vpuhoff

I also tried to work with a subscription to these functions, it works through w. The problem is in the server, which, as I understand it, "does not send a notification to clients" and, accordingly, they do not see that the update has occurred. Sometimes reinstalling the axis on the server helps, but temporarily, then it still stops working.

D
DastiX, 2015-08-10
@DastiX

I won’t repeat about the software, since everything is accurately and correctly written, but in any case the problem needs to be solved, and here I can advise you to make a terminal server with a connection to this ball, and distribute rdp shortcuts to clients. You can completely remote, you can through RemoteApp.
In this configuration, there will be only one network failure point.

A
Alexey T, 2015-08-20
@Alexeyslav

This problem seems to be in network communication. Packets are lost on the network along the way and the connection hangs until you distort it - on the server, the connection falls off by timeout, and the client is not aware of these events.
As a temporary solution - reopen the file if there were no updates last minute.
But apparently, the problem can be solved more simply by writing your own server for this case, which will simply send out changes to the file to all connected clients. Apparently, the changes to the code need to be minimal - instead of the file open function, substitute the socket open function, and replace the reading with reading from the socket.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question