Network Location of a Database

Curious, I recently tried (again) to share a database folder on my private network, so that I could open it from AB installed on a separate machine. While I seemed to get the symbol list, the price data was not accessible.

With 10GBe Ethernet and higher Infiniband options, which can saturate a remote hard drive's bandwidth, any reason this shouldn't or can't work in the future? Or maybe a AB data broadcast or pass-through server feature (Node.js)? Would be kind of cool if a datafeed and database could be shared or at least read-only by other AB instances in a network fabric. Just thinking hehehehe.

-S

@Sean I do not understand what you mean.

On my Windows local network, set on purpose on busy wifi, I shared an AmiBroker database folder (giving to the user on the remote machine the appropriate rights to fully access it), and everything works perfectly using an instance of AmiBroker on that machine.

I can also open simultaneously the same database on the remote machine and on the pc sharing the folder: I do not experience any problem (even if think that this is something to entirely avoid for potential data conflicts/data loss when both the applications request to save any modified data... )

If you 'network' configuration does not allow this, probably it means that is not fully 'transparent', and I suppose that also other applications that rely on standard networks APIs to access files may fail (even if the fact that you can access the symbol list seems to indicate some other kind of problem.!)

Hi Beppe,

Ahhh...

So I was able to do it with a AB Locally defined DB. Even with only read permissions it works except for a warning when closing the remote AB instance.

That said, the issue I was having was with an AB MetaStock (plug-in) external DB on the host machine; with (BTW) the actual data being stored on a different drive letter on the host machine. Even if I shared the additional data folder location, it doesn't transfer the redirect as defined in the specific Database ms.config xml file.
-S

hi, I tried this with IQFeed. So I opened an IQFeed database on 1 machine. For convenience I opened this database in the Public folder:

C:\Users\Public\IQFeed5MinPublic

I shared this folder and gave it the "read" permission

Then on the other machine I go to "open database" and then go to that database location on the other machine. As a data source I chose "Local" and I "disable" local data storage.

Although the database is loaded it does not seem to work. Since these settings (Local and disable) are not saved.

Is this what I try to do possible and if so how? Thank you

It seems to me that multiple programs (on the same or on different machines) sharing the same database would be unreliable.

For example, if program A is receiving data, some of that data would be cached. The cached data would not be available to program B.

It may be possible to turn caching off. But my suspicion is this would put a heavy load on that computer's resources.

Am i missing something here?

yes that makes sense (about the cached data)

Also when I open that remote database it uses the settings of that database. So the remote database is not local but is using IQFeed. So if I open that remote database it will try to start IQFeed but it will not start it on the remote machine but the local machine.

I was just trying it because on my trading computer I used IB for the data but recently I am having problems for instance with the copper futures. They do not update the bid and ask price. I have been talking to IB about it but apparently they do not see this problem. With the IQFeed data the bid and ask are just fine. With IB I only have this problem if I add the HG future as a "ticker row". Then the bid and ask price are "stuck" and since I display them in the Amibroker chart they are stuck there as well. Same problem I had on and off with NG futures.

Perhaps you should distinguish the different types of cached data. Meaning if you run an analysis on data that is stored on the hard drive, it then gets cashed into cached memory. I think this would work for both the original local AB instance and the the AB instance that accesses the same hard drive stored data stored on a different computer across the network.

The other type of cached data is a real-time feed and historical back-filled data from a feed. That gets managed by the local AB instance (setup for it) and logged into it, and seamlessly stores new data into memory, then manages it's own disk saving processes. I imagine this type would be not network-able to a remote AB instance etc.

1 Like

Most of these guesses are incorrect. File placed on local network share works like any other file in Windows. AmiBroker database is just set of files see http://www.amibroker.com/gudie/h_workspace.html So AmiBroker is able to read and write the files (and database) regardless of where they are placed as long as they are accessible (read/write permissions). Shared local network file is just slower than file on physical device but other than speed difference, it works like any other file.
AmiBroker does NOT keep files open. It opens file briefly, reads entire content of file into RAM (cache) and closes the file. If it needs to save, it briefly opens the file for writing, writes entire content from RAM and closes the file. The "last writer" overwrites previous writes. AmiBroker writes to the database only if data are modified AND save is pressed OR in-memory cache needs to be flushed (when for example you have run out of defined in-memory cache size or program is exited). So when new RT data arrive they are NOT saved to disk immediately, everything is kept in RAM unless conditions mentioned earlier happen.

3 Likes

thanks for the replies