Google App Engine for Go
code.google.com
code.google.com
So you won't be able to run a process like Doozer that communicates with other ports/protocols.
EDIT: More details from the docs at http://code.google.com/appengine/docs/go/runtime.html
An App Engine application cannot:
-write to the filesystem. Applications must use the App Engine datastore for storing persistent data. Reading from the filesystem is allowed, and all application files uploaded with the application are available.
-open a socket or access another host directly. An application can use the App Engine URL fetch service to make HTTP and HTTPS requests to other hosts on ports 80 and 443, respectively.
Makes me wonder if they are preparing to slowly edge Java out the door and replace it with something equally performant but not burdened by a hostile owner.
Isn't this what Sun basically did with Java? I don't know the incumbent they were trying to edge out or if it was just a "look at our cool tech" play.
Go seems like a C-esque version of python/ruby/java to me. A lot of very slick things in there. Lots of room to grow and a lot of community excitement.
And Hacker News thread: http://news.ycombinator.com/item?id=2533000
"Google has people who administer apps and services, and they need to, say, write tools that say scrape a few thousand machines statuses and aggregate the data," he says. "Previously, these operations people would write these in Python, but they're finding that Go is much faster in terms of performance and time to actually write the code."
Clever marketing or could Google's problems actually be handled better by Go than Python, in time to code?
Google has many custom components, though. I personally don't write Go nearly as quickly as I write Python, but I have 4+ years of writing Python in everything from tiny scripts up to large applications, both for the desktop and for the web. I have maybe twenty to forty hours of experience writing Go code, absolute tops. It's not a fair comparison. If we assume that the Googlers who are claiming to be more productive in Go than Python have a couple orders of magnitude on me, and that they don't need many prefabricated libraries, and I find the claim plausible.
I don't believe it'd currently be true in the general case, though.
If they were re-implementing a significant amount of code then go may indeed be more productive.
In my tests, it produces speedups on numerics that put it within spitting distance of hand-tuned C.
Ken Thompson is a co-creator, and the language came from Google. I think Google is just showing that they stand behind their language, and it does seem to hit a sweet spot for a lot of web apps. Although, I don't know too many web apps that need better performance than python.
For many people (including me) the lack of all this "features" is a feature in itself. I certainly have not missed any of them.
Still it probably would be nice to have them some day, but it is worth doing right and not worth sacrificing the current simplicity and elegance of the language.
Web apps aren't just CRUD anymore.
http://shootout.alioth.debian.org/u32/benchmark.php?test=all...
If your server in Go is 10x faster than your Python server, which is not necessarily unreasonable, that's 10x less hardware expense you have, if your website is actually "doing something". That can add up.
EDIT: Clarification, on goroutines run in a single OS thread on AppEngine.
I'd be surprised if they didn't do the same with Go, by the time it reaches production status.
I assumed that you're talking about http://ziutek.github.com/web_bench/, but that makes no mention of PyPy (other than a HN comment that PyPy takes 2x the memory) and Go comes out on top in that benchmark.
Either way, when saying Go is faster, I wasn't talking specifically about it's http library or io system (I assume both are similar in speed to Pythons). I more meant that if you're going to be writing custom CPU-intensive code to run on App Engine, assuming the same algorithm, Go should be faster. It has better constant factors, and it gives you better control over allocation.
I don't know PyPy well enough to say in what situations it outperforms Go (especially considering that I don't know what kind of VM warm-up you can expect on App Engine), but since GAE doesn't run PyPy, it's not relevant to the discussion of Python v Go on App Engine.
Though the Go ecosystem is nowhere near Python's.
Beyond coolness, it seems a waste of effort to tailor this release to Go, when similar effort might have been expended, e.g. to define a simple protocol talked over a UNIX fd that any static x86 binary could implement to integrate with App Engine.
...
If Backends are available at versioned URLs too (and I suspect they do/willdo) then there might be nice opportunities to build little Go Backends to do heavy lifting within your main Python applications. Sounds cool.
I won't drop Python for my day to day coding, but having Go as an option is good to see what cool toys we can build.
I mean, no one would write System code in PHP, and it's rare to see web sites written in C, so why write a website in Go?
Please correct if things have changed. I haven't revisited Go for a little while now, and would be very interested as to any updates to its unicode handling.
s := "Какая-то строка"
for _, rune := range s {
// do something with rune 'К', 'a', ...
}
2. Converting to []int gives you a slice of runes: s := "Какая-то строка"
runes := []int(s)
sub := string(runes[:8]) // "Какая-то"
however, slicing a string directly will slice it by byte: s[:8] // "Кака"
3. With package utf8 (http://golang.org/pkg/utf8/) you can manipulate runes manually.While this is all not intuitive (you have to know what does what), I find it rather easy.
Watch "Practical Go Programming": http://osdc.blip.tv/file/4432146/
Watch "Writing Go Packages": http://www.youtube.com/gocoding#p/u/0/jDWBJOXs_iI
Read language specification.
Edit: If you prefer books, here's a CC-licensed, still in development, book by Miek Gieben "Learning Go": http://www.miek.nl/files/go/ (grab the latest PDF; alternatively, here's Git repo: http://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary)
http://code.google.com/p/googleappengine/issues/detail?id=23...
IMHO, Google could be riding a much bigger wave right now...
An admittedly hastily prepared google trends graph: http://www.google.com/trends?q=node.js%2C+python+django%2C+r...
I am a node fan, I subscribe to the node-dev list and have worked on a few applications my self. However I am in no way delusional about the current blog popularity vs actual projects deploying with it.
Also you state that you are able to gain the same concurrency and speed with node that you are with Go. May I ask how you achieve this? Go usually comparable to C code in terms of performance [1]. Go also has amazing concurrency tools for efficient communication between two concurrent goroutines, for example the channel interface[2]. To my knowledge their is no way to run concurrent node processes. You can launch multiple instances of the same program but their is no way to let them communicate without sending data over a socket. You can of course use a reverse proxy to present a single entry point in which multiple node backends can take requests. However you can not claim this as concurrency in the same sense that is available with go.
Why not pass Json, and write your client code. It's not like Node is so expressive that it's a big win on server side code (especially with the flood of great altjvm & altclr languages these days).
(Native Client is also a possibility.)
Is there something comparable to npm or pip for go? I've seen a few go micro web frameworks but I'd really like to see a list of things like database adapters and the like which have been produced so far. The thing I find amazing about node is just how many great modules have been put out in it's short lifespan (https://github.com/joyent/node/wiki/modules). I suppose Go is a brand new language though.
Thanks!
Like pip or npm, their is goinstall http://golang.org/cmd/goinstall/
With Node you still need to write in an event-based style, which is something devs often complain about working with Node.js.
"With goroutines and channels, you can say 'I'm going to send a message to another goroutine or wait for a message from another goroutine', but you don't have to actually leave the function you're in to do that," Gerrand says. "That lets you write asynchronous code in a synchronous style. As people, we're much better suited to writing about things in a synchronous style."
from http://www.theregister.co.uk/2011/05/05/google_go/page4.html
If you're unable or unwilling to become fluent in a new language (especially Go, which isn't that difficult to learn), there is no way I'd hire you to program in any language.
Programming ability is multi-dimensional: not everyone is a top-notch as programming language geek AND an algorist AND an architect/designer AND systems hacker. Nonetheless, a programmer should have some aptitude in each of these areas, even if they shine particularly in only one.
A more eloquent summary of this thesis can be found at: