Go on GAE vs Managed VMs

xuanbao · · 655 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Does anyone have experience using Managed VMs with Go on the Google Cloud Platform? I was wondering how it compared to GAE. My reasons for being interested are:</p> <ul> <li>Compatibility with the normal go tooling (no more import &#34;appengine&#34;) </li> <li>Increased portability of the code</li> <li>Use of Docker</li> </ul> <hr/>**评论:**<br/><br/>JohnGB: <pre><p>I looked into this about a year ago, and the limiting factor for me, was poor datastore support on Compute Engine. It&#39;s theoretically possible, but at the time there were no decent libraries to handle it.</p></pre>loganjspears: <pre><p>Check out <a href="https://github.com/golang/appengine" rel="nofollow">https://github.com/golang/appengine</a>. Its what prompted me to think about switching. It uses the JSON or Protobuff APIs to talk to datastore so you can use it at least from Managed VMs. </p> <p>Edit: It explicitly says its for Managed VMs but you could use <a href="https://cloud.google.com/datastore/docs/apis/v1beta2/" rel="nofollow">https://cloud.google.com/datastore/docs/apis/v1beta2/</a></p></pre>JohnGB: <pre><p>Last year I knew that Google was working on Go APIs for all their cloud services, but at the time it wasn&#39;t complete. I just had a look at the repo for it, and it seems to be a complete package, even if it&#39;s in Beta (we all know how Google are about that).</p> <p>You can check it out here: <a href="https://github.com/GoogleCloudPlatform/gcloud-golang" rel="nofollow">https://github.com/GoogleCloudPlatform/gcloud-golang</a></p></pre>albmin: <pre><p>You definitely need to check out <a href="http://kubernetes.io/">http://kubernetes.io/</a> if you&#39;re thinking about migrating over. Kubernetes will make life extremely easy if you&#39;re using a mircroservice-style architecture, as it will handle scaling, scheduling, failover, etc.. Docker/Container-based systems are also what&#39;s &#39;hot&#39; right now (and for good reason), and are essentially a requirement for kubernetes. </p> <p>Depending on what you&#39;re utilizing with GAE (datastore, etc..), it may make the transition a little more challenging, but being PaaS agnostic is extremely nice..</p> <p>Good luck.</p></pre>slimmyp: <pre><p><a href="http://blog.circleci.com/its-the-future/">http://blog.circleci.com/its-the-future/</a></p> <p>About Docker/LCX/K8s</p></pre>afrobee: <pre><p>Make questioning if I should trust the word of some people around here.</p></pre>akcom: <pre><p>I&#39;d like to piggy back off this for a moment, but do you have any good resources you&#39;d recommend to get a grasp on why Docker/container type systems are so popular and sort of &#34;best practices&#34; when using them?</p> <p>Thanks!</p></pre>loganjspears: <pre><p>Unfortunately I do use datastore and memcached. Memcached isn&#39;t that big of a switch, but I do rely on datastore&#39;s &#34;infinite scaling&#34; when it comes to storing data. </p></pre>zond: <pre><p>You can use datastore from anywhere on the internet: <a href="https://cloud.google.com/datastore/docs/concepts/overview" rel="nofollow">https://cloud.google.com/datastore/docs/concepts/overview</a></p> <p>Edit: Right, you already know this :)</p></pre>dahlma: <pre><p>I&#39;ve launched Go apps on a variety of services: GAE, Heroku, Linode, Rackspace, Digital Ocean, etc.</p> <p>GAE is by and large the biggest pain in the ass.</p> <p>I see you&#39;re locked into datastore which is a shame, because Heroku has been the easiest. There is a simple build pack to implement, you use <code>godep</code> to save dependencies and then it will build and roll out for you.</p> <p>Heroku infinitely makes your code more portable, because it&#39;s router is just listening to your code over a proxy pass and is setting a PORT environment variable to tell your application how to broadcast. With GAE you need to wrap the code in it&#39;s own function, it doesn&#39;t use <code>main()</code> to initialize the application.</p> <p>I&#39;ve never had any luck with writing Go applications with Docker, which is funny considering what Docker was written in. Luckily I write my apps on OS X and deploy on Linux, so have never ran into issues that were platform specific since.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

655 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传