Are there any tutorials on using sockets for client/server connection with Google App Engine for Java services?
views:
43answers:
3any hacks around this restriction?
Blender
2010-06-22 16:45:19
And what about java.net.DatagramSocketImplFactoryjava.net.HttpRetryExceptionjava.net.HttpURLConnectionjava.net.IDNjava.net.JarURLConnectionjava.net.MalformedURLExceptionjava.net.NetPermissionjava.net.NetworkInterfacejava.net.NoRouteToHostExceptionjava.net.PasswordAuthenticationjava.net.PortUnreachableExceptionjava.net.ProtocolExceptionjava.net.Proxy$Typejava.net.SocketExceptionjava.net.SocketImplFactoryjava.net.SocketOptionsjava.net.SocketPermissionjava.net.SocketTimeoutException
Blender
2010-06-22 16:46:52
No. There's no other way to get the OS to give Java a network socket. The JVM simply doesn't allow it.
Ben S
2010-06-22 16:47:49
Doesn't matter. You're running in their sandbox."[...] bytecode that attempts to open a socket or write to a file will throw a runtime exception.": http://code.google.com/appengine/docs/whatisgoogleappengine.html
Ben S
2010-06-22 16:50:04
And what about JSP page can we open thrue tham?
Blender
2010-06-22 17:00:16
That's still bytecode in the JVM, you'll just get an exception when processing the jsp.
Ben S
2010-06-22 17:02:11
You can make outgoing HTTP requests, as well as sending and receiving email and XMPP messages - just not raw socket connections.
Nick Johnson
2010-06-22 17:23:55
A:
As it was said already, raw sockets are forbidden in GAE.
If you need client/server connectivity using GAE as a server and choice of medium is not critical, such connection can be arranged via web-services.
Vanya
2010-06-22 19:40:21
A:
Sockets are not allowed, but depending on what it is you are trying to do, you may find that the XMPP support is sufficient for your needs.
Russell Leggett
2010-06-22 19:49:21