I plan to provide additional functions for a closed-source 3rd party point of sales application. That application is used in restaurants, is run on Windows and uses dbase style databases. I know the details about the database structure (hey, it's DBase, so no big deal ;-)) and am able to read and correlate tables.
The application is run behind a firewall neither I nor most of the clients can influence, so opening incoming ports on the firewall is not possible.
The additional functions I provide shall be either used in an externally hosted web application or an App on a smartphone (iOS or Android does not matter here, I will most likely use Apache Cordova for this)
My problems is getting the data out. In my current design / architecture I plan to use MQTT to publish data from the customers site to a server located on the Internet where it can be retrieved by the App / application. Unfortunately I have no experience with MQTT and do not know if it would be better to take a different approach / alternative and only use MQTT for publishing data and add an additional REST layer for the application / App.
Here is my criteria for making MQTT the "right decision"
- support authentication for publishing and retrieving data (no one shall be able to forge data or retrieve data for a site he or she is not entitled to see)
- use as little bandwidth as possible (both my server and the dataplan for the smartphone running the App have a limit and I or the user will be charged for bandwidth used beyond that limit)
- be a good fit for various and complex JSON structures (from the picture you can see which kind of information I want to transport, they can be several kilobyte in size)
- allow signalling of updates from site to user
- allow listing (a user should be able to use REST in order to retrieve a list of sites he is entitled too) and filtering (when for example getting details about a clerk the user should be able to set a filter to the name of the clerk)
My biggest question is if MQTT will be usable from the web application / App in an "elegant" way. I could relatively easily add my own REST layer "on the right side of the picture" but I do not want to overcomplicate my design