为什么 javascript node.js 不在谷歌应用引擎上
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12450321/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
why is javascript node.js not on google app engine
提问by Chris G.
Google created the V8 JavaScript engine: V8 compiles JavaScript source code directly into machine code when it is first executed.
Google 创建了 V8 JavaScript 引擎:V8 在第一次执行时将 JavaScript 源代码直接编译成机器码。
Node.js is built on V8 - why is Google not offering any Node.js servers like Microsoft Azure?
Node.js 是建立在 V8 之上的——为什么 Google 不提供像 Microsoft Azure 这样的任何 Node.js 服务器?
Google App Engine would be a natural place to put Node.js.
Google App Engine 将是放置 Node.js 的自然场所。
Do you know why Google is not doing just that?
你知道为什么谷歌不这样做吗?
采纳答案by fernandopasik
As of June 2014, Google had a limited preview for custom languages on Google App Engine (which is different from Google Compute Engine).
截至 2014 年 6 月,Google 对Google App Engine(不同于 Google Compute Engine)上的自定义语言进行了有限的预览。
Watch Building Node.js applications with App Engine and Custom Runtimesand check out https://cloud.google.com/appengine/docs/managed-vms/:
观看使用 App Engine 和自定义运行时构建 Node.js 应用程序并查看https://cloud.google.com/appengine/docs/managed-vms/:
App Engine now offers a second hosting option: Managed VMs. The Managed VM hosting environment lets you run App Engine applications on configurable Compute Engine Virtual Machines (VMs). You can also use Managed VMs to deploy user-configurable custom runtimes, such as for Node.jsand other runtimes.
App Engine 现在提供第二个托管选项:托管虚拟机。托管 VM 托管环境可让您在可配置的 Compute Engine 虚拟机 (VM) 上运行 App Engine 应用程序。您还可以使用托管 VM 来部署用户可配置的自定义运行时,例如Node.js和其他运行时。
The procedure to get into the beta is:
进入测试版的程序是:
Sign up and create a Managed VM project
注册并创建托管 VM 项目
Managed VMs are in Limited Preview, you must sign up for access to this feature, create a billing-enabled project, and tell us about your project so we can whitelist it to run in a Managed VM. Follow these steps:
托管 VM 处于有限预览阶段,您必须注册访问此功能,创建启用计费的项目,并告诉我们您的项目,以便我们可以将其列入白名单以在托管 VM 中运行。按着这些次序:
- Sign up for access to Managed VMs.
- Join the app-engine-managed-vms Google Group to participate in discussions about Managed VMs.
- Projects (or apps - they are the same thing) must be in a U.S. data center. If you're planning to use an existing project, skip to the next step. Otherwise, create a new app in a U.S. data center. Navigate to https://preview.appengine.google.comand create a new app.
- Enable billing for the project. Visit the page https://cloud.google.com/console/project/apps~, where is the ID of your project. Click on Settings in the left menu and then enable billing. If your app is billed under a Premier account, email us at [email protected] to have your new Cloud project billed under the same account.
- Send an email to [email protected] with the application ID in the subject line.
- 注册以访问托管 VM。
- 加入 app-engine-managed-vms Google Group 以参与有关托管 VM 的讨论。
- 项目(或应用程序 - 它们是同一回事)必须位于美国数据中心。如果您打算使用现有项目,请跳到下一步。否则,在美国数据中心创建一个新应用程序。导航到https://preview.appengine.google.com并创建一个新应用程序。
- 为项目启用计费。访问页面https://cloud.google.com/console/project/apps~,其中是您的项目的 ID。单击左侧菜单中的设置,然后启用计费。如果您的应用是使用 Premier 帐户计费的,请发送电子邮件至 [email protected] 以让您的新 Cloud 项目使用同一帐户计费。
- 向 [email protected] 发送电子邮件,主题行中包含应用程序 ID。
When we receive your email, we'll configure some resources behind the scenes and notify you via email when your project is ready to go. The email includes final instructions for setup. If you encounter an error while following these instructions, contact us at [email protected].
当我们收到您的电子邮件后,我们会在后台配置一些资源,并在您的项目准备就绪时通过电子邮件通知您。该电子邮件包含设置的最终说明。如果您在按照这些说明操作时遇到错误,请通过 [email protected] 与我们联系。
回答by 3on
Node.js is maintained by Joyent, who is in a way a competitor of Google.
Node.js 由 Joyent 维护,Joyent 在某种程度上是 Google 的竞争对手。
Node.js has no link what so ever with Google but is in fact built on top of an open source project started by Google.
Node.js 与谷歌没有任何联系,但实际上是建立在谷歌启动的开源项目之上的。
Google might jumped into this business just like Azure did, but there are already so many PaaS doing it, it might not be worth it. I have never used GAE, but my understanding is that it is quite different that other PaaS and you have to use GAE libraries to make your code run.
谷歌可能会像 Azure 那样跳入这项业务,但已经有这么多 PaaS 这样做,这可能不值得。我从未使用过 GAE,但我的理解是它与其他 PaaS 完全不同,您必须使用 GAE 库来运行您的代码。
Which, this is my personal feeling, is not really what the Node.js community is looking for. Node.js is used to quickly make a fast lightweight app, a big share for APIs for Phone apps for example.
这是我个人的感觉,并不是 Node.js 社区真正想要的。Node.js 用于快速制作一个快速的轻量级应用程序,例如手机应用程序的 API 的一大份额。
Nevertheless if you are looking for a PaaS for Node.js, the are quite a few out there:
然而,如果您正在为 Node.js 寻找 PaaS,那么有很多:
- Joyent(nodejitsu)
- dotCloudwhich has WebSockets support.
- Windows Azure
- Nodester(bought by App Fog recently)
- Any Cloud Foundryhost should support Node.js too.
- and many more...
- Joyent(nodejitsu)
- 具有 WebSockets 支持的dotCloud。
- 视窗 Azure
- Nodester(最近被 App Fog 收购)
- 任何Cloud Foundry主机也应该支持 Node.js。
- 还有很多...
Those are just some names off the top of my head. There quite a few but those are the major ones. Oh there is Herokutoo, but they don't have support for WebSocket which is a bummer for any Socket.IO based app.
这些只是我脑海中的一些名字。有很多,但这些是主要的。哦,也有Heroku,但它们不支持 WebSocket,这对于任何基于 Socket.IO 的应用程序来说都是一个无赖。
回答by user1700737
You can easily install node on Google Compute Engine (which basically is a virtual computer). Here is a link: https://developers.google.com/datastore/docs/getstarted/start_nodejs/
您可以轻松地在 Google Compute Engine(基本上是一台虚拟计算机)上安装 node。这是一个链接:https: //developers.google.com/datastore/docs/getstarted/start_nodejs/
Regards Lars
问候拉斯
回答by user1700737
after years of experiences in google appengine, i switch to other cloud services now.
在谷歌应用引擎多年的经验后,我现在切换到其他云服务。
i think google appengine is actually an old fashion service in cloud computing industry. which is slow to new technology, difficult to deploy, time wasting to learn the apis and lacking of a lot of features you need in languages you use.
我认为谷歌应用引擎实际上是云计算行业的一种老式服务。这对新技术来说很慢,难以部署,浪费时间来学习 api 并且缺乏你使用的语言所需的许多功能。
regardless of google's large community, i would not suggest anyone to use google appengine.
无论 google 的大型社区如何,我都不会建议任何人使用 google appengine。
[newer paas]
[新的paas]
i strongly recommend you to use openshift, appfog, heroku .etc's new paas cloud computing technologies, which are far more extensible, less change needing, more migrable from one platform to another, more freely coding in the beauty of the natural lanuage and its standard libraries without ugly platform specific apis.
我强烈建议您使用 openshift、appfog、heroku .etc 的新 paas 云计算技术,这些技术具有更高的可扩展性、更少的更改需求、更容易从一个平台迁移到另一个平台、更自由地编码自然语言及其标准没有丑陋的平台特定 api 的库。
[iaas]
[国际会计准则]
if you want more control over the running os environment, you may give linode, digital ocean, amazon, google cloud engine, microsoft azure etc. iaas providers a try.
如果你想对运行的操作系统环境有更多的控制,你可以试试 linode、数字海洋、亚马逊、谷歌云引擎、微软 azure 等 iaas 提供商。
回答by Ibrahim Arief
Because App Engine is a platform-as-a-service, and in order to add a new language/stack to GAE, Google need to create mid-level libraries that interface with the plethora of App Engine's services.
由于 App Engine 是一种平台即服务,为了向 GAE 添加新的语言/堆栈,Google 需要创建与App Engine 的大量服务交互的中级库。
Moreover, all App Engine apps is sandboxedand has several functionalities restricted from inside their sandbox environment. This means that beside the need to create service libraries, Google also need to create a secured sandbox environment for any language/stack that they try to introduce into GAE.
此外,所有 App Engine 应用程序都是沙盒化的,并且在其沙盒环境中限制了一些功能。这意味着除了需要创建服务库之外,Google 还需要为他们尝试引入 GAE 的任何语言/堆栈创建一个安全的沙箱环境。
I personally think the second reason is why Google does not introduce support for new language/stack as aggressive as Azure did. App Engine is, in a way, more 'managed' than Azure, and has a larger initial development cost for new language/stack.
我个人认为第二个原因是 Google 没有像 Azure 那样积极地引入对新语言/堆栈的支持。在某种程度上,App Engine 比 Azure 更受“管理”,并且新语言/堆栈的初始开发成本更高。
回答by Wernight
Node.js has recently enabled support for Google Cloud users. The main document pages are:
Node.js 最近启用了对 Google Cloud 用户的支持。主要的文档页面是:
It seems to require at the moment a Compute Engineinstance.
目前似乎需要一个Compute Engine实例。
回答by crb
It has been released as of March 2016.
它已于 2016 年 3 月发布。
https://cloudplatform.googleblog.com/2016/03/Node.js-on-Google-App-Engine-goes-beta.html
https://cloudplatform.googleblog.com/2016/03/Node.js-on-Google-App-Engine-goes-beta.html
回答by Trevor
Background: App Engine Standard vs App Engine Flexible
背景:App Engine Standard 与 App Engine Flexible
There seems to be some confusion on this topic because there are two versions of App Engine: Standard and Flexible. NodeJS is supported on App Engine Flexible but NOTon App Engine Standard. (See herefor a more complete explanation of the differences).
这个话题似乎有些混乱,因为 App Engine 有两个版本:标准版和灵活版。App Engine 柔性版支持 NodeJS,但App Engine 标准版不支持。(有关差异的更完整解释,请参见此处)。
App Engine Standard scales in seconds (as opposed to minutes for the Flexible environment), and has a free tier, so you can develop and demo without spending a dime. These benefits come at the cost of flexibility. App Engine Standard only supports certain languages and libraries, doesn't allow writing to disk nor SSH. In other words, the environment is standardized.
App Engine Standard 以秒为单位进行扩展(而不是灵活环境中的分钟),并且具有免费层,因此您无需花一分钱就可以进行开发和演示。这些好处是以牺牲灵活性为代价的。App Engine Standard 仅支持某些语言和库,不允许写入磁盘或 SSH。换句话说,环境是标准化的。
Answer: NodeJS Support on App Engine Standard
答案:App Engine 标准上的 NodeJS 支持
If you are interested in NodeJS support on App Engine Standard, please star this issue: https://issuetracker.google.com/issues/67711509.
如果您对 App Engine Standard上的 NodeJS 支持感兴趣,请在此问题上加注星标:https: //issuetracker.google.com/issues/67711509。
Google addresses features that get attention from the community (see here). The best way to give your attention to this feature, is to star it on the Google Issue tracker linked to above.
Google 解决了引起社区关注的功能(请参阅此处)。关注此功能的最佳方式是在上面链接的 Google 问题跟踪器上为它加星标。
回答by Chankey Pathak
Google has just announced support for Node.js on App Engine.
Google 刚刚宣布在 App Engine 上支持 Node.js。
See: https://cloud.google.com/nodejs/
请参阅:https: //cloud.google.com/nodejs/
Here's an example of how to deploy Node.js app on App Engine.
回答by Antoine Dusséaux
Google announced on March, 21st 2016 that Node.js on Google App Engine was going beta: https://cloudplatform.googleblog.com/2016/03/Node.js-on-Google-App-Engine-goes-beta.html?m=1
Google 于 2016 年 3 月 21 日宣布 Google App Engine 上的 Node.js 将进行测试:https: //cloudplatform.googleblog.com/2016/03/Node.js-on-Google-App-Engine-goes-beta.html ?m=1
This was expected as Google also joined the Node.js Foundation and Google develops the V8 JavaScript engine which powers Chrome and Node.js: https://nodejs.org/en/blog/announcements/welcome-google/
这是预料之中的,因为谷歌也加入了 Node.js 基金会,并且谷歌开发了支持 Chrome 和 Node.js 的 V8 JavaScript 引擎:https: //nodejs.org/en/blog/announcements/welcome-google/
Google announced a partnership with NodeSource at the same time.
谷歌同时宣布与 NodeSource 建立合作伙伴关系。

