You could embed an HTML page in your Java app and use the Channel API for its anonymous endpoints. Then signal out to your app when you get a message. This won't be subject to vagaries of changes in the Channel API's implementation.
You're correct that you need an XMPP account of some sort if you want to use the XMPP API. You could consider running a very simple XMPP server on AWS or elsewhere and connecting your clients to that; then you can send messages from your App Engine app to addresses on your own server. ejabberd seems to be the service of choice.
XMPP seems like your best bet, but you need to configure your server to allow anonymous clients to get around your registration issue.
I am not sure what you mean by either side initiating communication though. XMPP will require the client to initiate by connecting to the server, but after that it can receive messages unprompted. Of course, if the intent is for the server to send unprompted messages to a client, how do you know what client without some sort of client identity (which means some form of registration)?
发布评论
评论(2)
我能想到两个选项:
Two options I can think of:
XMPP 似乎是您的最佳选择,但您需要配置服务器以允许匿名客户端绕过您的注册问题。
我不确定你所说的双方发起沟通是什么意思。 XMPP 将要求客户端通过连接到服务器来启动,但之后它可以自动接收消息。当然,如果服务器的目的是向客户端发送自动消息,那么在没有某种客户端身份(这意味着某种形式的注册)的情况下,您如何知道哪个客户端?
XMPP seems like your best bet, but you need to configure your server to allow anonymous clients to get around your registration issue.
I am not sure what you mean by either side initiating communication though. XMPP will require the client to initiate by connecting to the server, but after that it can receive messages unprompted. Of course, if the intent is for the server to send unprompted messages to a client, how do you know what client without some sort of client identity (which means some form of registration)?