<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>app-engine &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/app-engine/</link>
	<description>Feed of posts on WordPress.com tagged "app-engine"</description>
	<pubDate>Sat, 28 Nov 2009 20:27:04 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[App Engine: plataforma de clouding computing da Google]]></title>
<link>http://flaviomoraes.wordpress.com/2009/11/22/app-engine-plataforma-de-clouding-computing-da-google/</link>
<pubDate>Sun, 22 Nov 2009 22:57:17 +0000</pubDate>
<dc:creator>flaviomoraes</dc:creator>
<guid>http://flaviomoraes.wordpress.com/2009/11/22/app-engine-plataforma-de-clouding-computing-da-google/</guid>
<description><![CDATA[Olá a todos,     A partir desse post começaremos a explorar também o App Engine, que é a plataforma ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Olá a todos,</p>
<p>    A partir desse post começaremos a explorar também o <a href="http://code.google.com/intl/pt-BR/appengine/">App Engine</a>, que é a plataforma de <em>clouding computing</em> do Google. Essa plataforma tem muitos conceitos parecidos com o Windows Azure pois ambas plataformas hospedam nossas aplicações em um ambiente altamente escalável, disponível e que podemos comprar sob demanda. No App Engine também podemos hospedar nossas aplicações web compostas de camada de apresentação, que são executadas na máquina cliente, e de camada de negócios, que é executada nos servidores do Google. Essa plataforma também possui um mecanismo de armazenamento de dados próprio, semelhantes às <em>tables</em> do <em>Windows Azure Storage</em>, projetado para suportar aplicações com enorme quantidade de usuários simultâneos e com alta performance.</p>
<p>    Podemos utilizar Java ou Python para desenvolver as aplicações que serão hospedadas no App Engine. Nos posts utilizarei somente Java, porém ambas as linguagem possuem todos os recursos da plataforma App Engine disponíveis, semelhante ao C# e VB .Net na plataforma Microsoft. Para os leitores que como eu escolherem desenvolver as aplicações em Java recomendo utilizarem o <a href="http://www.eclipse.org/downloads/">eclipse</a>, pois há um plugin para esse IDE que auxilia nas tarefas rotineiras dos projetos.</p>
<p>    Após instalar o eclipse devemos instalar os pacotes para desenvolvimento em Java. No meu caso instalei os seguintes pacotes nessa ordem: <em>java_ee_sdk-5_07-jdk-6u16-windows, jre-6u16-windows-i586, java_ee_sdk-5_04-windows_nojdk, java-tools</em>. Após a instalação desses componentes podemos instalar o plugin do App Engine que adicionará no eclipse os seus <em>templates</em>. Duas vantagens da plataforma da Google é que ela possui a documentação básica em diversos idiomas, entre eles <a href="http://code.google.com/intl/pt-BR/appengine/articles/">português</a>, e que podemos utilizar uma determinada quantidade de espaço e tráfego sem custo. Com isso podemos estudar e praticar o desenvolvimento de aplicações para essa plataforma sem custos. Porém até o momento localizei somente a documentação básica e poucos exemplos com código fonte disponíveis, talvez porque comecei explorar essa plataforma a pouco tempo.</p>
<p>    Um pacote que tem me auxiliado no desenvolvimento dos testes é o <a href="http://code.google.com/intl/pt-BR/webtoolkit/">Google Web Toolkit</a>. Esse pacote provê objetos para compor a camada de apresentação e para montar a comunicação entre essa camada e a camada de negócio. Algo semelhante como utilizar ASP .Net com serviços em WCF, porém com protocolo de comunicação proprietário.</p>
<p>    Como já acontece com os posts sobre a plataforma Microsoft colocarei os códigos fonte dos exemplos utilizados na construção dos posts. No futuro pretendo praticar também a integração entre essas plataformas.</p>
<p>Abraço a todos e até o próximo post.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Email in ingresso con Google App Engine]]></title>
<link>http://mezzomondo.wordpress.com/2009/11/09/email-in-ingresso-con-google-app-engine/</link>
<pubDate>Mon, 09 Nov 2009 15:16:27 +0000</pubDate>
<dc:creator>Miki</dc:creator>
<guid>http://mezzomondo.wordpress.com/2009/11/09/email-in-ingresso-con-google-app-engine/</guid>
<description><![CDATA[Da circa un mese Google ha messo a disposizione una feature utilissima per la sua omnipiattaforma fa]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Da circa un mese Google ha messo a disposizione una feature utilissima per la sua omnipiattaforma fasotutomì App Engine: la mail in ingresso (<a href="http://googleappengine.blogspot.com/2009/10/app-engine-sdk-126-released-with.html">qui l&#8217;annuncio sul blog ufficiale</a>).</p>
<p>Siccome sulla documentazione c&#8217;è scritto e non c&#8217;è scritto, anche se è semplicissimo pubblico qui tutto quanto è necessario alla fruizione di questa utilissima feature, e lo faccio con Python che <del datetime="2009-11-09T14:46:08+00:00">Java mi fa cagare</del> in Java non lo so fare.</p>
<p>Per prima cosa bisogna annunciare ad App Engine di voler ricevere email e bisogna pure dirgli quale sarà lo script che le andrà a gestire. nulla di nuovo, si fa tutto da app.yaml</p>
<pre class="brush: python;">
application: superfigatadapaura
version: 1
runtime: python
api_version: 1

inbound_services:
- mail

handlers:
- url: /_ah/mail/.+
  script: handle_mail.py

- url: .*
  script: main.py
</pre>
<p>Con la direttiva &#8216;inbound_services&#8217; si attiva la mail in ingresso che di default è disabilitata, con il primo url handler si gestiscono le richieste POST che arrivano all&#8217;applicazione, sì perché la mail in ingresso viene magicamente trasformata in richieste POST all&#8217;url http://<em>appid</em>.appspot.com/_ah/mail/<em>qualchecosa</em>@<em>appid</em>.appspotmail.com. Occhio che gli url handlers vengono gestiti a cascata per cui l&#8217;acchiappatutto &#8216;.*&#8217; deve rimanere per ultimo, pena ore di punti interrogativi che si innestano nelle meningi.</p>
<p>Magia o non magia le richieste POST non vengono però gestite come normali richieste POST ma vengono gestite con un&#8217;apposita classe (InboundMailHandler) che si occupa del parsing del messaggio e che noi andremo a derivare in quasi perfetta analogia con quello che capitava con RequestHandler:</p>
<pre class="brush: python;">
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.webapp import mail_handlers

class MailHandler(mail_handlers.InboundMailHandler):
        def receive(self, message):
                # Tutto qui. La variabile message che è di tipo InboundEmailMessage
                # contiene l'email e possiede le seguenti proprietà:
                # message.subject
                # message.sender
                # message.to
                # message.cc
                # message.date
                # message.bodies
                # message.attachments

def main():
        application = webapp.WSGIApplication([('/_ah/mail/.+', MailHandler)], debug=True)
        wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
        main()
</pre>
<p>Due ultime osservazioni. La prima è che il metodo di cui fare l&#8217;override non è post() ma receive(), la seconda è che &#8216;bodies&#8217; ritorna una lista di bodies (chi lo avrebbe mai detto) e ciascun body si può estrarre attraverso il metodo bodies() (questa sì che è una filastrocca da insegnare ai bambini!).</p>
<p>Per fare una prova è sufficiente spedire una normale email a graziemikiperilbellissimopost@<em>appid</em>.appspotmail.com</p>
<p><a href="http://code.google.com/intl/it/appengine/docs/python/mail/receivingmail.html">Link alla documentazione ufficiale</a> (dove c&#8217;è scritto e non c&#8217;è scritto).</p>
<p>Update del 10 novembre 2009:</p>
<p>Sempre a proposito della documentazione un po&#8217; carente, oggi sono venuto alle mani con gli attributi &#8216;bodies&#8217; e &#8216;attachments&#8217; che si comportano in modo leggermente diverso da quanto mi aspettavo (attenzione: non necessariamente si comportano diversamente da quello che c&#8217;è scritto &#8211; anche se -, solo si comportano diversamente da quello che io mi aspettavo).<br />
L&#8217;attributo &#8216;bodies&#8217; ritorna una lista di tuple (e non una lista di bodies), ciascuna delle quali ha come primo membro il content type e come secondo membro un oggetto di tipo google.appengine.api.mail.EncodedPayload che non è mica una stringa come stavate già pensando sfregando tra loro le vostre manine. Per fortuna la stringa la ottengo applicando il metodo decode() a questo oggetto. La cosa triste è che anche bodies() ritorna un generatore che fornisce una tupla di questo tipo.</p>
<pre class="brush: python;">
# ritorna ('text/plain', istanza.di.EncodedPayload)
plaintext = message.bodies(content_type='text/plain')
for body in bodies:
        fa_qualcosa((body[1].decode()) # metodo decode()
</pre>
<p>L&#8217;attributo &#8216;attachments&#8217; funziona in modo analogo anche se <del datetime="2009-11-10T13:11:59+00:00">perfino più a cazzo</del> con le dovute differenze. Anzitutto l&#8217;attributo potrebbe non essere presente del tutto, e se abbiamo intenzione di gestire allegati dobbiamo fare subito un controllo. Se l&#8217;allegato è uno solo viene ficcato in una tupla (&#8216;nomefile&#8217;, contenuto.come.istanza.di.EncodedPayload), se invece sono più di uno viene generata una lista di tuple di questo tipo. Va a finire che bisogna scrivere roba tipo:</p>
<pre class="brush: python;">
allegati = None
if hasattr(message, 'attachments'):
        if isinstance(message.attachments, tuple):
                allegati = [message.attachments]
        else:
                allegati = message.attachments
        for a in allegati:
                # Per ogni allegato abbiamo in
                # a[0] il nome file ed in
                # a[1].decode() il contenuto del file
</pre>
<p>Update dell&#8217;11 novembre 2009:</p>
<p>Lo dicevo che la gestione degli attachments era <del datetime="2009-11-11T14:38:07+00:00">perfino più a cazzo</del> analoga a quella dei bodies ma con differenze fondamentali ed infatti il metodo decode() non funziona. C&#8217;è una segnalazione di bug, la <a href="http://code.google.com/p/googleappengine/issues/detail?id=2289">2289</a>, baco che viene dato per <em>fixed</em> ma che non lo è. Per fare correttamente il decode dell&#8217;EncodedPayload che contiene l&#8217;allegato, accogliendo il suggerimento presente nella pagina di segnalazione dll&#8217;errore, bisogna quindi creare una nostra funzioncina:</p>
<pre class="brush: python;">
def goodDecode(encodedPayload):
        encoding = encodedPayload.encoding
        payload = encodedPayload.payload
        if encoding and encoding.lower() != '7bit':
                payload = payload.decode(encoding)
        return payload
</pre>
<p>Mettendo tutto assieme avremmo quindi:</p>
<pre class="brush: python;">
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.webapp import mail_handlers

def goodDecode(encodedPayload):
        encoding = encodedPayload.encoding
        payload = encodedPayload.payload
        if encoding and encoding.lower() != '7bit':
                payload = payload.decode(encoding)
        return payload

class MailHandler(mail_handlers.InboundMailHandler):
        def receive(self, message):
                # Tutto qui. La variabile message che è di tipo InboundEmailMessage
                # contiene l'email e possiede le seguenti proprietà:
                # message.subject
                # message.sender
                # message.to
                # message.cc
                # message.date
                # message.bodies
                # message.attachments
                plaintext = message.bodies(content_type='text/plain')
                for body in bodies:
                           fa_qualcosa((body[1].decode())
                allegati = None
                if hasattr(message, 'attachments'):
                        if isinstance(message.attachments, tuple):
                                allegati = [message.attachments]
                        else:
                                allegati = message.attachments
                        for a in allegati:
                                # Per ogni allegato abbiamo in
                                # a[0] il nome file ed in
                                # goodDecode(a[1]) il contenuto del file

def main():
        application = webapp.WSGIApplication([('/_ah/mail/.+', MailHandler)], debug=True)
        wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
        main()
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Pluggable App Engine e-mail backends for Django]]></title>
<link>http://andialbrecht.wordpress.com/2009/11/04/pluggable-app-engine-e-mail-backends-for-django/</link>
<pubDate>Wed, 04 Nov 2009 08:16:30 +0000</pubDate>
<dc:creator>Andi Albrecht</dc:creator>
<guid>http://andialbrecht.wordpress.com/2009/11/04/pluggable-app-engine-e-mail-backends-for-django/</guid>
<description><![CDATA[Yesterday support for pluggable e-mail backends has landed in Django&#8217;s trunk and today I]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Yesterday support for <a href="http://code.djangoproject.com/ticket/10355">pluggable e-mail backends</a> has <a href="http://code.djangoproject.com/changeset/11709">landed</a> in Django&#8217;s trunk and today I&#8217;m happy to announce two e-mail backend implementations to be used with Django-based App Engine applications.</p>
<p>The e-mail backends allow you to use native Django functions for sending e-mails like <tt>django.core.mail.send_mail()</tt> on App Engine.</p>
<p>To use pluggable e-mail backends you&#8217;ll have to use a recent version of Django. Support for pluggable e-mail backends was introduced in <a href="http://code.djangoproject.com/changeset/11709">rev11709</a> and will be released in Django 1.2.</p>
<h2>Using the e-mail backend</h2>
<p>The e-mail backends are available as a single package on bitbucket. To check out the most recent sources run:</p>
<p>
<pre>$ hg clone http://bitbucket.org/andialbrecht/appengine_emailbackends/</pre>
</p>
<p>or got to the <a href="http://bitbucket.org/andialbrecht/appengine_emailbackends/downloads/">downloads page</a> and grab a <a href="http://bitbucket.org/andialbrecht/appengine_emailbackends/get/tip.zip">zip</a> file.</p>
<p>To use the e-mail backend for App Engine copy the <tt>appengine_emailbackend</tt> directory to the top-level directory of you App Engine application and add the following line to your settings.py:</p>
<p>
<pre>EMAIL_BACKEND = 'appengine_emailbackend'</pre>
</p>
<p>If you prefer asynchronous e-mail delivery use this line in your settings.py instead:</p>
<p>
<pre>EMAIL_BACKEND = 'appengine_emailbackend.async'</pre>
</p>
<p>When using the async backend e-mails will not be sent immediately but delivered via a taskqueue.</p>
<h2>Running the demo application</h2>
<p>There&#8217;s also a demo application included in this repository. Run this application using</p>
<p>
<pre>$ dev_appserver.py .</pre>
</p>
<p>and open <a href="http://localhost:8080">http://localhost:8080</a> in your web browser. Remember to include a current checkout of the Django SVN repository in the top-level directory of the demo application.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Creating a wave robot]]></title>
<link>http://benbiddington.wordpress.com/2009/10/18/creating-a-wave-robot/</link>
<pubDate>Sun, 18 Oct 2009 09:53:37 +0000</pubDate>
<dc:creator>benbiddington</dc:creator>
<guid>http://benbiddington.wordpress.com/2009/10/18/creating-a-wave-robot/</guid>
<description><![CDATA[Download Eclipse Java EE IDE, and follow the instructions for getting all of the AppEngine plugins. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Download Eclipse Java EE IDE, and follow the instructions for getting all of the <em>AppEngine</em> plugins. It&#8217;s important to get these because it simplifies the deployment process to single click.</p>
<ol>
<li><span style="background-color:#ffffff;">Create a new <strong>web application</strong> project.</span></li>
<li><span style="background-color:#ffffff;">Download all of the <em><a id="project_summary_link" style="text-decoration:none;color:#000000;" href="http://code.google.com/p/wave-robot-java-client/">Wave Robot Java Client Library</a> </em>jars from <a href="http://code.google.com/p/wave-robot-java-client/downloads/list" target="_blank">here</a>. </span>
<ol>
<li><span style="background-color:#ffffff;">Copy them to your<strong> /war/WEB-INF/lib</strong> directory.</span></li>
<li><span style="background-color:#ffffff;">Reference them (Alt + Enter &#62; Java Build Path &#62; Libraries &#62; Add JARS&#8230;).<br />
If successful, they&#8217;ll appear in a <em>Referenced Libraries</em> node in <em>Package Explorer</em>.</span></li>
</ol>
</li>
</ol>
<h2><strong>Edit web.xml</strong></h2>
<p>Add an endpoint for Wave to post to:</p>
<pre>&#60;servlet&#62;
    &#60;servlet-name&#62;SearchServlet&#60;/servlet-name&#62;
    &#60;servlet-class&#62;org.coriander.wave.sevendigital.servlets.search.SearchServlet&#60;/servlet-class&#62;
&#60;/servlet&#62;
&#60;servlet-mapping&#62;
    &#60;servlet-name&#62;SearchServlet&#60;/servlet-name&#62;
    &#60;url-pattern&#62;/_wave/robot/jsonrpc&#60;/url-pattern&#62;
&#60;/servlet-mapping&#62;</pre>
<p>We now have a handler for incoming wave requests. All wave requests will be routed to <em>SearchServlet</em>.</p>
<h2>Add capabilities.xml</h2>
<p>Registers servlets for wave events, add one to your <strong>/war/_wave</strong> directory:</p>
<pre>&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;w:robot xmlns:w="http://wave.google.com/extensions/robots/1.0"&#62;
  &#60;w:capabilities&#62;
    &#60;w:capability name="WAVELET_PARTICIPANTS_CHANGED" content="true" /&#62;
    &#60;w:capability name="BLIP_SUBMITTED" content="true" /&#62;
  &#60;/w:capabilities&#62;
  &#60;w:version&#62;1&#60;/w:version&#62;
&#60;/w:robot&#62;</pre>
<h2>Implementing a robot servlet</h2>
<p>Very easy, derive from <em>com.google.wave.api.AbstractRobotServlet, </em>which has a single method:</p>
<pre>import com.google.wave.api.AbstractRobotServlet;
import com.google.wave.api.RobotMessageBundle;

public class SearchServlet extends AbstractRobotServlet {
    @Override
    public void processEvents(RobotMessageBundle bundle) { }
}</pre>
<p>There are numerous tutorials around describing what to do next.</p>
<h2>Setting robot profile image</h2>
<p>This amounts to adding the root <em>/_wave/robot/profile</em> endpoint. There easiest way to do this is to derive a servlet from <a href="http://wave-robot-java-client.googlecode.com/svn/trunk/doc/com/google/wave/api/ProfileServlet.html" target="_blank">com.google.wave.api.ProfileServlet</a>, and override any of the methods you choose.</p>
<p>To set the avatar image, override <em>getRobotAvatarUrl</em>:</p>
<pre>import com.google.wave.api.ProfileServlet;
...
public class Profile extends ProfileServlet {
    @Override
    public String getRobotAvatarUrl() {
        return "http://coriander-7digital.appspot.com/_wave/coriander-7digital.png;
    }
}</pre>
<p>And then place your image your<strong> /war/_wave</strong> directory. There are other useful settings like display name which can also be provided by override. The default content type of ProfileServlet-derive types is <em>application/json</em>.</p>
<p>Don&#8217;t forget to register the new servlet by updating web.xml.</p>
<h2>Deployment</h2>
<p>Very simple, it&#8217;s all done by the IDE.</p>
<h2>References</h2>
<ul>
<li><span style="background-color:#ffffff;"><a href="http://code.google.com/apis/wave/extensions/robots/java-tutorial.html" target="_blank">Google Wave Robots: Java Tutorial</a>. </span></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Dominion Set Designer]]></title>
<link>http://andialbrecht.wordpress.com/2009/10/11/dominion-set-designer/</link>
<pubDate>Sun, 11 Oct 2009 13:40:31 +0000</pubDate>
<dc:creator>Andi Albrecht</dc:creator>
<guid>http://andialbrecht.wordpress.com/2009/10/11/dominion-set-designer/</guid>
<description><![CDATA[If you&#8217;re a regular Dominion player like me, you&#8217;re always in search for new card sets. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you&#8217;re a regular Dominion player like me, you&#8217;re always in search for new card sets. Fortunately I&#8217;ve had a little time this weekend to write a simple App Engine application that gives me a random card set on demand.</p>
<p><a href="http://andialbrecht.wordpress.com/files/2009/10/screenshot.jpg"><img class="aligncenter size-medium wp-image-332" title="Screenshot" src="http://andialbrecht.wordpress.com/files/2009/10/screenshot.jpg?w=300" alt="Screenshot" width="300" height="206" /></a>You can see it in action at <a href="http://dominionsets.appspot.com">http://dominionsets.appspot.com</a></p>
<p>That&#8217;s it, just a short post on this, now back to the next match <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="background-color:#ffffff;">P.s.: Some technical stuff&#8230; There&#8217;s Django with it&#8217;s i18n support under the hood. The UI is powered by JQuery.</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google App Engine]]></title>
<link>http://fabianovaz.wordpress.com/2009/10/10/google-app-engine/</link>
<pubDate>Sat, 10 Oct 2009 14:05:19 +0000</pubDate>
<dc:creator>fabianovaz</dc:creator>
<guid>http://fabianovaz.wordpress.com/2009/10/10/google-app-engine/</guid>
<description><![CDATA[Em Abril assistir uma palestra no CIn/UFPE sobre a poderosa Google, por um colaborador da mesma. Hoj]]></description>
<content:encoded><![CDATA[Em Abril assistir uma palestra no CIn/UFPE sobre a poderosa Google, por um colaborador da mesma. Hoj]]></content:encoded>
</item>
<item>
<title><![CDATA[Google App Engine]]></title>
<link>http://manuelmax.wordpress.com/2009/10/05/google-app-engine/</link>
<pubDate>Tue, 06 Oct 2009 04:00:24 +0000</pubDate>
<dc:creator>manuelmax</dc:creator>
<guid>http://manuelmax.wordpress.com/2009/10/05/google-app-engine/</guid>
<description><![CDATA[Ejecuta tus aplicaciones web en la infraestructura de Google. Fácil de crear, de mantener y de ampli]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><b>Ejecuta tus aplicaciones web en la infraestructura de Google.</b><br />
Fácil de crear, de mantener y de ampliar.</p>
<div id="attachment_164" class="wp-caption aligncenter" style="width: 152px"><img src="http://manuelmax.wordpress.com/files/2009/10/appengine_lowres.gif" alt="logo de google app engine" title="appengine_lowres" width="142" height="109" class="size-full wp-image-164" /><p class="wp-caption-text">logo de google app engine</p></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[GAE Testbed Documentation Released]]></title>
<link>http://jgeewax.wordpress.com/2009/10/06/gae-testbed-documentation-released/</link>
<pubDate>Tue, 06 Oct 2009 03:38:58 +0000</pubDate>
<dc:creator>JJG</dc:creator>
<guid>http://jgeewax.wordpress.com/2009/10/06/gae-testbed-documentation-released/</guid>
<description><![CDATA[I&#8217;d been looking to get familiar with Sphinx for a while, and couldn&#8217;t ever seem to find]]></description>
<content:encoded><![CDATA[I&#8217;d been looking to get familiar with Sphinx for a while, and couldn&#8217;t ever seem to find]]></content:encoded>
</item>
<item>
<title><![CDATA[Redoing Guestbook example with Stripes]]></title>
<link>http://110j.wordpress.com/2009/09/20/redoing-guestbook-example/</link>
<pubDate>Sun, 20 Sep 2009 17:48:29 +0000</pubDate>
<dc:creator>Omer Haderi</dc:creator>
<guid>http://110j.wordpress.com/2009/09/20/redoing-guestbook-example/</guid>
<description><![CDATA[Google has created an example on how to use google app engine with java. In this example they demons]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Google has created an example on how to use google app engine with java. In this example they demonstrate the basic usage of Servlet API and JDO, it&#8217;s a simple example that stores, retrieves and renders entities in google app engine.<br />
After the <a href="http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/" target="_blank">first tutorial</a> on how to deploy Stripes in google app engine I decided to re-write this example using the Stripes framework of course.</p>
<p><a href="http://guestbook-stripes.googlecode.com/files/Guestbook.zip" target="_self"><strong>Download the source code!</strong></a></p>
<p>Steps:</p>
<p>1. Create a project and name it Guestbook</p>
<p>2. Follow the <a href="http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/" target="_blank">Getting started with Stripes and google app engine</a> to configure Stripes</p>
<p>3. Add the JSTL jars (standard.jar and jstl.jar) in the lib directory</p>
<p>4. Create an ActionBean that will handle the greeting requests</p>
<blockquote>
<pre><code>
package com.guestbook.action;

import java.util.Date;
import java.util.List;

import javax.jdo.PersistenceManager;

import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.guestbook.manager.PMF;
import com.guestbook.model.Greeting;

/**
 * @author 110j
 */
public class GreetingActionBean implements ActionBean {
	private static final String VIEW = "/guestbook.jsp";
	private ActionBeanContext ctx;
	private UserService userService = UserServiceFactory.getUserService();
	private Greeting greeting;

	@DefaultHandler
	public Resolution welcome() {
		return new ForwardResolution(VIEW);
	}

	public Resolution addGreeting() {
		if (greeting != null) {
			greeting.setAuthor(getUser());
			greeting.setDate(new Date());

			PersistenceManager pm = PMF.get().getPersistenceManager();
	        try {
	            pm.makePersistent(greeting);
	        } finally {
	            pm.close();
	        }
		}
		return new ForwardResolution(VIEW);
	}

	public Resolution signin() {
		ForwardResolution fd = new ForwardResolution(VIEW);
		if (!userService.isUserLoggedIn())
			fd = new ForwardResolution(userService.createLoginURL("/Greeting.action"));
		return fd;
	}

	public Resolution signout() {
		ForwardResolution ForwardResolution "&#62;fd = new ForwardResolution(VIEW);
		if (userService.isUserLoggedIn())
			fd = new ForwardResolution(userService.createLogoutURL("/Greeting.action"));
		return fd;
	}

	@SuppressWarnings("unchecked")
	public List getGreetings() {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		String query = "select from " + Greeting.class.getName() + " order by date desc range 0,5";
	    return (List) pm.newQuery(query).execute();
	}

	public Greeting getGreeting() {
		return greeting;
	}

	public void setGreeting(Greeting greeting) {
		this.greeting = greeting;
	}

	public User getUser() {
		return userService.getCurrentUser();
	}

	public ActionBeanContext getContext() {
		return this.ctx;
	}

	public void setContext(ActionBeanContext ctx) {
		this.ctx = ctx;
	}
}
</code></pre>
</blockquote>
<p>5. Create the model class called Greeting (as described in the google example, no changes here!)</p>
<blockquote>
<pre><code>
package com.guestbook.model;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Greeting {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private User author;

    @Persistent
    private String content;

    @Persistent
    private Date date;

    public Greeting() {}

    public Greeting(User author, String content, Date date) {
        this.author = author;
        this.content = content;
        this.date = date;
    }

    public Long getId() {
        return id;
    }

    public User getAuthor() {
        return author;
    }

    public String getContent() {
        return content;
    }

    public Date getDate() {
        return date;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
</code></pre>
</blockquote>
<p>6. Create the utility class that will instantiate the EntityManager (no changes here also!)</p>
<blockquote>
<pre><code>package com.guestbook.manager;
import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

public final class PMF {
    private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

    private PMF() {}

    public static PersistenceManagerFactory get() {
        return pmfInstance;
    }
}
</code></pre>
</blockquote>
<p>7. Modify the guestbook.jsp, there are a lot of changes here since in their example google uses scriptlets, I have replaced the scriptlets with jstl tags and Stripes tags, all the logic has moved to the ActionBean.</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh4.ggpht.com/_zJMWXmr_TzU/SrY15HMZ85I/AAAAAAAAACg/yvsAnK5kwi8/s800/guest_book.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>8. Modify the welcome file list in the web.xml and set as welcome file the <strong>Greeting.action</strong></p>
<p><a href="http://guestbook-stripes.googlecode.com/files/Guestbook.zip" target="_self"><strong>Download the source code!</strong></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[First Version of GAE Testbed Released]]></title>
<link>http://jgeewax.wordpress.com/2009/09/20/gae-testbed/</link>
<pubDate>Sat, 19 Sep 2009 22:33:56 +0000</pubDate>
<dc:creator>JJG</dc:creator>
<guid>http://jgeewax.wordpress.com/2009/09/20/gae-testbed/</guid>
<description><![CDATA[I was writing a whole suite of tests for a project I built for Google App Engine, and the tests were]]></description>
<content:encoded><![CDATA[I was writing a whole suite of tests for a project I built for Google App Engine, and the tests were]]></content:encoded>
</item>
<item>
<title><![CDATA[Getting started with Stripes &amp; Google App Engine ]]></title>
<link>http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/</link>
<pubDate>Sat, 19 Sep 2009 01:29:48 +0000</pubDate>
<dc:creator>Omer Haderi</dc:creator>
<guid>http://110j.wordpress.com/2009/09/19/getting-started-with-stripes-google-app-engine/</guid>
<description><![CDATA[This is a basic example of using Stripes Framework with the cloud infrastructure of Google. I am usi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is a basic example of using Stripes Framework with the cloud infrastructure of Google. I am using Stripes in one of my projects that I am thinking to move it to google app engine so I decided to experiment before the migration. More posts will follow in this topic as I progress with it. The first objective is to create the basic project structure, configure and deploy, well&#8230; a hello world web application. This is a trivial application but there are some limitations using google app engine so trying to use the framework as is will fail with some non-sense stack traces.</p>
<p>The following is a list of things that we will be need to complete this application:<br />
1. Stripes Framework (home page: <a href="http://www.stripesframework.org/display/stripes/Home" target="_blank">http://www.stripesframework.org/display/stripes/Home</a> )<br />
2. Google app engine sdk &#8211; if you use eclipse and google plugin the sdk is included in the plugin.<br />
3. Eclipse (you can use whatever IDE or environment you like, it&#8217;s not mandatory to use eclipse, it&#8217;s just easier).</p>
<p>Note: For information on how to install the google plugin visit <a href="http://code.google.com/appengine/docs/java/tools/eclipse.html" target="_blank">http://code.google.com/appengine/docs/java/tools/eclipse.html</a></p>
<p>I assume you are familiar with java web frameworks and that you will use eclipse with the google plugin.</p>
<p>The first step is to create a project in the eclipse IDE:<br />
<img class="alignnone" title="new project" src="http://lh3.ggpht.com/_zJMWXmr_TzU/SrQo4zxDU-I/AAAAAAAAABo/QpE0JFRNJd4/s800/1_new_project.png" alt="" width="605" height="580" /></p>
<p>Give a name to the project and an initial package name. For the moment we do not need GWT so just deselect it.<br />
<img class="alignnone" title="settings" src="http://lh3.ggpht.com/_zJMWXmr_TzU/SrQo5LvetyI/AAAAAAAAABs/H5xuyMV2cIk/s800/2_project_settings.png" alt="" width="605" height="671" /></p>
<p>After pressing finish we have the following project structure.<br />
<img class="alignnone" title="structure" src="http://lh4.ggpht.com/_zJMWXmr_TzU/SrQo5Fq_d2I/AAAAAAAAABw/j8eBGQ_6CoA/s800/3_project_stucture.png" alt="" width="388" height="521" /></p>
<p>Before continuing copy the Stripes jars in the the lib directory under hello_project/web/WEB_INF/lib and add them to the project&#8217;s build path by selecting them, right click-&#62; Build Path -&#62; Add to Build Path. Also copy and paste the StripesResources.properties in the directory &#8220;src&#8221; (not in a package).</p>
<p>By default the google plugin will generate a servlet for us, under the package name that we entered in the previews step. It will also generate the following configuration files:<br />
Servlet spec requirement:<br />
1. web.xml (this is the well known deployment descriptor required by the servlet specification)</p>
<p>Google App engine specific (we will not use them for this application):<br />
1. appengine-web.xml<br />
2. jdoconfig.xml</p>
<p>Logging property files:<br />
1. log4j.properties<br />
2. logging.properties</p>
<p>For the purpose of this trivial application we will only need to edit the web.xml (a.k.a Deployment Descriptor so from know on I will call it DD).<br />
By default the plugin registers the generated servlet in the DD, so open the DD and delete the servlet and servlet-mapping it&#8217;s not needed.</p>
<p>The following is the generated DD that need to be edited:</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh6.ggpht.com/_zJMWXmr_TzU/SrQo5Fd9NuI/AAAAAAAAAB0/YZ-SN85McUU/s800/4_generated_web_xml.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>The following is the new and final DD containing the Stripes filter and dispatcher servlet:</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh4.ggpht.com/_zJMWXmr_TzU/SrQo5cQuGrI/AAAAAAAAAB4/mlWZPJg_79o/s800/5_new_web_xml.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>Note that the web-app tag version has changed from 2.5 to 2.4 there are some jsp exceptions with the 2.5.</p>
<p>The Stripes filter includes two initial parameters the <strong>ActionResolver.Packages </strong>which tells Stripes where to find the ActionBeans (more on this in next post or in Stripes documentation) and the <strong>MultipartWrapperFactory.Class, </strong>a factory class used to upload files, but uploading files is not supported by google app engine and the Stripes filter will fail to initialize. Therefore we need to disable this by providing an empty configuration.</p>
<p>The first step to disable file uploading is to add MultipartWrapperFactory.Class initial parameter to the Stripes filter as shown in the DD and the second step is to create the appropriate class. So create a package in the project (I created the com.helloworld.exclude but you can create anything that make sense for your project) and add the following class:</p>
<blockquote>
<pre><code>
import java.io.IOException;

import javax.servlet.http.HttpServletRequest;

import net.sourceforge.stripes.config.Configuration;
import net.sourceforge.stripes.controller.FileUploadLimitExceededException;
import net.sourceforge.stripes.controller.multipart.MultipartWrapper;
import net.sourceforge.stripes.config.ConfigurableComponent;
import net.sourceforge.stripes.controller.multipart.MultipartWrapperFactory;

/**
 * GAE does not support file uploading so we need to disable this feature from Stripes.
 *
 * @author 110j
 */
public class EmptyMultipartWapper implements ConfigurableComponent, MultipartWrapperFactory {

	/**
	 * @see net.sourceforge.stripes.config.ConfigurableComponent#init(net.sourceforge.stripes.config.Configuration)
	 */
	public void init(Configuration conf) throws Exception {
	}

	/**
	 * @see net.sourceforge.stripes.controller.multipart.MultipartWrapperFactory#wrap(javax.servlet.http.HttpServletRequest)
	 */
	public MultipartWrapper wrap(HttpServletRequest request) throws IOException, FileUploadLimitExceededException {
		return null;
	}
}
</code></pre>
</blockquote>
<p>Now that we disabled the file uploading lets create an ActionBean that will handle our request. Create a package in the project called com.helloworld.action and add the following class:</p>
<blockquote>
<pre><code>
package com.helloworld.action;

import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;

/**
 * The action bean that will handle the our simple request.
 *
 * @author 110j
 */
public class EasyActionBean implements ActionBean {
	private static final String VIEW = "/WEB-INF/jsp/hello_world.jsp";
	private static final String MY_MESSAGE = "hello world";
	private ActionBeanContext ctx;

	private String message;

	@DefaultHandler
	public Resolution showMe() {
		this.setMessage(MY_MESSAGE);
		return new ForwardResolution(VIEW);
	}

	/**
	 * @see net.sourceforge.stripes.action.ActionBean#getContext()
	 */
	public ActionBeanContext getContext() {
		return this.ctx;
	}

	/**
	 * @see net.sourceforge.stripes.action.ActionBean#setContext(ActionBeanContext)
	 */
	public void setContext(ActionBeanContext ctx) {
		this.ctx = ctx;
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}
}
</code></pre>
</blockquote>
<p>Next lets create a jsp file that will render the response, create the hello_world.jsp under WEB_INF/jsp/ and add the following content:</p>
<table style="width:auto;" border="0"><img src="http://lh6.ggpht.com/_zJMWXmr_TzU/SrQpE4WyYSI/AAAAAAAAAB8/3de0C5b5iok/s800/6_hello_world_jsp.png" alt="" /></table>
<p>Finally create a welcome file called index.jsp if it does not exist or rename the index.html to index.jsp and add just a forward to the action:</p>
<table style="width:auto;" border="0">
<tbody>
<tr>
<td><img src="http://lh5.ggpht.com/_zJMWXmr_TzU/SrQpE4_FTbI/AAAAAAAAACA/BPpemvYTUkc/s800/7_index_jsp.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>You can delete the servlet generated by the google plugin there is no need for it.</p>
<p>In order to test it you just need to run the hello_world in the Run history of eclipse as the google plugin will create one for us, or under the run button in the toolbar, and then visit the address localhost:8080</p>
<p>NOTE: if your application require session you need to enable it in the appengine-web.xml since it is disabled by default (but keep in mind the implication it may have in a distributed environment such as google app engine, maybe your attributes will need to implement the HttpSessionActivationListener if you plan to add them in the session).</p>
<p>You can upload your application by using eclipse or the command line tool, for more information visit <a href="http://code.google.com/appengine/docs/java/gettingstarted/uploading.html" target="_blank">http://code.google.com/appengine/docs/java/gettingstarted/uploading.html</a></p>
<p>To be continued!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Services]]></title>
<link>http://research2009.wordpress.com/2009/09/16/services/</link>
<pubDate>Wed, 16 Sep 2009 03:04:14 +0000</pubDate>
<dc:creator>falloutkee</dc:creator>
<guid>http://research2009.wordpress.com/2009/09/16/services/</guid>
<description><![CDATA[Currently I&#8217;m searching on how to create web services in Java&#8211;and make sure that it will]]></description>
<content:encoded><![CDATA[Currently I&#8217;m searching on how to create web services in Java&#8211;and make sure that it will]]></content:encoded>
</item>
<item>
<title><![CDATA[Google AppEngine на Snow Leopard]]></title>
<link>http://iphy.wordpress.com/2009/09/15/google-appengine-%d0%bd%d0%b0-snow-leopard/</link>
<pubDate>Tue, 15 Sep 2009 07:50:10 +0000</pubDate>
<dc:creator>iphy</dc:creator>
<guid>http://iphy.wordpress.com/2009/09/15/google-appengine-%d0%bd%d0%b0-snow-leopard/</guid>
<description><![CDATA[В общем, друзья мои, так и не удалось мне раскачегарить App Engine на Снежном барсе. Редактирование ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://iphy.wordpress.com/files/2009/09/google_appengine.png"><img class="alignleft size-full wp-image-143" title="google_appengine" src="http://iphy.wordpress.com/files/2009/09/google_appengine.png" alt="google_appengine" width="250" height="250" /></a>В общем, друзья мои, так и не удалось мне раскачегарить App Engine на Снежном барсе. Редактирование исходников не помогло. Обходишь одну ошибку, получаешь другую.</p>
<p>В целом все сводится к тому, что в АппЭнджине библиотеки 32-битные, поэтому он отказывается работать, если есть возможность 64-битности. Так как Ява 6 на старом Леопарде была только 64-битной, АппЭнджин проверяет версию Явы. Если она не начинается со строки &#8220;1.5&#8243;, он выдает ошибку.</p>
<p>В интернете я встречал предложения установить 5-ю яву на Snow Leopard. И видел предостережения Эппловских разработчиков этого не делать. Последующие обновления, говорят они, все равно ее снесут.</p>
<p>Так что ж делать? Я ж кул хацкер, так ведь <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  И App Engine мне нужен. И решение я нашел до гениальности простое.</p>
<p>Я попилил жесткий диск на партиции, поставил в одну из них (маленькую, 50 гб) старого Леопарда, и там у меня отлично живет Апп Энджин. То же можно, по-видимому, проделать и в Параллелзах (Parallels desktop), но, мне кажется, будет тормозить.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Sending E-mail on OSX with the App Engine Development Server]]></title>
<link>http://jgeewax.wordpress.com/2009/09/12/sending-e-mail-on-osx-with-the-app-engine-development-server/</link>
<pubDate>Sat, 12 Sep 2009 21:14:45 +0000</pubDate>
<dc:creator>JJG</dc:creator>
<guid>http://jgeewax.wordpress.com/2009/09/12/sending-e-mail-on-osx-with-the-app-engine-development-server/</guid>
<description><![CDATA[I had a lot of trouble figuring out how to get e-mail sending working with the App Engine developmen]]></description>
<content:encoded><![CDATA[I had a lot of trouble figuring out how to get e-mail sending working with the App Engine developmen]]></content:encoded>
</item>
<item>
<title><![CDATA[Nose-GAE runTest no such method ValueError]]></title>
<link>http://jgeewax.wordpress.com/2009/09/05/nose-gae-runtest-no-such-method-valueerror/</link>
<pubDate>Sat, 05 Sep 2009 19:27:41 +0000</pubDate>
<dc:creator>JJG</dc:creator>
<guid>http://jgeewax.wordpress.com/2009/09/05/nose-gae-runtest-no-such-method-valueerror/</guid>
<description><![CDATA[I was having issues getting tests to work with Nose-GAE (&#8211;with-gae) and I figured it out befor]]></description>
<content:encoded><![CDATA[I was having issues getting tests to work with Nose-GAE (&#8211;with-gae) and I figured it out befor]]></content:encoded>
</item>
<item>
<title><![CDATA[利用Google App Engine做自己的在线代理]]></title>
<link>http://mickeywaley.wordpress.com/2009/08/27/%e5%88%a9%e7%94%a8google-app-engine%e5%81%9a%e8%87%aa%e5%b7%b1%e7%9a%84%e5%9c%a8%e7%ba%bf%e4%bb%a3%e7%90%86/</link>
<pubDate>Thu, 27 Aug 2009 11:23:01 +0000</pubDate>
<dc:creator>mickeywaley</dc:creator>
<guid>http://mickeywaley.wordpress.com/2009/08/27/%e5%88%a9%e7%94%a8google-app-engine%e5%81%9a%e8%87%aa%e5%b7%b1%e7%9a%84%e5%9c%a8%e7%ba%bf%e4%bb%a3%e7%90%86/</guid>
<description><![CDATA[这次给大家写个简单的教程,有兴趣的坛友试试. 注册地址: http://appengine.google.com/ 你也可以把这个做你的文件存储,不过限制文件最大为1M 演示: http://lxvo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>这次给大家写个简单的<span>教程</span>,有兴趣的坛友试试.<br />
注册<span>地址</span>: <a href="http://appengine.google.com/" target="_blank">http://appengine.<span>google</span>.com/</a><br />
你也可以把这个做你的<span>文件</span>存储,不过限制文件最大为1M<br />
演示:<br />
http://lxvoip8.appspot.com/static/lxvoipbanner.gif<br />
<img style="display:none;" src="http://lxvoip8.appspot.com/static/lxvoipbanner.gif" border="0" alt="" width="468" height="60" /></p>
<p>1.首先<span>申请</span>Google App Engine的帐号<br />
打开网址:  <a href="http://appengine.google.com/" target="_blank">http://appengine.google.com/</a><br />
Gmail邮箱应该有吧,用你的gmail邮箱和密码登录就可以.</p>
<p><!--more--><br />
2.点击“Create an Application”按钮，开始申请：</p>
<p>3.这里要验证你的手机号码,你输入你的手机号码，手机号码需要填写国际区号，<span>中国</span>的区号是86，如果你的手机号是13088888888，那么就填写 “+8613088888888” 的形式，填写好后点击“Send”按钮.[<strong>只支持中国联通手机</strong>]<br />
你的手机就会收到一条短信，发件人号码是“10655505905518”，短信的内容如下：</p>
<p>Google App Engine Code：1234567 [lxvoip]</p>
<p>将你手机收到的验证码输入,点send. 一个手机号码只能申请一个Google App Engine服务。</p>
<p>4.填完验证码后就是填写一些基本的信息，比如说是<span>域名</span>、站点的名称等等。<br />
如: <a href="http://lxvoip8.appspot.com/" target="_blank">http://lxvoip8.appspot.com/</a><br />
然后确定，就申请成功了。</p>
<p>5.<span>下载</span>SDUpload:<br />
SDUpload是Google App Engine的第三方上传<span>工具</span>,使不懂Google App Engine和python的人也可以轻松上传.<br />
下载地址:<a href="http://www.qiannao.com/space/show/lxvoip/%E4%B8%8A%E4%BC%A0%E5%88%86%E4%BA%AB/2009/5/18/SDUpload.rar/.page" target="_blank">点击进入下载－SDUpload.rar</a><br />
备用下载: <a href="http://p.lxvoip.com/lxfile/SDUpload.rar" target="_blank">http://p.lxvoip.com/lxfile/SDUpload.rar</a></p>
<p>GOOGLE项目备用地址：<a href="http://mickeywaley-blog.googlecode.com/files/SDUpload.rar">http://mickeywaley-blog.googlecode.com/files/SDUpload.rar</a></p>
<p>6.解压,将SDUpload文件夹置于E盘根<span>目录</span>下.找到lxvoip目录下的app.yaml文件,用<span>网页</span><span>设计</span><span>软件</span>dreamweaver打开,将第一行的lxvoip8,改成你的应用名,也就是第四步你所申请的域名.然后保存.你也可以修改lxvoip目录下的main.html文件,使你的<span>首页</span>更加个性化.</p>
<p>7.开始上传,如下图所示,lxvoip文件夹是你要上传的<span>在线</span>代理<span>程序</span>.<br />
运行 cmd<br />
e:<br />
cd SDUPload</p>
<p>SDUPload update lxvoip</p>
<p>接着提示,要你输入你的邮箱,你输入你的gmail邮箱,回车,再输入你的密码,回车.</p>
<p>出现下面的提示,就说明成功了:<br />
Loaded authentication cookies from H:\Documents and Settings\Administrator/.appc<br />
fg_cookies<br />
Scanning files on local disk.<br />
Initiating update.<br />
Email: <a href="mailto:lxvoip@gmail.com">lxvoip@gmail.com</a><br />
Password for <a href="mailto:lxvoip@gmail.com">lxvoip@gmail.com</a>:<br />
Saving authentication cookies to H:\Documents and Settings\Administrator/.appcfg<br />
_cookies<br />
Could not guess mimetype for static/favicon.ico.  Using application/octet-stream<br />
.<br />
Cloning 8 static files.<br />
Cloning 5 application files.<br />
Closing update.<br />
Uploading index definitions.<br />
Error 400: &#8212; begin server output &#8212;<br />
Creating a composite index failed: This index:<br />
entity_type: &#8220;EntryPoint&#8221;<br />
ancestor: false<br />
Property {<br />
name: &#8220;last_updated&#8221;<br />
direction: 2<br />
}<br />
is not necessary, since single-property indices are built in. Please remove it f<br />
rom your index file and upgrade to the latest version of the SDK, if you haven&#8217;t<br />
already.<br />
&#8212; end server output &#8212;<br />
E:\SDUpload&#62;</p>
<p>8.没有问题的话,你就可以打开, <a href="http://lxvoip8.appspot.com/" target="_blank">http://lxvoip8.appspot.com/</a> ,记得将lxvoip8换成你的域名.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[PHP on Google App Engine?]]></title>
<link>http://research2009.wordpress.com/2009/08/10/php-on-google-app-engine/</link>
<pubDate>Mon, 10 Aug 2009 14:25:00 +0000</pubDate>
<dc:creator>falloutkee</dc:creator>
<guid>http://research2009.wordpress.com/2009/08/10/php-on-google-app-engine/</guid>
<description><![CDATA[Bud and I did a little research: While the Google App Engine does not natively support PHP, Quercus]]></description>
<content:encoded><![CDATA[Bud and I did a little research: While the Google App Engine does not natively support PHP, Quercus]]></content:encoded>
</item>
<item>
<title><![CDATA[Why PostgreSQL?]]></title>
<link>http://research2009.wordpress.com/2009/08/10/why-postgresql/</link>
<pubDate>Mon, 10 Aug 2009 14:20:39 +0000</pubDate>
<dc:creator>falloutkee</dc:creator>
<guid>http://research2009.wordpress.com/2009/08/10/why-postgresql/</guid>
<description><![CDATA[Here are few points that bud and I considered: used by major web players such as Yahoo! and Skype su]]></description>
<content:encoded><![CDATA[Here are few points that bud and I considered: used by major web players such as Yahoo! and Skype su]]></content:encoded>
</item>
<item>
<title><![CDATA[Reptile or Coffee?]]></title>
<link>http://research2009.wordpress.com/2009/08/10/reptile-or-coffee/</link>
<pubDate>Mon, 10 Aug 2009 14:12:37 +0000</pubDate>
<dc:creator>falloutkee</dc:creator>
<guid>http://research2009.wordpress.com/2009/08/10/reptile-or-coffee/</guid>
<description><![CDATA[Okay the title&#8217;s a bit lame. Earlier, we were tasked to look for a better cloud than Mor.ph th]]></description>
<content:encoded><![CDATA[Okay the title&#8217;s a bit lame. Earlier, we were tasked to look for a better cloud than Mor.ph th]]></content:encoded>
</item>
<item>
<title><![CDATA[An interesting find ! Google App Engine with Java support]]></title>
<link>http://javabeanz.wordpress.com/2009/08/02/an-interesting-find-google-app-engine-with-java-support/</link>
<pubDate>Sun, 02 Aug 2009 14:47:17 +0000</pubDate>
<dc:creator>Subinkrishna G</dc:creator>
<guid>http://javabeanz.wordpress.com/2009/08/02/an-interesting-find-google-app-engine-with-java-support/</guid>
<description><![CDATA[I was just going through code.google.com, and just find a link titled “App Engine”. I was not at all]]></description>
<content:encoded><![CDATA[I was just going through code.google.com, and just find a link titled “App Engine”. I was not at all]]></content:encoded>
</item>
<item>
<title><![CDATA[asynctools - A Tale of Two Queries]]></title>
<link>http://squeeville.com/2009/07/24/asynctools/</link>
<pubDate>Fri, 24 Jul 2009 21:14:39 +0000</pubDate>
<dc:creator>Jason Collins</dc:creator>
<guid>http://squeeville.com/2009/07/24/asynctools/</guid>
<description><![CDATA[At VendAsta we develop, among other things, social networking applications deployed to Google AppEng]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>At <a href="http://www.vendasta.com/">VendAsta</a> we develop, among other things, <a href="http://www.myfrontsteps.com/">social networking applications</a> deployed to Google AppEngine. One of the aspects of our suite is a feature where users (e.g., Facebook users) can trust experts from our <a href="http://steprep.myfrontsteps.com/">StepRep</a> software.</p>
<p>A desirable, and obvious, feature is to identify the experts that my friends trust, or conversely, which of my friends trust a particular set of experts. From a use case perspective, a lot of this information is jammed on to the screen at one time; that is, we cannot simply query for a single friend or a single expert.</p>
<p>This is a classic graph walk style problem that is relatively easy to scale in a parallel processing environment, but nasty where you can only do serialized queries.</p>
<p>Initially, we felt a bit limited by the AppEngine query model. It is very fast, but only allows for serialized queries.</p>
<p>In reaction, we began investigations into using a MapReduce mechanism to compute these &#8220;trust networks&#8221; offline. Specifically, we were planning on using MapReduce deployed into Amazon&#8217;s Elastic MapReduce engine. The results of these computations were to be stored on Amazon&#8217;s S3 (as JSON docs) and simply accessed statically from our AppEngine applications.</p>
<p>This solution, while sound, suffered some drawbacks. We had a difficult time with dealing with the recomputation of the trust networks. We could choose to recompute them daily, but this was wasteful of resources: many of the networks would be completely unchanged. Alternatively, we could queue jobs when new trusts are formed and process just those, but then we have to develop another job to determine which trust networks cascade from the new trust and need recomputation. The absolute nail in the coffin of this approach is that we (typically) use Facebook to define friend networks and their T&#38;C do not allow the storage of friend relationships for any great amount of time, making offline processing difficult and incomplete at best.</p>
<p>We needed another solution that allowed for the real time computation of trust networks.</p>
<p>An architect at our company, Kevin Pierce, also happens to be one of the best reverse engineers I know. He started poking around the gory depths of the AppEngine source and discovered that all of the API calls stub out in MakeSyncCall. This inevitably led to the discovery of the partner MakeCall which yields an RPC object that you can wait on. Of course, if I can wait on one RPC object, I can also wait on many of them. A subsequent release of AppEngine capitalized on this fact allowing the developer to easily make <a href="http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html">parallel UrlFetch requests</a>. There were some earlier code libraries that also facilitated parallel UrlFetch requests leveraging the same mechanism.</p>
<p>At Google I/O, <a href="http://lostinloc.com/">Ryan Baldwin</a> and I had the opportunity to corner Ryan Barrett (AppEngine&#8217;s supersmart Data Store guru) and chat with him about using this approach for other API interaction. Ryan seemed pretty excited about our exploration of this area and indicated that this was something they had intended to expose to developers but, like any successful software project, competing priorities kept getting in the way.</p>
<p>Encouraged, we set about developing code to allow developers to queue up a set of AppEngine API calls and then kick them off in parallel. In particular, for the use case that we were looking to solve was the ability to perform multiple Data Store Queries in parallel; this would allow us to query for each friend&#8217;s trusts in parallel and collect the results together. </p>
<p>An example invocation might look something like this:</p>
<p><code><br />
# set up the async queries<br />
runner = MultiTask()<br />
for uid in user_ids:<br />
&#160;&#160;&#160;&#160;query = db.GqlQuery("SELECT __key__ FROM Account WHERE facebook_id = :1", uid)<br />
&#160;&#160;&#160;&#160;runner.append(QueryTask(query, limit=1, client_state=uid))</p>
<p># kick off the work<br />
runner.run()</p>
<p># peel out the results<br />
for task in runner:<br />
&#160;&#160;&#160;&#160;task_result = task.get_result() # will raise any exception that occurred for the given query<br />
&#160;&#160;&#160;&#160;print '%s: %s' % (task.client_state, task_result[0])<br />
</code></p>
<p>Here, we&#8217;re making multiple parallel queries, though the mechanism allows for mixing around different API calls.</p>
<p>As an aside, this can yield some pretty scary/awesome looking values in the logs files:</p>
<div id="attachment_90" class="wp-caption alignnone" style="width: 288px"><img src="http://squeeville.wordpress.com/files/2009/07/picture-2.png" alt="Three seconds can chew up a lot of API time!" title="Picture 2" width="278" height="29" class="size-full wp-image-90" /><p class="wp-caption-text">Three seconds can chew up a lot of API time!</p></div>
<p>I&#8217;m excited to announce that we&#8217;ve bundled up this code into a package and released it to the wild on Google Code as <a href="http://code.google.com/p/asynctools/">asynctools</a>. So far, we&#8217;ve wrapped Query (including GqlQuery) and UrlFetch. Others will come as we have time/motivation. Note that you can combine these together and execute arbitrary combinations of them in parallel. </p>
<p>Send us any feedback, comments, encouragement you have.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google App Engine (for Java) Rundown]]></title>
<link>http://mattythorne.com/2009/07/05/google-app-engine-for-java-rundown/</link>
<pubDate>Sun, 05 Jul 2009 23:52:21 +0000</pubDate>
<dc:creator>mattythorne</dc:creator>
<guid>http://mattythorne.com/2009/07/05/google-app-engine-for-java-rundown/</guid>
<description><![CDATA[Google App Engine I&#8217;ve recently got myself a Java app engine account from google but have held]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div class="wp-caption alignright" style="width: 152px"><a href="http://code.google.com/appengine"><img title="app engine logo" src="http://code.google.com/appengine/images/appengine_lowres.gif" alt="Google App Engine" width="142" height="109" /></a><p class="wp-caption-text">Google App Engine</p></div>
<p>I&#8217;ve recently got myself a Java <a href="http://code.google.com/appengine/">app engine</a> account from google but have held out about reviewing the various features until I had tested it in anger. Well, now I have!</p>
<p><strong>Background Details</strong></p>
<p>I have two applications running on app engine, one is a jsp based website <a title="Oxford Geek Jam" href="http://www.oxfordgeekjam.net">www.oxfordgeekjam.net</a>, which is no more than a static site with a bit of generated markup and one Java servlet application which makes use of several other google APIs. All my development work is done using the opensolaris operating system from Sun (now part of oracle).</p>
<p><strong>What You Get</strong></p>
<p>When you register for a google app engine account (python or java) you get space to host ten applications. Once they are gone you&#8217;re on your own! Each one of your apps has a quota which is reset every 24 hours, this quota includes factors such as CPU load, bandwidth etc. Once you breach these, you are on your own again unless you have signed up for googles pay as you go type service, which automatically charges for anything above the standard quotas.</p>
<p>When you register one of your ten applications, you must give it a unique name which becomes it&#8217;s application ID. To access your app you can use the URI [applicationID].appspot.com and also your own domain as well if you choose (see below). Its worth noting that once an app has been registered it can not be deleted to make room for another app!</p>
<p>Your application also comes with a &#8220;dashboard&#8221; which is kind of like a control panel for your app. It gives you information about how much of your quota you are using as well as providing an interface to your server logs. This second point is crucial because one thing you don&#8217;t get with the app engine is direct access to the file system space of your application (see deployment below).</p>
<p><strong>Using Your Own Domain Name</strong></p>
<p>The first site is hosted using its own domain name (rather than the default *.appspot.com).  To use my own registered domain name, which I bought through a third party vendor rather than google, was a bit fiddly to begin with but now I know the process should be a cinch. To use your own domain you must have the ability to change your own DNS settings, in particular the CNAME records. Most domain vendors will allow you to do this as did <a href="http://eurodns.com">eurodns</a> with whom mine was registered with. You also have to register with <a href="http://www.google.com/apps/intl/en/business/index.html">google apps</a> (yes, another google service to register with) to prove domain ownership and link your domain to your google &#8220;web master tools&#8221;. After that you simply need to click on versions in you app dashboard and link the domain to your app.</p>
<p>One downside of the process, and one that is causing quite a stir with other app engine developers, is that you cannot have a naked domain resolve to your application. That is to say, if I registered thebestdomainever.com the URI as it stands can NOT resolve to your app! www.thebestdomainever.com or anything.thebestdomainever.com would be fine though! Of course the way to get around this is to redirect the naked domain to the google acceptable domain, but I understand some registrars don&#8217;t allow this, again I was lucky, mine did!</p>
<p><strong>Coding the Application</strong></p>
<p>For vanilla jsp applications this is no more difficult than coding the pages and bundling them with the xml deployment descriptor and a couple of settings files in <a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html">standard WAR format</a>. The process is somewhat more difficult when it comes to writing servlets and using regular java classes.</p>
<p>There is a plugin for the eclipse IDE which is supposed to mange the coding and build process for you but I haven&#8217;t used it therefore cannot comment! I used netbeans (as I always do) and managed to configure the IDE relatively easily with a bit of  help from the documentation, and using <a href="http://code.google.com/appengine/docs/java/tools/ant.html">apache ant</a> to manage the build. I won&#8217;t go into too many details unless somebody asks for it but it basically involves downloading the app engine SDK in zip format (which rolls in at a hefty 20Mb)  and importing the com.google.appengine libraries. App engine applications use the <a href="http://java.sun.com/products/servlet/">Java Servlet Standard</a> so most developers should feel right at home.</p>
<p>The only thing to watch out while coding is that all applications run in a sand box with a restricted <a href="http://code.google.com/appengine/docs/java/jrewhitelist.html">white-list</a> of java classes which are allowed to be used, so you may want to check the dependencies of your favorite libraries before using them!</p>
<p><strong>Deploying the Application</strong></p>
<p>This is the part of the process which I found really pleasantly surprising. The testing and deployment process worked (for me) straight out of the box!</p>
<p>Given the following constraints I really appreciate this level of detail&#8230;</p>
<ol>
<li>I&#8217;m using opensolaris</li>
<li>I was using a really early version of the app engine API</li>
<li>The SDK is a single download regardless of whether you use a mac, linux or windoze</li>
</ol>
<p>To run the app using the localhost as a testing server was as simple as issuing the command&#8230;</p>
<pre>dev_appserver.sh <em>[war-location]</em></pre>
<p>to the shell.</p>
<p>Uploading the app to your app engine space is similarly easy&#8230;</p>
<pre>appcfg.sh update <em><em>[war-location]</em></em></pre>
<p>One thing to note is that you must make sure that the settings file appengine-web.xml is in the WEB-INF folder and points to your application ID.</p>
<p>Once your app has uploaded, it has gone. You have no way of retrieving it back as there is no access to your application&#8217;s file space. This even includes access by the app itself (for obvious reasons).  If you do need persistence and serialisation then you are encouraged to use google&#8217;s datastore, but this comes with quota limits.</p>
<p><strong>Quotas</strong></p>
<p>Each application has quotas which are reset every 24 hours. These quotas include CPU time, bandwidth (both ways), Mail and deployments, among others. If you go for google&#8217;s premium service then once you reach these quota limits then anything above the quota is charged for, if you don&#8217;t then app will not function for the part which requires the quota. There are also hard limits which even premium customers can&#8217;t breach. The ten application limit per app engine account is one.</p>
<p>Two of the quota limits are for google datastore api usage and URLFetch usage. So even if your app is only making use of google provided services then you are still limited to amount of traffic you are allowed.</p>
<p><strong>Conclusions</strong></p>
<p><strong>Things I like</strong></p>
<ul>
<li>The testing and uploading process is a doddle to use</li>
<li>Once you&#8217;ve set up your IDE coding and deploying is also easy</li>
<li>The service is free which makes the quotas quite generous</li>
<li>Using you own domain is relatively easy and can be done any time before or after the app is finished</li>
</ul>
<p><strong>Things I Dislike</strong></p>
<ul>
<li>Why oh why can&#8217;t I delete an application once I am done with it?</li>
<li>Why can I only have ten applications, especially considering the above?</li>
<li>Why am I penalised by quota limits for google&#8217;s own services? Shouldn&#8217;t they encourage use of their own services rather than those of third parties?</li>
</ul>
<p>I hope this post is of some value to some of you, please feel free to comment and if you would like me to send you my netbeans and/or jsp development templates, I am more than happy to do so!</p>
<p>Cheers,</p>
<p>Matty</p>
<p><strong>Resources</strong></p>
<p><a href="http://code.google.com/appengine/">http://code.google.com/appengine/</a> &#8211; The Google App Engine</p>
<p><a href="http://www.google.com/apps/intl/en/business/index.html">http://www.google.com/apps/intl/en/business/index.html</a> &#8211; Google apps for business</p>
<p><a href="http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html">http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html</a> &#8211; The WAR packaging standard</p>
<p><a href="http://ant.apache.org/">http://ant.apache.org/</a> &#8211; Apache ANT</p>
<p><a href="http://java.sun.com/products/servlet/">http://java.sun.com/products/servlet/</a> &#8211; The Java servlet standard</p>
<p><a href="http://code.google.com/appengine/docs/java/jrewhitelist.html">http://code.google.com/appengine/docs/java/jrewhitelist.html</a> &#8211; The Java class app-engine white-list</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google's App Engine Is Sputtering ]]></title>
<link>http://gigaom.com/2009/07/02/googles-app-engine-is-sputtering/</link>
<pubDate>Thu, 02 Jul 2009 18:58:59 +0000</pubDate>
<dc:creator>Stacey Higginbotham</dc:creator>
<guid>http://gigaom.com/2009/07/02/googles-app-engine-is-sputtering/</guid>
<description><![CDATA[Updated: Today we&#8217;ve received an email and seen multiple tweets alerting us to the fact that G]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong><a href="http://gigaom.wordpress.com/files/2009/07/appengine_lowres.gif"><img class="alignleft size-full wp-image-57090" title="appengine_lowres" src="http://gigaom.wordpress.com/files/2009/07/appengine_lowres.gif" alt="appengine_lowres" width="142" height="109" /></a>Updated</strong>: Today we&#8217;ve received an email and seen <a href="http://search.twitter.com/search?q=%23appengine">multiple tweets</a> alerting us to the fact that Google&#8217;s (s Goog) App Engine software development platform is down. We&#8217;ve emailed the company for details, but in the meantime, a check of the App Engine<a href="http://code.google.com/status/appengine"> status page</a> won&#8217;t even load at 11:30 a.m. PDT, and updates <a href="http://groups.google.com/group/google-appengine-downtime-notify/browse_thread/thread/f7596d1d0bd0f0f9?hl=en">on the site indicate</a> that it&#8217;s been put into unplanned maintainance mode after experiencing problems this morning. <strong></strong></p>
<p><strong>Update</strong>: A Google spokeswoman tells us that the service was down because of a storage issue. She emailed a statement that read: &#8220;Today at 8 am PT datastore access for App Engine applications was affected due to a cluster-wide issue. The team identified and fixed the underlying problem and service has now been restored. We apologize for the inconvenience and encourage anyone having technical difficulty to visit the <a href="http://code.google.com/status/appengine">System Status Dashboard</a> or the <a href="http://groups.google.com/group/google-appengine-downtime-notify">Downtime Notify Group</a>, which are both linked from the Google App Engine Community site.&#8221;</p>
<p>We&#8217;ve seen several complaints about the impersonal way Google seems to be handling this, criticism that certainly may cause the company harm in its quest to <a href="http://gigaom.com/2009/05/03/google-aims-to-woo-the-enterprise-with-its-cloud/">woo the enterprise</a> to its platform. Readers, can Google keep App Engine flying?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Fooling around with app engine]]></title>
<link>http://kristiannissen.wordpress.com/2009/06/23/fooling-around-with-app-engine/</link>
<pubDate>Tue, 23 Jun 2009 13:50:42 +0000</pubDate>
<dc:creator>Kristian Nissen</dc:creator>
<guid>http://kristiannissen.wordpress.com/2009/06/23/fooling-around-with-app-engine/</guid>
<description><![CDATA[As allways, developing anything but MS stuff on your windows platform  causes headaces &#8230;I]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>As allways, developing anything but MS stuff on your windows platform  causes headaces &#8230;<!--more-->I&#8217;m running through <a href="http://my.safaribooksonline.com/9780596802462">Using Google App Engine, 1st Edition</a> but the code doesn&#8217;t quit take care of windows path problems and in section 6.10. Extending Our Application a general purpose method is introduced to take care of finding a template, assigning values to it and render it like this:</p>
<pre>def doRender(handler, tname='index.htm', values={}):
  temp = os.path.join(
      os.path.dirname(__file__),
      'templates/' + tname)
  if not os.path.isfile(temp):
    return False

  # Make a copy of the dictionary and add the path
  newval = dict(values)
  newval['path'] = handler.request.path

  outstr = template.render(temp, newval)
  handler.response.out.write(outstr)
  return True</pre>
<p>- which is fine if your on anything but windows! But on windows &#8220;templates/&#8221; will give you a problem because that&#8217;s not where the file is located! If you want to us a general purpose method for finding your template files i a subfolder, use this snippet:</p>
<pre>def assign(template):
 return os.path.join(os.path.join(
 os.path.dirname(__file__), 'templates'), template)</pre>
<p>Assign may not be the best name, but the method returns a valid path to your template, you can then use it like this:</p>
<pre>class HomePage(webapp.RequestHandler):
  def get(self):
    path = assign('home.html')
    self.response.out.write(template.render(path, {}))</pre>
<p>But I would suggest adding something more to the method so that the entire call to self.response.out.write can be removed from the get method.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
