Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Use "RAP Target Platform" as deployment platform or run an extra application server?
Use "RAP Target Platform" as deployment platform or run an extra application server? [message #1399985] Sun, 13 July 2014 13:58 Go to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Hello,
I am new to RAP, web applications and OSGI and I am curious about how to deploy RAP applications on a server to make them available for end users.

My main question is if the purpose of the so called "RAP Target Platform" is
a) only testing?<br>
b) to be an independent deployment platform (= an alternative to an application server like Tomcat)?

The RAP documentation describes how to get an example running on the RAP Target Platform. However, I did not find a convenient way to actually deploy the RAP applications for end users. Should the end users actually access that "RAP Target Platform"?

I found some articles on how to deploy RAP applications, but most of them seem to be out of date and kind of complex. Please give me some hints on best practices and let me know about your experiences with deploying RAP applications.

I'll try to describe by current understanding and give some hints for people who wants to achieve the same. Please correct me if necessary. I already put some effort in each of the strategies described below but did not succeed yet. I am lost in all the possibilities and wondering how to go on. My aim is to convert an RCP application into an RAP application and deploy it on a windows server. Several end users will be able to control the application in their browser (="use a custom Eclipse editor as web application").

A. RAP Hello World example

- Download and unzip "Eclipse for RCP and RAP Developers": https://www.eclipse.org/downloads/
- Install a so called "RAP Target Platform" as it is stated here: http://eclipse.org/rap/developers-guide/devguide.php?topic=target-install.html&version=2.0
Quote:
On the Eclipse welcome screen (Help > Welcome), go to Overview > Remote Application Platform. Choose Install Target Platform on the following page. In the upcoming dialog confirm the default values, which starts the target installation process. After the installation finished you are prepared to work with RAP. For your first steps you may try out some RAP Examples and/or write a Hello World Application.


- Follow the hello world example: http://eclipse.org/rap/developers-guide/devguide.php?topic=hello-world.html&version=2.0
- Open MANIFEST.FM and execute "Launch a RAP Application"
- A browser window appears and in my case it shows the hello world example application under "localhost:55551/hello". I can also but this url in another browser, e.g. Firefox and see the hello world example application.

B. How it works.

The "RAP Target Platform" seems to

- use Eclipse Equinox as an OSGI container
- run Jetty as an application container inside the OSGI container
- run RAP applications with/inside the Jetty container

The above process is one possibility to show an RAP application in my browser. If I close Eclipse the "RAP Target platform" will be closed and my application will not be available any more.

C. Possibilities for deployment

There seem to be two main possibilities to deploy RAP applications:

I. Use OSGI as a main container:<br>Set up an OSGI container, run an application server as an OSGI bundle inside that container and also run your application as OSGI bundle "inside the sub container". <br>
II. Use an application server as main container. Use an application server like Tomcat, but everything that is needed for the RAP application in a single *.war file and deploy that *.war file on the application server. The *.war file might include OSGI. (See for example http://eclipsesource.com/blogs/2007/12/07/rap-deployment-part-2-deploying-your-application-as-a-war-file/)

Currently the first approach seems to be more attractive to me. Several strategies come to my mind on how to achieve the deployment of an RAP application in an OSGI main container:

I a) Set up a minimalistic Equinox OSGI container as a windows service, using the Java Service Wrapper (http://wrapper.tanukisoftware.com/doc/english/download.jsp) or Procrun(https://commons.apache.org/proper/commons-daemon/procrun.html), install the required bundles for jetty and rap and finally the application bundle. New applications could be installed using the OSGI console.

I b) In order to handle the OSGI bundles more comfortably, install a minimalistic Eclipse version for the bundle mangagement (called "Platform runtime binaries"), install the Eclipse Plug-in Development Environment with http://download.eclipse.org/releases/luna/ to get the "plugin registry view". The OSGI console can be viewed inside the Eclipse console view. Go on with installing jetty bundles ect., like in I a). In order to deploy my application I would have to start this Eclipse instance and keep it running as a server. New applications could be installed like I am used to it in Eclipse with "install new software". (Is it possible to run the whole Eclipse instance as a Windows service?)

I c) Instead of manually installing all plugins, download the larger Eclipse for RCP and RAP Developers, use the Wizard to install the RAP Target Platform and directly use it as deployment platform (as already described in A.). (Again.. the Eclipse instance has to run the whole time the RAP application should be available for the end users).

I d) Use the Virgo Application Server for deployment. (search for "Deploying RAP Applications Made Simple Introducing the Virgo RAP Server"). This does not seem to work for Workbench applications yet.

Are there even more possibilities? Which one should I choose to go on with?






Re: Use &quot;RAP Target Platform&quot; as deployment platform or run an extra application s [message #1400427 is a reply to message #1399985] Mon, 14 July 2014 07:22 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
did you read "RAP Developers Guide" -> "Deploying a RAP Application to a
Servlet Container" [1]? Also, you could use maven for WAR archive
creation - see our demos build [2].

[1]
https://www.eclipse.org/rap/developers-guide/devguide.php?topic=deployment.html&version=2.3
[2]
http://git.eclipse.org/c/rap/org.eclipse.rap.git/tree/releng/org.eclipse.rap.examples.build
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Use &quot;RAP Target Platform&quot; as deployment platform or run an extra application s [message #1400443 is a reply to message #1400427] Mon, 14 July 2014 07:53 Go to previous messageGo to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Hi Ivan,
thank you for your answer. So I guess that the *.war - Deployment (option II. ) is the recommended way to deploy RAP applications and that the purpose of the "RAP target platform" is only testing. I did not put much effort into II. until now, because I thought I would get issues with java security certificates and that the *.war file(s) would be hard to maintain. If I manage to automate the creation of the *.war archives with maven this option gets more attractive.
Best regards,
Stefan

[Updated on: Mon, 14 July 2014 07:54]

Report message to a moderator

Re: Use &amp;quot;RAP Target Platform&amp;quot; as deployment platform or run an extra appli [message #1400449 is a reply to message #1400443] Mon, 14 July 2014 08:03 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
"RAP target platform" contains bundles, needed for RAP application to
compile and run. It includes Equinox, RWT, RWT OSGi, RAP JFace and
Workbench ports... When you create a WAR archive, the needed (by your
application) bundles from "RAP target platform" will be included in it.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Deploy plugins separately
Next Topic:Fileupload Incubation status
Goto Forum:
  


Current Time: Fri Mar 29 09:40:59 GMT 2024

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

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

Back to the top