Using google Go resources vs Python and Java on Appengine

Will google go use less resources than Python and Java on Appengine? Are instance startup times for transition faster than Java and Python startup times?

Is the go program loaded in the form of binary files or source code, and if it is loaded as source code, is it compiled once or every time the instance is started?

In other words: can I use Go in an application in terms of costs? (only taking into account the cost of application resources, not development time)

+48
java python google-app-engine go
Nov 07 2018-11-11T00:
source share
5 answers

Will google go use less resources than Python and Java on Appengine? Is instance startup time faster than Java and Python startup time?

Yes, Go instances have less memory than Python and Java (<10 MB).

Yes, Go instances start faster than the Java and Python equivalents, since only one executable is needed to run the application.

In addition, even if it is a single thread, Go instances process the incoming request simultaneously using goroutines, which means that if 1 goroutine is waiting for I / O, another one can process the incoming request.

Does the go program load as binary or source code, and if it loads as source code, then it compiles once or does each instance run?

Program

Go is loaded as source code and compiled (once) into a binary file when you deploy a new version of your application using the SDK.

In other words: can I use the Go in app mechanism from the cost perspective?

The duration of Go’s execution definitely depends on the ratio of performance and price, but this does not affect the estimation of other API quotas, as described in Peter’s answer.

+44
Apr 23 2018-12-12T00:
source share

The cost of instances is only part of the cost of your application. I only use Java runtime, so I don’t know which would be more or less efficient with Python or Go, but I don’t think it would be order in different ways. I know that instances are not the only cost you need to consider. Depending on what your application is doing, you may find the API or storage costs more significant than any slight differences between runtimes. All API costs will be the same with any runtime you use.

The language "can" affect these costs:

  • On Demand Instances
  • Reserved Frontend Instances
  • Supported Instances

Language Independent Costs:

  • High replication data warehouse (per saved file)
  • Outgoing bandwidth (per gig)
  • Datastore API (for each operator)
  • Blobstore API Storage (per gig)
  • Email API (Email)
  • XMPP API (per page)
  • Channel API (for each channel)
+18
Nov 07 '11 at 15:56
source share

The question is mostly irrelevant.

The minimum memory for a Go application is less than a Python application, which is less than a Java application. They all cost the same instance, so if your application does not work better with extra heap space, this problem does not matter.

Startup startup time is less than Python startup time, which is less than Java startup time. If your application doesn’t have a particular reason to abandon many instance start / end cycles, this is not about cost. On the other hand, if you have an application that is extremely explosive in very short periods of time, startup time can be an advantage.

As mentioned in other answers, many of the costs are the same for all platforms - in particular, data warehouse operations. To the extent that Go vs Python vs Java will affect the clock instance counter, this is due to:

  • Does your application create a lot of garbage? For many applications, the greatest computational cost is the garbage collector. Java is by far the most mature GC and basic operations such as serialization, much faster than with Python. It seems that the garbage collector is an ongoing subject of development, but from a cursory search on the Internet, it does not seem to be a matter of pride (for now).

  • Is your application computationally intensive? Java (JIT-compiled) and Go are probably better than Python for mathematical operations.

All three languages ​​have their own advantages and curses. For the most part, you better let other issues dominate - in which language do you like working with most?

+14
Apr 29 '12 at 7:33
source share

This is probably more related to how you allocate resources than your choice of language. I read that GAE was built as an agnostic language, so maybe there is no built-in advantage for any language, but you can get the advantage of choosing a language that is convenient and motivated for you. I am using python, and what made my deployment much more cost-effective is upgrading to python 2.7, and you can only do this upgrade if you use the correct subset of 2.6, which is good. Therefore, if you choose a language that is convenient for you, you will probably get an advantage from your capabilities using a language, not a combo + language.

In short, I would recommend python, but the only application engine language I tried and that my choice, although I know Java pretty well, the code for the project will be much more compact using my favorite python language.

My applications are small to medium size and they cost nothing:

enter image description here

+1
Nov 07 '11 at 17:14
source share

I did not use Go, but I would strongly suspect that it will load and execute instances much faster and use less memory just because it is compiled. I believe that Python is more likely to be more responsive than Java, at least even at startup.

Instance loading / starting time is important because when your instance gets into more requests than it can handle, it spins another instance. This makes the request longer, giving the impression that the site is usually slow. Both Java and Python must run their virtual machine / interpreter, so I would expect that there would be an order of magnitude faster.

There is one more problem: Python2.7 is now available, Go is the only option that is single-threaded (ironically, given that Go is designed as a modern multi-processor language). Therefore, although Go requests should be processed faster, an instance can only process requests sequentially. I would be very surprised if this restriction lasted a long time.

0
Nov 08 2018-11-11T00:
source share



All Articles