Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Storing data in the clients
Storing data in the clients [message #1397297] Wed, 09 July 2014 14:15 Go to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
Hello, I am currently starting to get to know Eclipse Scout and to evaluate whether it is feasible for our project. I did a lot of searching through the wiki and the forum the last days to get an overview of what is possible.
What I have missed was information on whether it is possible to store some data in the clients. E.g. getting a data set for populating a table specific to a user and then caching it somehow in the client of this specific user so that he does not need to call the server everytime he reloads the page.
It would be great if someone could point out to me how this could be achieved if it is possible to achieve this with Scout.
Re: Storing data in the clients [message #1397407 is a reply to message #1397297] Wed, 09 July 2014 17:29 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Typical eclipse scout applications are client-server application. This is what we describe the most on the wiki.

It is also possible to have client only applications (see Client Only Architecture in the Scout Book).

A quick solution to obtain a client-only application is to remove the code parts that induce a server call.

Of course anything between the "client only" and the "client-server" application is also possible. Eclipse scout is service-oriented and you can implement services on the client side or on the server side.
You can even mix both approaches: The CodeService (responsible for loading CodeTypes) included out-of the-box in scout is a good example of this hybrid approach. The client implementation acts like a cache. The first time it connects to the server to get the codes and cache them. When the codes are cached in the client, the client implementation does not call the server again.

It is up to you to decide how you want to implement the services providing data.

I hope it answers your question. If not feel free to continue the discussion.

.
Re: Storing data in the clients [message #1397811 is a reply to message #1397407] Thu, 10 July 2014 07:31 Go to previous messageGo to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
Thank you Jeremie for the answer =) That gives me an idea how to progress.
The answer leads me to another question: As far as I got the architecture of Scout right, all clients are communicating with the server through https-protocol. So what data is where. When creating a hashmap in a client service, where will this hashmap be consuming memory.
For the RAP client I assume it can only be on the server in the session context or something. But what do the SWT and Swing clients? Do they store the data on the client machine where they are running, or on the server?
Re: Storing data in the clients [message #1397897 is a reply to message #1397811] Thu, 10 July 2014 10:10 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am not 100% sure of what I am writing here. I hope someone will correct me if some details are wrong.

1) transferred data
Let consider a Desktop App as client (SWT or Swing), I will discuss the RAP case separately:

Data transferred over the HTTPS Protocol are only the Transfert-Object. Scout recommends to transfer FormData and PageData (because they can be easily imported in the client), but as soon as a Java object is serializable it can be transferred.
Out-of the box I think that the Java objects are serialized and put in a little SAOP envelop.

I do not know when, but I know that Data put in the Session (Client- or ServerSession) are also kept in sync by the framework between client and server. Those Data are also transferred somehow.

If we want an exhaustive list: the server can push messages to the client and by default the client sends Ping messages to the server (I do not know this domain well; if you are interested fell free to ask more). This is also to be taken into account.

(Read also this wiki Page: Client server communication in Eclipse Scout. It will give you technical information about communication)

If you implement a Service on the Client Side, I think that nothing is transferred to the server. I know there was a discussion if we should serialize and deserialize the object as a Server Service would do (but this is really an implementation detail).

I think that our services are singletons instantiated by a factory. So if you store data as java member of a service it stays there (I think this is exactly what the CodeService is doing).


2) Eclipse RAP

For Eclipse RAP everything is the same as with the Desktop App client, but this client lives also on one or more server.

Between your web browser (where the Rap Client) and the Rap Server a JSON Protocol tells the webbrowser what widgets it needs to plot depending on what is computed in the server. You will find articles that explains this much better as I do. (For example: RAP protocol on the EclipseSource Blog. EclipseSource is the company behind RAP).

Be aware that is this case you deploy 2 wars:
* A Scout Server.
* A Scout Client War, containing the RAP server.


I hope this helps. Feel free to ask more if something is not clear enough.

.
Previous Topic:How can i get the contract in java
Next Topic:Eclipse Scout SDK and Java 8?
Goto Forum:
  


Current Time: Fri Mar 29 13:51:02 GMT 2024

Powered by FUDForum. Page generated in 0.04044 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top