The ajax calls to your server returning status 0 is likely due to no- cross-domain calls security policy.
The gadget is loaded from a domain different from your servers, so results of javascript calls made to your servers cannot be accessed. Have you tried gadgets.io.makeRequest? Sachin On Dec 20, 8:16 pm, palisade <[email protected]> wrote: > I am vexxed by something that has been holding me back in my > development. Currently, it is not possible to asynchronously update > the wave state. What I mean by this is that when two people commit the > same state at the same time, one of them "wins" and the other's change > is lost. This is unacceptable for many reasons: > > 1) Asynchronous chat for example is impossible without doing what one > programmer who made a popular chat gadget did which was to store a key/ > value pair for every single line of chat input. Not only is that > reckless and inefficient use of the state map, making it flagrantly > long, it also makes it difficult to properly store non-chat data in > the state without coming up with a scheme for differentiating the two. > The chat gadget didn't have to worry about players, positions, other > objects, scores, realm information, etc. If your code for loops the > state keys and performs some function on the data, it might get > confused/impeded by the chat lines. In addition, performance is > impacted because of the large quantity of keys to sort through. And, > it might be bad for security as well as someone could spike your code > by typing a malformed sentence in the chat. One popular chat gadget > just stores the entire chat log into one state entry, which is also a > flawed concept due to the "there can be only one" problem with storing > data in the state. As a result, sometimes when many people are typing > to one another their sentences are lost to the void, replaced by > someone else's. > > 2) 2D movement in my game involves pressed/released states per player > in addition to interpolating their positions over time. I get the > feeling that using json+ajax+php to pass my messages around instead of > piggybacking it onto a currently overburdened wave back-end using a > heavy-duty xml protocol might perform better not to mention be > asynchronous. And, my server code could then also centralize and > authenticate the actions players are taking to prevent hacking, > simulate events ahead of time, and store their stats, equipment and > other data permanently in a database even if a wave is corrupted or > vanishes. Not to mention allowing players on google wave to play with > players on other social sites like facebook or myspace, which is point > 3. > > 3) Supporting/porting games/apps to & from other sites that don't use > the wave api, examples; facebook, myspace, etc... there is a need to > be homogeneous and interoperable that makes relying on merely wave's > state architecture instead of say ajax/php/mysql seems absurd. > > Does anyone have any solutions to these problems? Am I missing > something? Are any of these planned, are there APIs exposed or to be > exposed that will allow me to do this? Is there an alternative, and is > it portable? > > From what I have read so far in this group, no one seems to be able to > get Ajax to work, and my guess is that when they parse the gadgets > they strip any ajax calls out to prevent them. I have tried a few > times to make the calls and it always return 0 on the status. Unless > you yourself has written a google wave gadget that can do this or > knows of one, don't suggest it as the solution. I'm looking for real > answers. Sorry, but this is frustrating me to no end. -- You received this message because you are subscribed to the Google Groups "Google Wave API" 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-wave-api?hl=en.
