For performance reasons Google Frontend servers use keep-alives by default unless you request non-persistent connection with http request header connection: close.
On Oct 11, 5:34 pm, Benjamin <[email protected]> wrote: > Guys - thank you. It's working great. I'm actually impressed at how I > can us the IP i get from google.com or appspot.com and as long as I > provide the host my POST get's directed to my app engine app. > > I will post more about this in my blog:http://nimbits.blogspot.com/ > > I now have an Arduino Microcontroller board with an Ethernet shield > that can post it's data directly to my Nimbits Data Logging Service on > App Engine :http://www.nimbits.com > > The Arduino C code is simply a basic web client (using ethernet.h) > that does: > > client.println("GET /service/currentvalue? > point=test&[email protected]&format=json HTTP/1.1"); > client.println("Host:nimbits1.appspot.com"); > client.println("Accept-Language:en-us,en;q=0.5"); > client.println("Accept-Encoding:gzip,deflate"); > client.println("Connection:close"); > client.println("Cache-Control:max-age=0"); > client.println(); > > Worth mentioning that I had trouble with http keep alives - i had to > add a connection close header. Not sure why. > > On Oct 10, 5:36 pm, Maxim Veksler <[email protected]> wrote: > > > > > Exactly. > > > Usehttps://addons.mozilla.org/en-US/firefox/addon/6647/tosee what headers > > your browser send as part of the HTTP GET request and emulate them in C > > code. > > > Should work :). > > > On Sat, Oct 9, 2010 at 11:45 PM, Peter Ondruska > > <[email protected]>wrote: > > > > When connecting to IP address you need to use HTTP host header so that > > > GAE knows which application/virtual server you want. > > > > On Oct 9, 6:26 pm, Benjamin <[email protected]> wrote: > > > > I've been working on a challenge over the past couple of days and I > > > > could really use a knowledge transfer on App Engine, Domains and IP > > > > addresses. I seem to be missing something. > > > > > I'm trying to write a library for Arduino Micro-controllers to do HTTP > > > > Posts to a servlet hosted on appengine. For example The URL of the > > > > servlet is > > > > >http://nimbits1.appspot.com/service/currentvalue?point=test&format=json > > > > > Do to limitations on the Arduino device, i need to get an IP Address > > > > that will resolve to nimbits1.appspot.com first, before doing my post > > > > to /service/currentvalue?point=test&format=json > > > > > I have the C code to request an IP from DNS of a domain which works > > > > without a problem. So far so good. My problem is my requests seem to > > > > hit a brick wall when I try to use the IP instead of the Domain in my > > > > requests. > > > > > Let's say I ping nimbits1.appspot.com - I get 74.125.113.121 or > > > > 72.14.204.141 back from the DNS Server. This takes me to Google > > > > servers, but not my app. I'm guessing that the server want the > > > > subdomain in the request but i'm not provided one. > > > > > I registered a new domain: nimbits.org on godaddy and followed Nick > > > > Johnson's fine tutorial on mapping naked domains to have nimbits.org > > > > redirect to nimbits1.appspot.com (As a permanent redirect without > > > > masking) > > > > >http://blog.notdot.net/2009/12/Naked-domains-on-App-Engine > > > > > if i navigate tohttp://nimbits.orgIredirect ok tohttp:// > > > nimbits1.appspot.com > > > > > Further, if i do a wget in a linux terminal I can see the IP's i'm > > > > resolving to: > > > > > benja...@ben-ubws01:~$ wget nimbits.org > > > > --2010-10-09 12:20:43-- http://nimbits.org/ > > > > Resolving nimbits.org... 64.202.189.170 > > > > Connecting to nimbits.org|64.202.189.170|:80... connected. > > > > HTTP request sent, awaiting response... 301 Moved Permanently > > > > Location:http://nimbits1.appspot.com[following] > > > > --2010-10-09 12:20:44-- http://nimbits1.appspot.com/ > > > > Resolving nimbits1.appspot.com... 64.233.169.141 > > > > Connecting to nimbits1.appspot.com|64.233.169.141|:80... connected. > > > > HTTP request sent, awaiting response... 200 OK > > > > Length: unspecified [text/html] > > > > Saving to: `index.html.10' > > > > > [ <=> ] 3,376 --.-K/s in > > > > 0.003s > > > > > 2010-10-09 12:20:44 (1.18 MB/s) - `index.html.10' saved [3376] > > > > > If i try and navigate to any of the above IP Addresses i.ehttp:// > > > 64.233.169.141 > > > > I endup on google or godaddy, but not my app. > > > > > Any help would be greatly appriciated. I may have to resort to having > > > > users point their arduino to an internal web server that can forward > > > > the request, but having arduino devices post directly to app engine > > > > would be very cool. > > > > > -Ben > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Google App Engine for Java" group. > > > To post to this group, send email to > > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-appengine-java%2B > > > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
