Page 1 of 1

Hosting Standalone.zip on a CDN

Posted: Fri Dec 04, 2020 12:44 pm
by gsillevis
Is there a way to host the game zip on a cdn and not my web server? Do the standalone js file and the game zip need to be in the same directory?

What I am trying to achieve is faster download times of my game zip and the theory is a cdn(or drop box or s3) will help

Re: Hosting Standalone.zip on a CDN

Posted: Fri Dec 04, 2020 12:48 pm
by richmond62
Sorry, but why would the standalone file be a javascript file?

LiveCode standalones are monolithic.

Re: Hosting Standalone.zip on a CDN

Posted: Fri Dec 04, 2020 12:53 pm
by gsillevis
What do you mean by monolithic?

There are two files. Standalone.zip and standalone-community-9.5.1.js

Re: Hosting Standalone.zip on a CDN

Posted: Sat Dec 05, 2020 5:26 pm
by richmond62
By monolithic I mean monolithic.

Desktop standalones generate a single file.

The HTML5 option generates 4 files: 2 of which are standalone.zip and standalone-community-9.6.1.js

BUT, you did not mention that your question/problem related to an HTML5 build, and as I have only generated
an HTML5 build twice (the second being one to see what you were on about just now) I didn't know
what you were writing about.

To avoid confusion it might not be a bad idea to contextualise things a bit more in postings.

Re: Hosting Standalone.zip on a CDN

Posted: Sat Dec 05, 2020 5:49 pm
by richmond62
I don't think your idea will work from DropBox as you cannot open a file directly in DropBox but have to download it first.

Re: Hosting Standalone.zip on a CDN

Posted: Sun Dec 06, 2020 12:55 am
by FourthWorld
richmond62 wrote:
Sat Dec 05, 2020 5:26 pm
By monolithic I mean monolithic.

Desktop standalones generate a single file.

The HTML5 option generates 4 files: 2 of which are standalone.zip and standalone-community-9.6.1.js

BUT, you did not mention that your question/problem related to an HTML5 build, and as I have only generated
an HTML5 build twice (the second being one to see what you were on about just now) I didn't know
what you were writing about.

To avoid confusion it might not be a bad idea to contextualise things a bit more in postings.
The context is provided by the forum where he chose to post the query: "HTML5", under the "Platform-Specific" category.

Re: Hosting Standalone.zip on a CDN

Posted: Sun Dec 06, 2020 8:30 am
by richmond62
The context is provided by the forum where he chose to post the query: "HTML5", under the "Platform-Specific" category.
Ouch, sorry: tend to open posyings that pop up in the NEW listings without refering to those. My bad.

Re: Hosting Standalone.zip on a CDN

Posted: Sun Dec 06, 2020 4:04 pm
by FourthWorld
richmond62 wrote:
Sun Dec 06, 2020 8:30 am
Ouch, sorry: tend to open posyings that pop up in the NEW listings without refering to those. My bad.
I've done that more than a few times myself.

No worries. I spend so much time moving threads to their appropriate section that I was uncommonly pleased to see gsillevis had taken the time to place this one so thoughtfully.

@gsillevis: You might try a CDN to see if it helps, but unless you have particularly noisy neighbors on a shared host it probably won't make a huge difference.

And beyond the download time, a good deal of the delay you see is the initialization of the LC engine JS lib, and at this time there isn't much we can do about that part.

The team is working on a new option to output the engine as WebAssembly rather than JS. It's too early to have a firm sense of the differences, but I'd guess it may shorten download times by somewhere between 20 and 30%, and reduce init time much more.

They do not yet have an estimated delivery date for that overhaul, though.

Another option may be to consider deploying a standalone that downloads everything it needs - even your UI stacks and libraries - over the web. This one-time install is often quite acceptable to the audiences for which LC's HTML export would be acceptable, but with many advantages: simpler to deploy, full scope of LC features available, UI dedicated to your app's functionality (no Back button or other features not relevant - sometimes even disruptive -of your app), integration with local OS features beyond what browsers can offer (file I/O, calling other apps, basically everything LC can do), so much more...

http://forums.livecode.com/viewtopic.php?t=15252#p76174

Streaming apps this way in LiveCode is similar to what Adobe Creative Suite, MS Office 365, and other major players have been doing in recent years, but we've had this capability since the beginning.