| 
             昨天花了一天时间,将原先放在免费虚拟主机上的 Flex 留言板,连同数据库数据,全部搬家到了 Google App Engine 上,这里大概说说体会: 
             
            1、选 Python 还是选 Java ? 
            原先的留言板后台是PHP,准备上 GAE 后就得面临这个选择。几经尝试后还是决定选 Java。 
            本来 Python 功能同样强大,比 Java 更敏捷,主要问题是没有一个好用的 IDE,这就很麻烦。少个冒号、少导入个包,你不会得到任何提示,程序运行起来到满屏的错误清晰,根本无法迅速查找错误,所以最后选择了 Java。语法虽然罗嗦点,但是一切都中规中矩。 
             
             | 
              | 
        
        
            | 
             2、GAE 速度怎么样? 
            说实话,很一般,Google 的粉丝不要拍砖哦,我这有证据。下面有两个网址,是同一个的 Flex 留言板程序,数据也一样。 
            第一个在美国的一个免费虚拟主机上,速度带宽都有限制。 
            第二个在 GAE 上,自己比较下吧,GAE 要慢很多。 
            要是同国内付费的虚拟主机比较,可能差距更大。 
            普通虚拟主机 
            Google App Engine 
             
            3、GAE 数据库好使吗? 
            还不错。但是 Google 应该在现有的 API 上再简单的包装一层,立刻就可以减少 80% 的重复代码。 
            比如,原先 PHP 版的留言板,在用 CodeIgniter 框架的情况下,插入一条留言,只用一条语句。而现在要几十条语句。只要简单再包装一下,应该可以达到类似的效果。 
             
             
            4、GAE 配额都有什么限制? 
            限制的种类非常多,但是配额数都够用了。经过三四天的折腾,CPU 也才用了0.06个小时。 
            其他包括各种 API 调用次数也都是有限制的,我为了搬家,抓取原来的数据,使用了16次 UrlFetch API,好在配额六十多万次,够用了。 
            程序上传发布一个月只能250次,我现在用了9次,问题也不大。 
            用的最多的是 Datastore API  ,已经用了一千多次了,但是配额是一千万次,哈哈,够用了吧。 
             
            欢迎大家来我的新家疯狂留言,进行残酷的压力测试,看看能不能把它刷爆,呵呵。 
            我的GAE主页是:http://myqiao-app.appspot.com/exercise/ 
             
             
            下图是配额使用情况表: 
             
             
            
            
             Requests
            
            
            Quotas are reset every 24 hours. Next reset: 2 hours 
             
             
              
              
            
             
                
                
                
                
                
                
                
                    
                        | Resource | 
                        Daily Quota | 
                        Rate   | 
                     
                
                
                    
                        | CPU Time | 
                        
                        
                         | 
                        0% | 
                        0.06 of 46.30 CPU hours | 
                        Okay | 
                     
                    
                        | Requests | 
                        
                        
                         | 
                        0% | 
                        339 of 1333328 | 
                        Okay | 
                     
                    
                        | Outgoing Bandwidth | 
                        
                        
                         | 
                        0% | 
                        0.01 of 10.00 GBytes | 
                        Okay | 
                     
                    
                        | Incoming Bandwidth | 
                        
                        
                         | 
                        0% | 
                        0.00 of 10.00 GBytes | 
                        Okay | 
                     
                    
                        | Secure Requests | 
                        
                        
                         | 
                        0% | 
                        0 of 1333328 | 
                        Okay | 
                     
                    
                        | Secure Outgoing Bandwidth | 
                        
                        
                         | 
                        0% | 
                        0.00 of 10.00 GBytes | 
                        Okay | 
                     
                    
                        | Secure Incoming Bandwidth | 
                        
                        
                         | 
                        0% | 
                        0.00 of 10.00 GBytes | 
                        Okay | 
                     
                
             
            
              
              
            Datastore
              
              
            
             
                
                
                
                
                
                
                
                    
                        | Datastore API Calls | 
                        
                        
                         | 
                        0% | 
                        1607 of 10368000 | 
                        Okay | 
                     
                    
                        | Stored Data | 
                        
                        
                         | 
                        0% | 
                        0.00 of 1.00 GBytes | 
                        Okay | 
                     
                    
                        | Data Sent to API | 
                        
                        
                         | 
                        0% | 
                        0.00 of 12.00 GBytes | 
                        Okay | 
                     
                    
                        | Data Received from API | 
                        
                        
                         | 
                        0% | 
                        0.01 of 116.00 GBytes | 
                        Okay | 
                     
                    
                        | Datastore CPU Time | 
                        
                        
                         | 
                        0% | 
                        0.04 of 62.11 CPU hours | 
                        Okay | 
                     
                
             
            
              
              
            Mail
              
              
            
             
                
                
                
                
                
                
                
                    
                        | Mail API Calls | 
                        
                        
                         | 
                        0% | 
                        0 of 7000 | 
                        Okay | 
                     
                    
                        | Recipients Emailed | 
                        
                        
                         | 
                        0% | 
                        0 of 2000 | 
                        Okay | 
                     
                    
                        | Admins Emailed | 
                        
                        
                         | 
                        0% | 
                        0 of 5000 | 
                        Okay | 
                     
                    
                        | Message Body Data Sent | 
                        
                        
                         | 
                        0% | 
                        0.00 of 0.06 GBytes | 
                        Okay | 
                     
                    
                        | Attachments Sent | 
                        
                        
                         | 
                        0% | 
                        0 of 2000 | 
                        Okay | 
                     
                    
                        | Attachment Data Sent | 
                        
                        
                         | 
                        0% | 
                        0.00 of 0.10 GBytes | 
                        Okay | 
                     
                
             
            
              
              
            UrlFetch
              
              
            
             
                
                
                
                
                
                
                
                    
                        | UrlFetch API Calls | 
                        
                        
                         | 
                        0% | 
                        16 of 657084 | 
                        Okay | 
                     
                    
                        | UrlFetch Data Sent | 
                        
                        
                         | 
                        0% | 
                        0.00 of 4.00 GBytes | 
                        Okay | 
                     
                    
                        | UrlFetch Data Received | 
                        
                        
                         | 
                        0% | 
                        0.00 of 4.00 GBytes | 
                        Okay | 
                     
                
             
            
              
              
            Image Manipulation
              
              
            
             
                
                
                
                
                
                
                
                    
                        | Image Manipulation API Calls | 
                        
                        
                         | 
                        0% | 
                        0 of 864000 | 
                        Okay | 
                     
                    
                        | Data Sent to API | 
                        
                        
                         | 
                        0% | 
                        0.00 of 1.00 GBytes | 
                        Okay | 
                     
                    
                        | Data Received from API | 
                        
                        
                         | 
                        0% | 
                        0.00 of 5.00 GBytes | 
                        Okay | 
                     
                    
                        | Transformations executed | 
                        
                        
                         | 
                        0% | 
                        0 of 2592000 | 
                        Okay | 
                     
                
             
            
              
              
            Memcache
              
              
            
             
                
                
                
                
                
                
                
                    
                        | Memcache API Calls | 
                        
                        
                         | 
                        0% | 
                        0 of 8640000 | 
                        Okay | 
                     
                    
                        | Data Sent to API | 
                        
                        
                         | 
                        0% | 
                        0.00 of 10.00 GBytes | 
                        Okay | 
                     
                    
                        | Data Received from API | 
                        
                        
                         | 
                        0% | 
                        0.00 of 50.00 GBytes | 
                        Okay | 
                     
                
             
            
              
              
            Deployments
              
              
            
             
                
                
                
                
                
                
                
                    
                        | Deployments | 
                        
                        
                         | 
                        4% | 
                        9 of 250 | 
                        Okay | 
                     
                
             
             
            
             | 
        
    
	posted on 2009-05-09 14:28 
左洸 阅读(3064) 
评论(7)  编辑  收藏