
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It's going to be 2840 in beta tomorrow:
Very happy, thank you
Beta 2840 is available, please try it.
It's going to be 2840 in beta tomorrow:
example:
We will include new json type in the database creation wizard later.
Who has figured it out, please show the implementation of such a task.
Within the framework of this task, do I understand correctly that in both cases (when reading the base on Terminal2 and writing to the base in Terminal1) it should be blocked through the transaction mechanism?
What is the cheapest way to determine that the database has been updated?
Fundamentally wrong. You are describing a distributed client-server application, with a scheme of 1 writer, n readers. When designing such systems (and any distributed systems in general) you should try to avoid any locks by using lock-free ways of data organisation and access to them. If the technology used does not allow you to do without locking, then perhaps it is not the best solution for your task at all. However, for other tasks the technology may be great.
In your case it is better to deploy a full-fledged server (you can do it on the same machine as the client) and write quotes to the message queue, look at Kafka, for example. The client will read these quotes from the required index. This is a lock-free data access scheme.
So it turns out that data exchange has fewer possibilities than via files?
Categorically no. Sharing via files is not atomic at all, so it requires locks on both the reader and writer side. This is the surest way to get a deadlock and get lost in catching hard-to-find and incomprehensible errors.
Fundamentally wrong. You are describing a distributed client-server application with a scheme of 1 writer, n readers. When designing such systems (and any distributed systems in general) you should try to avoid any locks, using lock-free ways of data organisation and access to them. If the technology used does not allow you to do without locking, then perhaps it is not the best solution for your task at all. However, for other tasks the technology may be great.
In your case it is better to deploy a full-fledged server (you can do it on the same machine as the client) and write quotes to the message queue, look at Kafka, for example. The client will read these quotes from the required index. This is a lock-free data access scheme.
Categorically no. Sharing via files is not atomic in any way, so it requires locks on both the reader and writer side. This is the surest way to get a deadlock and get lost in catching hard-to-see and incomprehensible errors.
Thanks for such a detailed response! Unfortunately, I completely forgot what problem I was solving at the time. That's why I can't share my thoughts on the topic.
Beta 2840 is available, please try it.
Questions on this solution
- Are there any issues with multiple EAs use the same sqlite database concurrently?
- If MT5 crashes, can some data be lost? How often does it write data to disk?
Good afternoon, dear developers!
The function "DatabaseExport" does not want to work in any way...it gives error 5601 (query execution error, but I do not execute the query) when I specify the table name in the parameters,
and when I specify SQL query, it gives error 4022 (cancellation of program execution), probably error inside MQL function, part of the code from my library: