By Simon Fischer - DynamicsCon

Transcription

by Simon Fischer

Theory (approx. 10 minutes) General overview of File handling and its evolution Limitations and challenges in SaaS-scenarios Short introduction into Azure Storage Accounts Practice (Sample Scenario, Demos; approx. 20 minutes) Possible solution for File handling in SaaS-scenarios Sample Scenario, Demos and introduction into new app

DatabaseClientReads/writes Files directly

In 2-Tier architecture file access wasrather simple Straight-forward commands via client(simplified examples) File needed to be accessible from theuser client In this simple form usable until NAV2009

DatabaseService tierClientReads/writes FilesUp-/downloads files

In 3-Tier architecture things became abit more complex Dependent on which tier accessed thefile, it needed to be available either onthe server or the user client File might need to be uploaded /downloaded before / after processing From NAV 2009 onwards(simplified examples)

SaaS-Tenant?Client

There is no (accessible) file system in the cloud Depending on function, users can upload or download files viabrowser Some questions arise for automatic/background processes: How should automatic/background processes handle files? How to make files periodically available to external programs? How to import files from external programs? Different approaches are possible

In some scenarios it might make sense to publish a customAPI/web service to receive data/make data available Not all (legacy) systems can work with such APIs Some approaches that were possible on-prem are notpossible on SaaS anymore (e.g., using 3rd party libraries foraccess to SFTP servers)

Azure Storage Accounts can be used for different kinds of dataobjects BlobsFilesQueuesTables Storage accounts are easily setup and accessible from anywhere provide a comprehensive API have no upfront cost and low prices for small capacities (e.g., 50 GB canbe less than 2 USD/month)

3rd PartyStorage AccountSaaS-Tenant

One approach could be to only interact with StorageAccounts as the single (file) source from Business Central Other systems can provide or receive files via StorageAccounts Systems not capable of this can be integrated in otherways, e.g., with Azure Functions

Scenario: Integration of an SFTP-based file exchange You need to: Periodically upload data to a 3rd party SFTP server Periodically download data from a 3rd party SFTP server Problem: A direct upload or download is not possible, because Business Centraldoes not provide functionality to connect to a SFTP server

Demo uses the (open source) app “Azure BlobStorage API” The handling of the Storage Account is done withonly a couple of lines of code Provides (almost) complete Blob service APIfunctionality(simplified examples)

API offers much more possibilities than simpleuploading/downloading Blob handling alone is covered with 46 API-operations 45 of these operation are (currently) covered with this App available on -Storage-API

Automatic Export from Payment Journal toStorage Account

Automatic Bank Account Reconciliation importingBank Statements from Storage Account

Lock a Storage Container for other userswhile processing

Documentation: rvices/blob-service-rest-api GitHub: -API (Contributions are welcome ) Demos, etc.: https://dev.azure.com/DynamicsCon21AzBlobStorage

Documentation:If you prefer links as QR code GitHub:Demos, etc.:

Want to connect and discuss about this and other topics?Join me on:TwitterLinkedinXingMy Blog

by Simon Fischer Theory (approx . Short introduction into Azure Storage Accounts Practice (Sample Scenario, Demos; approx. 20 minutes) Possible solution for File handling in SaaS-scenarios Sample Scenario, Demos and introduction into new app. Database Client Reads/writes Files directly In 2-Tier architecture file access was rather simple Straight-forward commands via .