The challenge is not building the apps; it is . You cannot expose your on-premise HFSQL directly to the internet, and batch imports/exports are too slow for real-time inventory. 2. The Architecture: The "Reversé" Proxy Pattern Instead of the cloud pulling data from the premise (which requires opening firewall ports), we will use the premise pushing data to the cloud via secure REST APIs. We will also use HFSQL Native Replication for the read-only data.
[Your Name] Audience Level: Intermediate to Advanced Time to read: 10 minutes 1. The Problem: The Two-Speed IT Department Many of our readers manage warehouses, logistics, or medical systems where the core business runs on a WinDev Desktop application linked to an HFSQL Server (on-premise). However, management now wants a mobile or web portal (built in WebDev) hosted in the cloud.
When a user validates an order, do not call the API directly (network failures would block the user). Write to a local Outbox table first.
This architecture respects the network boundaries: the cloud never touches your firewall, and the premise never blocks the user for network errors.
// Return success ResponseWriteStatus(201, "OK") ResponseWriteJSON("{""result"": ""accepted""}") END What about data created on the Mobile app? You need a "Pull" mechanism. Use WebDev Scheduler to trigger a download.
IF Request.StatusCode = 201 THEN Outbox_Table.STATUS = "SENT" HModify(Outbox_Table) ELSE // Retry later. Do NOT delete. Outbox_Table.RETRY_COUNT += 1 HModify(Outbox_Table) END END On the Cloud side (WebDev), you need a stateless REST API to accept these pushes.
// Download new cloud orders HTTPRequest("https://cloud.myapp.com/api/v1/pull?since=" + LastSyncDate) JsonArray = JSONParse(Request.Body) FOR EACH JsonElement OF JsonArray Local_CloudOrder.ID = JsonElement.ID IF HReadSeekFirst(Local_CloudOrder, ID, JsonElement.ID) = False THEN Local_CloudOrder = JsonElement HAdd(Local_CloudOrder) END END In hybrid sync, conflicts are inevitable. Do not use "Last write wins."