1

Topic: Transmission of tasks between processes

There are some processes which perform any operation. They thus fulfill it sequentially, i.e. one process fulfilled - transfers any to another, but that can be now occupied or is not launched absolutely not. In this connection it would be desirable to organize somehow queue, but a simple file a-lja xml does not approach, since it is required:
a) the Synchronous access: while one process writes there the job of the second to this moment can try to delete the existing;
Since records will be often deleted, it is required that the file size did not increase because of "garbage".
Any DB arises, of course, but for the sake of basis on 3-4 labels with pair tens records to lift the DB server not especially it would be desirable. Here on mind comes any FB Embedded but how at it with business point are?
And generally, it can be solved somehow more gracefully, I am simple not in course?.

2

Re: Transmission of tasks between processes

alekcvp wrote:

In this connection it would be desirable to organize somehow queue, but a simple file a-lja xml not
Approaches, since it is required:
a) the Synchronous access: while one process writes there the job of the second to this moment can
To try to delete the existing;
Since records will be often deleted, it is required that the file size did not increase
Because of "garbage".

Basically it is all dares one , but I would make so:
1) Each job - a separate file.
2) Queue - the separate directory.
Process reads the jobs from the directory-turn and fulfills them. Fulfilled - supposed
The result in the output directory, deleted the job from the input.
Naturally, file record in the output directory should be . The most simple method -
To write to a temporary file, in the end of it to rename.

3

Re: Transmission of tasks between processes

alekcvp wrote:

) Since records will be often deleted, it is required that the file size did not increase because of "garbage".
... skipped...
On mind comes any FB Embedded but how at it with business point are?

As well as in all DB. The data is written on pages which are accessible in a DB. I.e. wrote down the data, deleted - DB pages would be marked as not used - the new data will be written down there (on not used pages). If not used pages are not present - pages will be added in a DB.

4

Re: Transmission of tasks between processes

https://msdn.microsoft.com/ru-ru/librar … p/ms711472 (v=vs.85).aspx
?
Or

5

Re: Transmission of tasks between processes

Dimitry Sibiryakov;
Folders, most it is necessary to write files, synchronization...

DarkMaster wrote:

the Data is written on pages which are accessible in a DB. I.e. wrote down the data, deleted - DB pages would be marked as not used - the new data will be written down there (on not used pages). If not used pages are not present - pages will be added in a DB.

Well that is, in the theory, it  on any average size. It Seems. Only, probably, sqlite approaches more.
schi;
I will look, thanks.

6

Re: Transmission of tasks between processes

alekcvp wrote:

Folders, most it is necessary to write files, synchronization...

Folders and files are reliable. Synchronization is not necessary.
But if you the fan of fashionable technologies - ZeroMQ, for example, to you in hands.

7

Re: Transmission of tasks between processes

Dimitry Sibiryakov wrote:

Folders and files are reliable. Synchronization is not necessary.

It if they are stored on the local computer. And if it is the different programs executable on different computers and communicate through files with reliability variants are possible.
Example: firebird (old, 2.0). I allow to it a command to make  databases on the server (through components IBX), it fulfills this command successfully, and the file is not present, function FileExists starts it to find out only later 5 seconds after . Here such glitches appeared after Windows 8. That is interesting, such glitch only if a break between  and the size of an initial database about 17 MB is shown more than 30 seconds. But I think that is immediate to firebird these are relations has no.

8

Re: Transmission of tasks between processes

DmSer wrote:

Here such glitches appeared after Windows 8

Such glitches always were. For example, year in 2002 me had to solve a similar problem antivirus switch-off.

9

Re: Transmission of tasks between processes

DmSer wrote:

I think that is immediate to firebird these are relations has no.

It you in vain think.

10

Re: Transmission of tasks between processes

In the same circuit I came to a variant from #2. Most simple and reliable. Certainly, both programs by one machine.

11

Re: Transmission of tasks between processes

alekcvp wrote:

but for the sake of basis on 3-4 labels with pair tens records

Old kind DBF-files?

Dimitry Sibiryakov wrote:

1) Each job - a separate file.

In this case - subdirectory in the directory-turn

12

Re: Transmission of tasks between processes

Arioch wrote:

old kind DBF-files?

1. And they are able in the multiuser from different applications?
2. In what advantage before sqlite?

13

Re: Transmission of tasks between processes

Fresh TSharingContract does not approach?

14

Re: Transmission of tasks between processes

X-Cite wrote:

Fresh TSharingContract does not approach?

Win10 only.
But generally I while on sqlite stopped, as implementation reaches there I will look at nuances.

15

Re: Transmission of tasks between processes

alekcvp wrote:

it is passed...
1. And they are able in the multiuser from different applications?
2. In what advantage before sqlite?

1. Under BDE are able, under TDbf and vkDBF hardly. But what for it is necessary, at synchronization by "renaming of files"? A counter question, and how at SQLite with "the multiuser from different applications"?
2. More widespread format - more than indirect browsers, for example (present a situation that queue of conducts strange, not as it is expected; how  without  and  will carry out primary diagnostics?). More primitive format - is less than overhead charge on chtenie/zapis (well here  to you for the one-time buffer - check foreign keys and other constraints? Or ACIDness?). At last, more or less standard format - will not be basically possible overlays of type "at two programs different versions SQLite".
In general, it is alternative more likely for

alekcvp wrote:

a simple file a-lja xml

16

Re: Transmission of tasks between processes

IMHO "joint simultaneous operation over one document in one " is not called as "queue" and "transmission"

alekcvp wrote:

one process fulfilled - transfers any to another

alekcvp wrote:

In this connection it would be desirable to organize somehow queue

But if it is necessary  to make the general environment - that why not to use the high-grade and separate server of a DB, the same Firebird or MS SQL Express? What for then embedded?
you can receive events Firebird'a when the server can signal itself to applications "new event for 3rd step of queue". I do not remember, whether work Windows Change Notificaiotns at renaming of folders in  folders.
In general, proceeding from your unknown to us of the task - or at you queue, or "shared data", IMHO.