Friday, December 4, 2009

Playing with RAP

Last week I found some time to play around with Eclipse RAP, some first steps were easy to take. I then got eager and tried to run a bigger RCP application on RAP which worked out to not to work. It was that some things from the current RCP platform we use extensivly do not work on RAP (for e.g. StyledLabelProvider). I did not spent too much time on it, and it seems to be I good advice I read somewhere else, if you want to develop on RAP and RCP start with RAP and then port tp RCP.

I then started of with a prototype for a new app, that will possibly run on RAP next year and I really had some fun with it. I used the styling examples projects to do some styling on my app, integrated my own logo and some css. Was all really easy and I got a web app running in little time.

Tried to follow the instructions on deployment then, which turned out to be a little complicated. Tooling is missing some things there currently. Had to take a count of manual steps to finally get a war archive that I could sent to a friend for testing. Surely I missed to put my plugin.xml in which caused some headache as the deployed app showed all bundles in the osgi console but surely refused to work.

I like the idea of having the Eclipse concepts and the platform alongside for web app development. Our app will be running whith not too heavy load, so that common concern doesn't matter to me. I wonder if there are experiences with RAP applications under heavy load. I still have to figure out whats the best way to have a cross user application model (most of out data will be shared across the users). As I'm so used to it I guess I will go for hibernate, which will turn out be be interesting on where to place the EntityManager Sessions to get all out of Lazy loading inside the platform.


Tom said...

I would use CDO 3.0 (release as part of Helios) with a hibernate backend.
This make sharing your domain models between clients a piece of cake.

Joheinz said...

Would EMF/CDO be an option or did you discard it for this or other reasons?

Elias Volanakis said...

Hi Thomas,

nice to hear that RAP is working out well for you.

With regard to scalability: it depends on the application (and how much data it has in memory).

For apps with small data-sets the limit will be the CPU. Memory consumption should be around 1 MB heap per user. I've managed to have 800-900 concurrent users in less then 1 GB heap on an amazon EC2 medium instance.

For apps with large data-sets the limit will be memory. This depends a lot more on the specific app and the memory available on the server. Especially when porting an RCP app to RAP one has to carefully look at this. RCP apps serve one client on one machine, so they can get away with using a lot of memory. RAP apps server many clients on one machine. In general you should be able to server several hundred users per server for a large app.

We have blogged a bit how we use JMeter to do performance tests here:

* Perfomance Testing RAP on the cloud
* The eclipse download wizard and RAP performance

Kind regards,

Thomas Kratz said...

When I started the project CDO was not ready, and now I have lots of services implemented with jpa api. Now that we depend on hibernate search CDO is not really an option, although I look at it from time to time with glaze in my eyes.