Apps Script Back end platform – some thoughts on a different approach

Apps Script runs on Google Servers, probably the Rhino JavaScript  engine running on Google App Engine. Rhino is written in Java and the implementation used by Apps Script seems to be at about ES5.1, which of course is kind of old. It would be handy to know which version of Rhino it’s at, because then this table would show us exactly what JavaScript capability it has. If anybody knows, then ping me and let me know. I’ll dig around and update this post if I can figure it out.

Why not use Node?

So is this platform still the best solution ? Most (probably almost all) Apps Script Services, have underlying APIS that can be called directly, which means they could be wrapped in Node modules. The Apps Script code itself could be evaluated and run in a Node sandbox, using these wrapped service modules.

Infrastructure and quotas

Node runs in the App Engine flexible environment, so App engine could still be the underlying infrastructure, but moved from Java/Rhino to native Node. Better still, the Apps Script environment could instead be a cloud function called from your script, be packaged in a Docker container, be run locally on your own Node instance or indeed on any 3rd party infrastructure and therefore free of  (non API imposed) quotas.

Modern and efficient environment

That would also open Apps Script, if exposed to the sandbox, to a multitude of Node modules already available, would enable the latest versions of JavaScript to be easily supported both in the engine (which would be Node) and in the IDE which could be updated to a newer version of CodeMirror.


Webapps/HTMLService could then be supported natively using Node server modules, which would also give more capability for routing, additional methods, more control of headers etc/etc.

Open sourced

Best of all, Apps Script could be open sourced to allow for faster development of features and sharing of useful stuff.

Proof of concept

This is of course a very simplistic initial analysis, but I wonder if this could happen? Perhaps a few of us could work on a proof of concept to see what kind of blockers there might be to making a partial Apps Script runtime environment on Node. What are your thoughts?

About brucemcp 225 Articles
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time. The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it. I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.

1 Comment

Leave a Reply

Your email address will not be published.


seventeen − 8 =