Possible to load Pages and API source from Virtual Files?

I’m interested in being able to store Sharp Pages and Sharp API “files” in a remote source (database, S3, etc) instead of a physical file path on the executing server. When a path/page is requested, it would first check a cache and if not there, pull from the virtual file and then execute.

It seems that all the pieces are available in ServiceStack to pull this off but just not sure how to implement it.

Pretty sure this is exactly what the Pure Cloud Apps examples already does.

Checking the local cache wont let you detect changes in the remote storage, the checkForModifiedPagesAfterSecs appsetting specifies how long to wait (and use the local cache) before checking for file changes .

Thanks! I didn’t even see that. I will take a look over it to see if this is what we’re looking for.

Just FYI. The links there don’t seem to work:

https://github.com/sharp-apps/rockwind-aws/blob/master/app.settings
http://rockwind-aws.web-app.io/

Updated the links to app.settings, unlinked rockwind-aws.web-app.io which isn’t being hosted anymore.

$ web install rockwind-aws

Doesn’t seem to work:

No match found for ‘rockwind-aws’, available Apps:

Edit: Strange thing is, this works on one machine, but not the other. What do you think I’m missing?

Because the App doesn’t exist

$ web install

You must have a locally cached copy. Clone it from GitHub instead.

Note: the x is the new .NET Core 3.1 dotnet tool that replaces web.

$ dotnet tool install --global x

How easy it is to extend this service and what would be required to do it? For example, if I wanted to pull an object out of a database instead of the S3 file path or a custom path in S3?

#Script pages work backed by a Virtual File System, so it’s able to use any of the existing VFS providers, so you’d need to either implement a custom virtual file provider or populate a Memory Virtual File System and use that.

Wonderful! I’m going to try and spend some time on this this weekend to build a POC. I’ll let you know how it goes.