Hi Googlers and GAE users,
I changed code little bit, there was one problem.And then i tried sedning a
message every 2 seconds and it went fine.
I think after this fix i will be able to get a speed of 80 messages/second,
but still far away from 3000/second.
i removed this line
* Chat chat = connection.getChatManager().createChat("
[email protected]", messgageHandler);
*from function sendToGae and then i could send messages faster. Now Chat
chat is my class variable and get created once in constructor . And after 1
message per 2 seconds i got curious and just ran the loop to send many
messages with out any delay and after sending 92 messages continuosly i got
Constraint response.It didnt say much about what constraint but i could send
90 messages in a row without delay.*
*
public void sendToGae(String message) throws XMPPException, MessageException
{
* Chat chat = connection.getChatManager().createChat("
[email protected]", messgageHandler);*//this line i removed
//messageHandler will receive the message back from server, if i receive
the
same mesage back that means my message did not reach server.If i receive
success, that means my message reached
chat.sendMessage(messageXml);
}
public void disconnect() throws XMPPException
{
connection.disconnect();
}}
On Tue, Dec 1, 2009 at 11:24 PM, Ravi Sharma <[email protected]> wrote:
> Hi Ikai,
> Yes you are right you might have got 10 messages/minute. As i said i also
> got 12 messages/min once( 1 messages every 5 seconds), but this not what i
> was expecting. Iwas expecting around 3000 messages/min. I had to send around
> 50000 messages and it completed yesterday. And first time i started sending
> messages on 24 Nov. so total 7 nights.
> But i think for 50000 messages i should have spent around 50000/3000 = 17
> minutes provided i stil have quota for the day. Lets says things are bit
> slower with GAE, so i can expect 1 hours. I am sure there is something
> missing somewhere. Does gtalk.google.com(XMPP server) has any limitation?.
> or any other problem.
>
> Can you please try to send like 1000 mesasges in a minute and let us know
> the result.
>
> And in my previous mail i forgot to add the response.
> The response i was getting for those messages was Service-unavailable .
> Error code 503.
>
>
> Thanks,
> Ravi.
>
>
>
> On Tue, Dec 1, 2009 at 10:05 PM, Ikai L (Google) <[email protected]>wrote:
>
>> Ravi,
>>
>> Using the sample code, I am able to get above 10 messages a minute. What
>> happens when you add your application in GTalk instead of your custom
>> client? Here's the code I'm using. It's basically an XMPP echo server:
>>
>> import java.io.IOException;
>> import javax.servlet.http.*;
>>
>> import com.google.appengine.api.xmpp.*;
>>
>> @SuppressWarnings("serial")
>> public class XMPPReceiverServlet extends HttpServlet {
>> public void doPost(HttpServletRequest req, HttpServletResponse res)
>> throws IOException {
>> XMPPService xmpp = XMPPServiceFactory.getXMPPService();
>> Message message = xmpp.parseMessage(req);
>>
>> JID fromJid = message.getFromJid();
>> String body = message.getBody();
>> String msgBody = "Received message: " + body;
>> Message msg = new MessageBuilder()
>> .withRecipientJids(fromJid)
>> .withBody(msgBody)
>> .build();
>>
>> boolean messageSent = false;
>> if (xmpp.getPresence(fromJid).isAvailable()) {
>> SendResponse status = xmpp.sendMessage(msg);
>> messageSent = (status.getStatusMap().get(fromJid) ==
>> SendResponse.Status.SUCCESS);
>> }
>>
>> if (!messageSent) {
>> // Do something, log an error
>>
>> }
>> }
>>
>>
>> On Tue, Dec 1, 2009 at 7:35 AM, Ravi <[email protected]> wrote:
>>
>>> Hi Ikai L/Google App Team,
>>> Did you get a chance to look at this problem?
>>>
>>> Thanks,
>>> Ravi
>>>
>>> On Nov 30, 8:19 pm, Ravi Sharma <[email protected]> wrote:
>>> > Hi,
>>> > Thanks for looking into it.I am sending the small code which i am
>>> using. I
>>> > am using smack library.
>>> > This behaviour is not consistant. Once i was able to send messges at
>>> every 5
>>> > seconds(and sent around 4000) and once i had to make it 15 seconds for
>>> each
>>> > message.
>>> >
>>> > i use the following class as
>>> > GaeClientMessanger m = new GaeClientMessanger();
>>> > m.initConnection();
>>> > for(some loop condiiton)
>>> > {
>>> > ..
>>> > m.sendToGae(message);}
>>> >
>>> > m.disconnect();
>>> >
>>> > public class GaeClientMessanger{
>>> > private ConnectionConfiguration config;
>>> > private XMPPConnection connection;
>>> > private static LocalDefaultMessageController messgageHandler;
>>> > protected Logger logger = Logger.getLogger(this.getClass());
>>> >
>>> > public void initConnection() throws XMPPException
>>> > {
>>> > config = new ConnectionConfiguration("talk.google.com",
>>> > 5222,
>>> > "gmail.com");
>>> >
>>> > connection = new XMPPConnection(config);
>>> > connection.connect();
>>> > connection.login("[email protected]", "password");
>>> >
>>> > Roster roster = connection.getRoster();
>>> >
>>> > roster.setSubscriptionMode(Roster.SubscriptionMode.accept_all);
>>> > Collection<RosterEntry> entries = roster.getEntries();
>>> >
>>> > }
>>> > public void sendToGae(String message) throws XMPPException,
>>> MessageException
>>> > {
>>> >
>>> > Chat chat = connection.getChatManager().createChat("
>>> > [email protected]", messgageHandler);
>>> > //messageHandler will receive the message back from server, if i
>>> receive the
>>> > same mesage back that means my message did not reach server.If i
>>> receive
>>> > success, that means my message reached
>>> >
>>> > chat.sendMessage(messageXml);
>>> >
>>> > }
>>> > public void disconnect() throws XMPPException
>>> > {
>>> > connection.disconnect();
>>> >
>>> > }}
>>> >
>>> > On Mon, Nov 30, 2009 at 8:00 PM, Ikai L (Google) <[email protected]>
>>> wrote:
>>> >
>>> > > Ravi,
>>> >
>>> > > Do you have any sample code? I'd like to take a look at this.
>>> >
>>> > > On Fri, Nov 27, 2009 at 2:43 AM, Ravi <[email protected]> wrote:
>>> >
>>> > >> Hi Googlers,
>>> > >> Did you get a chance to look at my problem
>>> > >> Quota page says 3000 calls/min can be handled by App Engine.
>>> > >> But when I send a message every 5 second from a client(outside app
>>> > >> engine), it stop responding after 10 messages.
>>> > >> I increased the time one second each time and now for 10 seconds
>>> > >> difference between each call is working fine. That is really really
>>> a
>>> > >> big problem. I need to make almost 20000 calls now and then may be
>>> > >> more, so to do that I might need
>>> > >> 20000/6 = 3333 minutes(6 calls per minutes) or 55 hours or two and
>>> > >> half day. Am I suppose to keep running my program for 2 and half
>>> days
>>> > >> to make those 20000 calls.
>>> > >> I really need some help here.
>>> >
>>> > >> Thanks in Advance
>>> > >> Ravi.
>>> >
>>> > >> On Nov 25, 9:50 pm, Ravi Sharma <[email protected]> wrote:
>>> > >> > Hi Googlers,
>>> > >> > Can i have some reply on my problem, its really a stopper for our
>>> > >> > application.
>>> >
>>> > >> > *Now one bigger problem we are seeing.*
>>> > >> > I send 25(testing with 25 just a number) XMPP message to GAE
>>> Application
>>> > >> > from my desktop XMPP client
>>> > >> > First 10 messages goes and delivered to GAE Application and GAE
>>> > >> application
>>> > >> > reply it by saying Mesage delivered.
>>> >
>>> > >> > but 11th and onwards message never reach to GAE application(i can
>>> see it
>>> > >> in
>>> > >> > my logs, that my XMPP controller never received the messgae), and
>>> but my
>>> > >> > client do get a reply from GAE(my application [email protected])
>>> which
>>> > >> is same
>>> > >> > message as what i sent. This is really weird and big problem. Why
>>> my
>>> > >> > messages are being returned back to me?. Usally in chat client it
>>> > >> happens
>>> > >> > when someone is offline. So does it mean that my GAE chat bot has
>>> gone
>>> > >> > offline? or too busy to respond? or any other problem?
>>> >
>>> > >> > And i ran this test now almost 7-8 times and everytime only first
>>> 10
>>> > >> > messages are getting delivered.
>>> >
>>> > >> > Then i thought may be its the number of request per seconds, so i
>>> > >> started
>>> > >> > sending one message per 5 seconds but still no success.Still only
>>> 10
>>> > >> > messages reaching GAE.
>>> >
>>> > >> > Can any one from google check this problem and give some guidence
>>> what
>>> > >> is
>>> > >> > wrong here
>>> >
>>> > >> > Thanks in advance,
>>> > >> > Ravi.
>>> >
>>> > >> > On Wed, Nov 25, 2009 at 9:33 AM, Ravi Sharma <[email protected]
>>> >
>>> > >> wrote:
>>> > >> > > Hi,
>>> > >> > > I am trying to write a XMPP Client. When i send a mesage from
>>> Client
>>> > >> to GAE
>>> > >> > > application, it always reach the server and then server reply
>>> back.
>>> > >> When i
>>> > >> > > ran the client first time it worked for 3-4 times. but then now
>>> i am
>>> > >> not
>>> > >> > > receiving any message on client side. I checked the server logs
>>> and it
>>> > >> says
>>> > >> > > that Message sent succesfully.
>>> >
>>> > >> > > I am using my gmail id on client side to connect to
>>> > >> talk.google.comserver.And i logged out my self from all google
>>> client like
>>> > >> gmail, gtalk
>>> > >> > > etc, as i was thinking may be message is being sent to another
>>> client.
>>> > >> > > Intrestingky when i am logged in to Gtalk at the time when i am
>>> > >> running my
>>> > >> > > client, Gtalk recive the response from server. I am using smack
>>> > >> libraries
>>> > >> > > forXMPP client.
>>> >
>>> > >> > > 1) Can you please suggest what can be a problem here.
>>> > >> > > 2) Is XMPP communication is 100% delivery system. Is there
>>> chance that
>>> > >> my
>>> > >> > > message will get lost once on server or client i see that
>>> message has
>>> > >> been
>>> > >> > > sent.
>>> >
>>> > >> > > Thanks,
>>> > >> > > Ravi.
>>> >
>>> > >> --
>>> >
>>> > >> 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%[email protected]>
>>> <google-appengine-java%[email protected]<google-appengine-java%[email protected]>
>>> >
>>> > >> .
>>> > >> For more options, visit this group at
>>> > >>http://groups.google.com/group/google-appengine-java?hl=en.
>>> >
>>> > > --
>>> > > Ikai Lan
>>> > > Developer Programs Engineer, Google App Engine
>>> >
>>> > > --
>>> > > 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%[email protected]>
>>> <google-appengine-java%[email protected]<google-appengine-java%[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]<google-appengine-java%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>>
>>>
>>
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>>
>> --
>> 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%[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.