Archive

Posts Tagged ‘Google’

Google App Engine支持Go语言

May 12th, 2011 No comments

在昨天的Google I/O大会上, Google App Engine宣布支持Go语言, 对于go来说是个非常好的消息, 现在Google App支持Python, Java 和Go. 如果Go的性能不错的话可能取代Java.

文章是Go官方blog上面的, 简单翻译如下:
原文: http://blog.golang.org/2011/05/go-and-google-app-engine.html
翻译: Bian Jiang (@b0rder)

Google的APP Engine 为Web应用提供了一个稳定, 可扩展, 易于部署和发布的平台.
已经有超过10万活跃的应用部署在appspot.com以及用户自己定制的App Engine.
从最开始的Python到2009年增加对Java的支持. 在今天的Google I/O开发者大会大会上, 我们很高兴的宣布要支持Go语言, 虽然现在只是初期版本, 但无论是对App Engine还是Go开发团队都是一个令人兴奋的时刻, 有里程碑的意义.

现在可以从这下载App Engine SDK For Go语言, 很快就可以把Go开发的应用部署到App Engine中.
现在可以通过SDK学习如何去写web应用, 如何去使用API, 在你的本地测试Web APP.
只要一开通就可以很容易的把你的应用部署到Google的云服务器中.

如果你不想等待那么长时间, 可以在这里申请测试帐号. 在测试过后, 我们将对所有人开发, 虽然还只是试验阶段.

这里提供了一个简单的方法来进行开发Go Web应用, 你甚至不用安装Go, 因为SDK里面已经包含了所有内容. 你只需要下载SDK并解压, 就可以开始的Go web App之旅. 并且SDK提供了一个App Server它会自动编译你的代码.

在SDK中提供基本上提供了标准的App Engine API, 比如: Datastore, Blobstore, URL Fetch, Mail, Users等. 更多的API也在增加的开发环境中. GAE用的Go运行环境是当前最新版本的Go Release r57.1, 基本包含了Go所有的基本库, 当然为了安全起见, 在APP环境中去掉了一些系统调用(syscall)和不安全(unsafe)的包.

虽然都提供了goroutines和channels, 但是目前Go APP只支持单线程. 也就是说所有的goroutines都跑在一个系统线程里面, 目前不提供并行处理模式, 但是
这个限制在不久的将来会取消.

尽管有些小的限制, 但是不影响go的强大. Go的代码是以源代码的形式发布, 编译都采用64位的x86平台, 确保Go App Engine高效运行.

在这里查看更多信息.
一个Go APP的Demo:http://moustach-io.appspot.com/
代码在这里: https://code.google.com/p/appengine-go/source/browse/example/moustachio
SDK的源码可以从这里下载
我们创建了google-appengine-go 邮件列表. 有关APP Engine的疑问可以发到这个邮件列表里面.
如果发现了Bug可以提交到这里: http://code.google.com/p/googleappengine/issues/list

目前Go App Engine SDK 只支持Linux和Mac OSX(10.5或以上)版本. 我们希望很快推出Windows版本.

We’d like to offer our thanks for all the help and enthusiasm we received from Google’s App Engine team in making this happen.

- David Symonds, Nigel Tao, Andrew Gerrand, and the rest of the Go Team.

Categories: golang Tags: , , , , , ,

Go 语言中文社区成立

February 3rd, 2010 No comments
Go 中文社区
  1. Go官方网站
  2. Go中文官网
  3. 中文论坛(测试中…)
  4. 中文用户讨论组(邮件)
  5. 中文翻译(SVN)
  6. GitHub与Google Code同步(GIT)
  7. QQ群: 102319854(申请加入请到中文论坛留言)

Go中文文档翻译计划

  1. Install Go 初稿完成
  2. Go Tutorial 初稿完成
  3. Effective Go 初稿25%

翻译的详细信息参考 翻译计划

TODO

1. 创建一个wiki用于资料的收集和整理

2. 把翻译的中文文档发送给Go官方。

3. 翻译PKG相关的文档。

4. 创建一个Blog用于发布有关Go的新闻

5. 用Go做个具体的开源项目。

Categories: golang Tags: , , ,

传说中的中文编程

January 31st, 2010 No comments
border@ubuntu:~/work/go/tutorial$ cat helloworld.go
package main
import fmt “fmt”
func 输出函数(s string) {
fmt.Printf(s)
}
func main() {
fmt.Printf(“Hello, 中文\n”)
变量 := “传说中的中文编程\n”
输出函数(变量)
}
border@ubuntu:~/work/go/tutorial$ 8g helloworld.go
border@ubuntu:~/work/go/tutorial$ 8l -o helloworld helloworld.8
border@ubuntu:~/work/go/tutorial$ ./helloworld
Hello, 中文
传说中的中文编程
GO中文资料参考: http://golang-china.org


Bian Jiang
Blog:  http://www.wifihack.net/

Categories: golang Tags: , , , ,

Google发布免费DNS解析服务

December 4th, 2009 No comments

本文来自: Solidot.
Google宣布 推出免费的DNS解析服务Google Public DNS

DNS协议是Web的重要组成部分,它就如同是互联网的“电话簿”。每次访问一个网站,计算机都须执行一次DNS查询。复杂的网页在载入之前需执行多次DNS查询,其结果是普通网民每天必须执行数百次DNS查询,这会降低用户的浏览体验。Google推出Public DNS便是试图改进浏览体验,让互联网变得更快(在TTL记录过期之前执行prefetching,更新缓存),更安全(支持新的DNS安全扩展DNSSEC)。Google Public DNS托管在Google分布在全世界的数据中心,它使用选播路由算法(Anycast Routing)把用户的DNS解析请求发送到地理位置最近的数据中心。Google Public DNS遵循DNS标准,向用户的计算机提供正确的响应,不会有任何屏蔽、过滤,或重新定向等妨碍用户浏览体验的行为。Google Public DNS的IP地址为:8.8.8.8以及8.8.4.4。

修改TCP/IP的DNS服务器地址:

Microsoft Windows

DNS settings are specified in the TCP/IP Properties window for the selected network connection.

Example: Changing DNS server settings on Microsoft Windows Vista

  1. Go the Control Panel.
  2. Click Network and Internet, then Network and Sharing Center, then Manage network connections.
  3. Select the connection for which you want to configure Google Public DNS. For example:
    • To change the settings for an Ethernet connection, right-click Local Area Connection, and click Properties.
    • To change the settings for a wireless connection, right-click Wireless Network Connection, and click Properties.

    If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

  4. Select the Networking tab. Under This connection uses the following items, clickInternet Protocol Version 4 (TCP/IPv4), and then click Properties.
  5. Click Advanced and select the DNS tab. If there are any DNS server IP addresses listed there, write them down for future reference, and remove them from this window.
  6. Click OK.
  7. Select Use the following DNS server addresses. If there are any IP addresses listed in the Preferred DNS server or Alternate DNS server, write them down for future reference.
  8. Replace those addresses with the IP addresses of the Google DNS servers: 8.8.8.8 and 8.8.4.4.
  9. Restart the connection you selected in step 3.
  10. Test that your setup is working correctly; see Testing your new settings below.
  11. Repeat the procedure for additional network connections you want to change.

Mac OS X

DNS settings are specified in the Network window.

Example: Changing DNS server settings on Mac OS 10.5

  1. From the Apple menu, click System Preferences, then click Network. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
  2. Select the connection for which you want to configure Google Public DNS. For example:
    • To change the settings for an Ethernet connection, select Built-In Ethernet, and click Advanced.
    • To change the settings for a wireless connection, select Airport, and clickAdvanced.
  3. Select the DNS tab.
  4. Click + to replace any listed addresses with, or add, the Google IP addresses at the top of the list: 8.8.8.8 and 8.8.4.4.
  5. Click Apply and OK.
  6. Test that your setup is working correctly; see Testing your new settings below.
  7. Repeat the procedure for additional network connections you want to change.

Linux

DNS settings are specified in /etc/resolv.conf in most distributions.

Example: Changing DNS server settings on Ubuntu

  1. Edit /etc/resolv.conf:
    sudo vi /etc/resolv.conf
  2. If any nameserver lines appear, write down the IP addresses for future reference.
  3. Replace the nameserver lines with, or add, the following lines:
    nameserver 8.8.8.8
    nameserver 8.8.4.4
  4. Save and exit.
  5. Restart any Internet clients you are using.
  6. Test that your setup is working correctly; see Testing your new settings below.


Bian Jiang
Blog: http://www.wifihack.net/

Categories: Others Tags: , , , ,

通过修改Host访问Google picasaweb

August 12th, 2009 No comments

Google picasaweb 被封,无法看到图片,找个几个IP暂时可以用。

203.208.39.104 picadaweb.google.com
203.208.39.104 lh1.ggpht.com
203.208.39.104 lh2.ggpht.com
203.208.39.104 lh3.ggpht.com
203.208.39.104 lh4.ggpht.com
203.208.39.104 lh5.ggpht.com
203.208.39.104 lh6.ggpht.com

把上面的地址更新进hosts就好了。
Linux: /etc/hosts

FuckGFW

Categories: Geek Tags: , , ,