Description

Learn how the Store and Forward system works in Ignition with your database for data protection and efficient storage.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] When Ignition attempts to run a query, that wouldn't modify a database table in some way, the query will first enter the store and forward system. This allows Ignition to keep track of what records were entered successfully into the database. Once in the system, the record remains until we receive confirmation from the database that the query has been executed successfully. We'll start off in the status section of my gateway here. Just scroll down, show you that I am under connections, and store and forward. And you can see I have several store and forward engines here. When creating a database connection in Ignition, we automatically create one of these store and forward engines for the connection to use. Earlier, I created 10 tags that are recording to a MySQL database connection at a quarter second rate. So let's take a closer look at the store and forward engine to see how it's behaving. I'm going to click on the details button here. There are two areas the engines keep records. The memory buffer and the disk buffer. You can see that my memory buffer here is able to keep up with demand, so as the historical records are being collected, they're entering the system and very quickly being shipped off to the database.

[01:06] Now let's simulate a loss of connection. I'm going to shut down my database. Since Ignition can no longer communicate with the database, it will hold onto the records. You can see here that records are being moved over to the disc buffer. While I'm waiting for the disc buffer to grow a bit more, I wanted to mention that store and forward system uses a first in, first out method. So even when a connection is down like this, it will maintain the order the queries were submitted. This means if a process requires some queries run before others, the system will respect that. Now that we have some records in our disc buffer here, I'm going to start my database back up. I've started the database, but the store and forward system will still collect records until the database is fully up and running again. While we're waiting for that, another benefit of the system is that Ignition can optimize the queries before sending them to the database. This results in a smaller impact on network bandwidth as opposed to directly writing to the database.

[02:05] Now Ignition has detected that the database is back up, so it will start taking records from the disk buffer and send them off to the database. And just like that, our disk buffer is empty. All my records have been safely inserted into my database.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.