UDP or TCP packets in Java AppEngine

241 views
Skip to first unread message

jesus cabrera polo

unread,
Feb 2, 2015, 5:42:16 AM2/2/15
to google-a...@googlegroups.com
Hello, Im migrating a project to AppEngine and i want to get the packet from several devices . Before in a centos server , i had a java service that open socket and listen for udp packet and store it in bd .
there are not to much information about it  only that socket it is for paid app , can not be a listen socket .
i read it using a net.DatagramSocket like :
socket = new DatagramSocket(port);
byte[] data= new byte[300];
DatagramPacket packet= new DatagramPacket(data, data.length);
socket.receive(packet);

Can you please suggest me a alternative to read the device packets in Appengine.?
Thanks a lot.

Barry Hunter

unread,
Feb 2, 2015, 8:48:51 AM2/2/15
to google-appengine
Really in Appengine you should be receiving the data in HTTP format*. Rather than arbitrary 'packets'. 

As you say you can't open listening sockets. AppEngine is really setup for handling HTTP requests. 


*( there are interfaces to transform other protocols into HTTP for you eg receiving Emails, XMPP messages, or WebSocket style interace via the Channel API - various underlying protocols in reality) 


Compute Engine would be a better choice


Having said that there is
which is estentially a AppEngine managed Cloud Compute instance. So you get the great APIs of appengine, but a bit more flexiblity - I think that would include opening listening sockets. 





--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/3497dbd6-93fc-4784-9a8f-3a5511739bb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages