Deltakosh

CDN

51 posts in this topic

for the nightly build, I suppose the raw github link would work : https://raw.githubusercontent.com/BabylonJS/Babylon.js/master/babylon.2.1-alpha.js in html code

<script src="https://raw.githubusercontent.com/BabylonJS/Babylon.js/master/babylon.2.1-alpha.js"></script>

didn't test ...

 

I tried that for boobies.  It worked fine for me, but some browsers have strict mime types & it blows up.

jerome likes this

Share this post


Link to post
Share on other sites

yep, the http response header is 

  1. Content-Type:
    text/plain; charset=utf-8

 

and not application/javascript

 

Maybe I'll host a nightly copy of this file somewhere on one of my servers here soon ... for you guys

Dad72 likes this

Share this post


Link to post
Share on other sites
I agree with JCPlamer. this could be pinned.

 

It would be cool if Jerome's servers  is updated version in real time.

Share this post


Link to post
Share on other sites

Links for serving raw content from github:

 

Dev (a chance of blacklisting if the file is used on high traffic pages!) - 

https://rawgit.com/BabylonJS/Babylon.js/master/babylon.2.1-alpha.js

Production (cached! might be relatively old) - can be used on high traffic websites.

https://cdn.rawgit.com/BabylonJS/Babylon.js/master/babylon.2.1-alpha.js

 

So, for local devs : you could use

<script src="https://rawgit.com/BabylonJS/Babylon.js/master/babylon.2.1-alpha.js"></script>
Dad72, jerome and Vousk-prod. like this

Share this post


Link to post
Share on other sites

Is it possible that once a version is a release candidate, that a provisional CDN be made?  I have a set of test scenes that are using CDN 2-0, if I wanted to test prior to production, should I not just change to CDN 2-1?  It might not run, but is not that kind of the point?

 

Once the final print occurs, I then do not have to remember to switch from rawgit or clean up temp copies.  I do not really know what CDN is or "beta" for that matter, so do not how big an ask ($) this is.

Share this post


Link to post
Share on other sites

Hmm, just to add my two cents, once a file is on a CDN, shouldn't it be never removed to avoid "not found" on projects already in production ?

 

[shouldn't it be never removed... is this a correct english sentence ?  "ne devrait-il pas ne jamais être"... ohaa comment on traduit une tournure pareille ? :D :D ]

Share this post


Link to post
Share on other sites

the official CDN is managed by Deltakosh - (newest) http://cdn.babylonjs.com/2-0/babylon.js .

The others are simply a proxy to github (that delivers text content and not javascript, so it cannot be used directly).

The rawgit files are actually a "hack" to get the latest version out of a CDN. It is not officially maintained by the BabylonJS developers. So once the filename changed in github (from alpha to beta) rawgit stopped working. Rawgit is also mainly for development, always expect changes while developing :-)

 

Just a side note (and a personal opinion) - only final versions are available in CDNs. 2.1 is in not. I wouldn't use it in production anyhow. CDNs should be (mainly) used in production pages. That's why 2.1 is not (yet) maintained on the official cdn page. And that's why the CDN only delivers minified compressed versions.

Share this post


Link to post
Share on other sites

Yep, you are right. Was probably wrong of me to write this sentence without explaining what rawgit actually is :-)  

Share this post


Link to post
Share on other sites

Is that CND able to absorb 2'000'000 views / month ?

 

Can we also have https access ?

(Most of our users access our tools via SSL, and for some framework every link inside a single page should be SSL to be able to work)

Share this post


Link to post
Share on other sites

Arf ... 2 000 000 access a month is only 46 downloads (average) per minute ... peanuts for any web server :P

The right measure is rather how much it can handle ... per second.

But I don't think the bottleneck is here.

 

The SSL access is a real problem

Share this post


Link to post
Share on other sites

I also thought a CDN was a mirror network not a single host.  Different hosts being placed in different parts of the world, gives lower latency.

 

2nd, since the .js is public, the https is only preventing alterations, not secure communications.  I have never heard every link must be SSL before.

Share this post


Link to post
Share on other sites

For most e commerce CMS, HTTPS access to a page that load an insecure script is impossible. To ensure complete security every single part of the content (even external scripts) must be served over HTTPS, otherwise the page request is blocked.

Share this post


Link to post
Share on other sites

Actually, it's not forbiden to have http and https resource in the same web page, but ... all major browsers now refuse to load any un-crypted resource within a html page coming from a https request.

Share this post


Link to post
Share on other sites

I've put on JSdelivr CDN a good stable 2.1 beta tested and approved for one month in production environnement before we release the 2.1 final, so this well working beta version will stay here for production sites for people who can't update to 2.1 final (because of too many changes, particularly in camera system, for instance _update methods replaced everywhere was a mess for my projects :P).

The interest also is SSL support.

 

//cdn.jsdelivr.net/babylonjs/2.1-beta/babylon.min.js

 

I also put the 2.0 final :

//cdn.jsdelivr.net/babylonjs/2.0/babylon.min.js

 

And I'll put the 2.1 final when ready.

JCPalmer likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.