Re: GWT-RPC via JSONP?

2010-06-16 Thread Sripathi Krishnan
I think a quick PoC should answer your questions, but here is what I think
-


> Still wondering, if it would be significantly slower than plain GWT-RPC?

No reason for it to be slower than regular RPC. Thinking about it, you
should be able to use the regular RPC payload wrapped in a JSONP style
method call. This should make it work as good as regular RPC. I don't see
any other overheads.

One thing I must definitely make sure first, if this can be used together
> with all important frameworks I plan to use in the future (will e.g.
> gwt-log)...

You will have to confirm it, but it should work. You are not changing the
interface for RPC, so I see no reason for other frameworks to stop working.

--Sri


On 17 June 2010 03:49, Chris Lercher  wrote:

> That was fast - awesome post. It sounds feasible, and I'm considering
> to use it. Still wondering, if it would be significantly slower than
> plain GWT-RPC?
> The sending limit of 2kB Client->Server will be enough for at least
> most of my queries - I must still evaluate, if it's enough for
> absolutely all of them (or if I can split the others easily).
>
> One thing I must definitely make sure first, if this can be used
> together with all important frameworks I plan to use in the future
> (will e.g. gwt-log)...
>
> Thanks a lot for your answer!
> Chris
>
> On Jun 16, 10:53 pm, Sripathi Krishnan 
> wrote:
> > Just did some digging in, and I *think* it is possible with some
> > restrictions. The restrictions being -
> >
> >- No support for request headers
> >- Reduced error handling. For example, a 404 cannot be detected
> >easily...
> >
> > The basic idea is to use DeRPC infrastructure because it already returns
> > JSON.. and try to override the RequestBuilder class so that the
> > communication channel is a 

Re: GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
That was fast - awesome post. It sounds feasible, and I'm considering
to use it. Still wondering, if it would be significantly slower than
plain GWT-RPC?
The sending limit of 2kB Client->Server will be enough for at least
most of my queries - I must still evaluate, if it's enough for
absolutely all of them (or if I can split the others easily).

One thing I must definitely make sure first, if this can be used
together with all important frameworks I plan to use in the future
(will e.g. gwt-log)...

Thanks a lot for your answer!
Chris

On Jun 16, 10:53 pm, Sripathi Krishnan 
wrote:
> Just did some digging in, and I *think* it is possible with some
> restrictions. The restrictions being -
>
>    - No support for request headers
>    - Reduced error handling. For example, a 404 cannot be detected
>    easily...
>
> The basic idea is to use DeRPC infrastructure because it already returns
> JSON.. and try to override the RequestBuilder class so that the
> communication channel is a 

Re: GWT-RPC via JSONP?

2010-06-16 Thread Sripathi Krishnan
Just did some digging in, and I *think* it is possible with some
restrictions. The restrictions being -

   - No support for request headers
   - Reduced error handling. For example, a 404 cannot be detected
   easily...

The basic idea is to use DeRPC infrastructure because it already returns
JSON.. and try to override the RequestBuilder class so that the
communication channel is a 

Re: GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
Hi Sri,

I mean of course, that there would have to be a component (e.g.
Servlet) on the server side, that re-translates the get request, and
then calls the RemoteServlet (or something underlying), as if a usual
GWT-RPC request had been issued. Se we would basically use JSONP as a
tunnel.

[The defense against CSRF would have to be done using a separate
technique, but let's forget about that for a moment.]

Chris

On Jun 16, 9:42 pm, Sripathi Krishnan 
wrote:
>  No, it won't.
>
>    1. GWT RPC exclusively uses POST. JSONP uses a 

Re: GWT-RPC via JSONP?

2010-06-16 Thread Sripathi Krishnan
 No, it won't.

   1. GWT RPC exclusively uses POST. JSONP uses a 

Re: GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
Okay, thinking about it, maybe this is a stupid idea. Since I can send
only an URL (and not a POST body) with a JSONP call, I guess, the URL
probably can't take very long strings...

On Jun 16, 9:27 pm, Chris Lercher  wrote:
> Hi,
>
> would it be possible to somehow wrap a GWT-RPC in a JSONP call? I
> mean, at the end of the day, GWT-RPC also just sends a string in an
> HTTP POST message (along with some headers), so theoretically it
> should be possible to use that String as a JSON string, maybe
> alongside the headers to form a JSON object?
>
> But this little bit of wrapping should happen transparently (so that I
> can still use frameworks which rely on GWT-RPC). Is there an easy
> solution? A complex one?
>
> Thanks
> Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
Hi,

would it be possible to somehow wrap a GWT-RPC in a JSONP call? I
mean, at the end of the day, GWT-RPC also just sends a string in an
HTTP POST message (along with some headers), so theoretically it
should be possible to use that String as a JSON string, maybe
alongside the headers to form a JSON object?

But this little bit of wrapping should happen transparently (so that I
can still use frameworks which rely on GWT-RPC). Is there an easy
solution? A complex one?

Thanks
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.