Cloud and local application sync ideas

71 views Asked by At

I've a situation where my central MySQL db and file system (S3) runs on a EC2.

But one of my application runs locally at my client site on a PI-3 device, which needs to look up data and files from both the DB and file system on cloud. The application generates transactional records in turn and need to upload the DB and FS (may be at day end).

The irony is that sometimes the cloud may not be available due to connectivity issues (being in a remote area).

What could be the best strategies to accommodate this kind of a scenario?

Can AWS Greengrass help in here?

  1. How to keep the Lookup data (DB and FS)in sync with the local devices?
  2. How to update/sync the transactional data generated by the local devices?

And finally, what could be the risks in such a deployment model?

Appreciate some help/suggestions.

1

There are 1 answers

1
ztong On BEST ANSWER
  1. How to keep the Lookup data (DB and FS)in sync with the local devices?

You can have a Greengrass Group and includes all of the devices in the that group. Make the devices subscribe to a topic e.g. DB/Cloud/update. Once device received the message on that topic, trigger a on-demand lambda to download the latest information from the Cloud. To make sure the device do not miss any update when offline, you can use persistent session, it will make sure device will receive all the missing message when it is back online.

  1. How to update/sync the transactional data generated by the local devices? You may try with the Stream Manager. https://docs.aws.amazon.com/greengrass/latest/developerguide/stream-manager.html Right now, it is allowed you to add a local use lambda to pre-process the data and sync it up with the cloud