Thank you Sumit.
You are right about the client side, but since I just started GWT, I'm
developing and learning it at the same time. One of the major components in
the client side is to display images, one image at a time and go back and
forth between images, when the user clicks on back or forward buttons. I'd
appreciate it if you direct me to how to do this? The images, stored on a
server, are about 500 KB each, but there is a lot of them, thousands per
directory * a few directories.

As for the server to server communications, I was thinking about using
protobuf. Will that work with GWT to server as well? Or is protobuf just for
synchrnonus communications?

Tony.

On Wed, Jan 21, 2009 at 3:10 PM, Sumit Chandel <sumitchan...@google.com>wrote:

> Hi Tony,
>
> It seems to me that what you're trying to solve has more to do with
> server-side programming rather than client-side programming in GWT. On the
> client-side, you have the standard situation where you make a call (either
> through RPC or the RequestBuilder) and you handle the asynchronous response
> in the callback, and subsequently do whatever is approriate on the UI side
> of things. On the server-side, you have a situation where one server needs
> to wait for another to signal it to return a message back to the client
> after making a call to an intermediary service. My suggestion would be to
> look into RMI appropriate to your backend technology and have the first
> server wait on a token that would be set by the second server returning the
> reply. Once set, it could continue processing a return a reply to the
> client, as well as unset the token for the next call. You can find a lot
> more tips on the server-side programming forums approrpriate to your
> server-side technology.
>
> However, I would be very careful with how long the server-to-server calls
> take, since you might run into request timeouts if the calls make it so that
> the server response takes too long. In that case, you could look into using
> Comet.
>
> As for whether JSON or RPC is best for the client to server communication,
> I would go with GWT RPC if you're using a Java backend. It makes it easy to
> make calls, pass data objects back and forth, optimize payloads and keep as
> much of your code base as possible in Java.
>
> GWT RPC:
>
> http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideRemoteProcedureCalls
>
> Hope that helps,
> -Sumit Chandel
>
>
> On Tue, Jan 20, 2009 at 8:15 AM, tony.p.. <tony.t....@gmail.com> wrote:
>
>>
>> Hello everyone,
>>
>> I started a project, which is a client/server application and started
>> looking at GWT for the front end. GWT looks perfect for the front end,
>> but I need your advice on the best practice to implement these
>> components.
>>
>> The application has these components:
>>
>> 1. an existing data acquisition system (DAS) that sends data every x
>> minutes, on a tcp/ip port.
>> 2. server, this is what I'm writing, that will do:
>>  a. Back end 1 (BE1): get the data from the DAS, done this already
>> with the protocol that the DAS implements.
>>  b. Front end to retrieve the data, with GWT.
>>  c. Back end 2 (BE2) to communicate with the GWT front end: should I
>> use RPC or JSON? (which is easier and quicker to implement?)
>>  d. From the GWT front end, I want to issue commands to the DAS and
>> display the response. So the command goes from GWT to BE2 to the DAS.
>> The DAS replies to BE1. BE1 sends the reply to BE2, then BE2 to GWT to
>> display it. The issue here is how to handle this async communication,
>> when the reply comes from BE1 to BE2?
>>
>> Thank you in advance.
>> Tony
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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-Toolkit@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to