You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Anthony Giaccone <tg...@masslight.net> on 2010/06/04 15:53:10 UTC

What is the process


I want to deploy a production level sling system. To do that I have to  
go beyond what's offered in the launchpad.

I want to install jackrabbit as a stand alone war file.

Then link sling to talk to that instance of jackrabbit.


First is this a reasonable way to do the deploy? Second, how do I do  
that?


Is there a document that describes how to set up a production sling  
environment?


Tony Giaccone

Re: What is the process

Posted by Justin Edelson <ju...@gmail.com>.
On 6/4/10 4:15 PM, Anthony Giaccone wrote:
> 
> On Jun 4, 2010, at 10:25 AM, Vidar Ramdal wrote:
> 
>> On Fri, Jun 4, 2010 at 3:53 PM, Anthony Giaccone
>> <tg...@masslight.net> wrote:
>>
>>> I want to deploy a production level sling system. To do that I have
>>> to go
>>> beyond what's offered in the launchpad.
>>>
>>> I want to install jackrabbit as a stand alone war file.
>>
>> May I ask why you want that?
> 
> 
> My sense was that the launchpad distribution  was a package made in part
> to simplify the process of getting stated with sling, as opposed. That
> it was in fact an artificial construct designed to make the process of
> getting started simple as opposed to a system that should be deployed as
> part of your production deployment.
It's not an artificial construct in that it is quite usable.

It is in that Sling is just a collection of bundles and launchpad is ONE
possible collection of bundles.

The reason I wrote the launchpad Maven plugin was to faciliate the
creation of Launchpad applications (i.e. WARs and runnable JARs) which
contained different collections of bundles from the default. I expect
any "production" Sling application is actually the default Sling bundles
plus or minus some additional collection of bundles. This certainly
isn't required, however. You could just as easily fire up launchpad and
then add/remove bundles as needed via the web console.

> 
> I'm much happier to deploy sling and jackrabbit all in one unit, it's
> one less thing to manage and to work through.
> 
> 
> My big issue now is just understanding what needs to change as I go from
> the derby based system to one that's more robust with regard to restart
> and system failure.
> 
> My sense is based on the wiki, that the persistence manager that's
> deployed with the default launchpad is not what you should be using for
> production. It seems that the database based systems are more resilient
> and fault tolerant. Do I have that right?
To be clear, the PM configured by default does use a database (i.e.
Derby). But yes, moving to a database which is not in-process and using
a bundle / pool PM would be a logical thing to do as would configuring
Jackrabbit clustering.

However, you can certainly have a custom Jackrabbit configuration with
the default Launchpad applications. You'll need to install a bundle
containing the the database driver, but again, that could be done
through the web console.

Justin

> 
> 
> Tony Giaccone


Re: What is the process

Posted by Anthony Giaccone <tg...@masslight.net>.
On Jun 4, 2010, at 10:25 AM, Vidar Ramdal wrote:

> On Fri, Jun 4, 2010 at 3:53 PM, Anthony Giaccone
> <tg...@masslight.net> wrote:
>
>> I want to deploy a production level sling system. To do that I have  
>> to go
>> beyond what's offered in the launchpad.
>>
>> I want to install jackrabbit as a stand alone war file.
>
> May I ask why you want that?


My sense was that the launchpad distribution  was a package made in  
part to simplify the process of getting stated with sling, as opposed.  
That it was in fact an artificial construct designed to make the  
process of getting started simple as opposed to a system that should  
be deployed as part of your production deployment.

I'm much happier to deploy sling and jackrabbit all in one unit, it's  
one less thing to manage and to work through.


My big issue now is just understanding what needs to change as I go  
from the derby based system to one that's more robust with regard to  
restart and system failure.

My sense is based on the wiki, that the persistence manager that's  
deployed with the default launchpad is not what you should be using  
for production. It seems that the database based systems are more  
resilient and fault tolerant. Do I have that right?


Tony Giaccone

Re: What is the process

Posted by Vidar Ramdal <vi...@idium.no>.
On Fri, Jun 4, 2010 at 3:53 PM, Anthony Giaccone
<tg...@masslight.net> wrote:

> I want to deploy a production level sling system. To do that I have to go
> beyond what's offered in the launchpad.
>
> I want to install jackrabbit as a stand alone war file.

May I ask why you want that?

> Then link sling to talk to that instance of jackrabbit.

If you run Jackrabbit independently from Sling, you would need to
connect to Jackrabbit via JNDI or RMI. This is possible by using the
Sling Jackrabbit Client bundle, but there's a performance penalty (at
least for RMI - a huge one).

> First is this a reasonable way to do the deploy? Second, how do I do that?

If you have no other reason for running Jackrabbit independently, I'd
say don't do it. I suspect you can achieve most of what you want by
configuring the Jackrabbit instance in Sling. Look at
/sling/console/configMgr and find the Apache Sling Embedded JCR
Repository instance. From here, you can specify a directory where
Jackrabbit should store its files.

> Is there a document that describes how to set up a production sling
> environment?

AFAIK no special document for Sling, but you should take a look at the
Jackrabbit configuration documentation:
http://jackrabbit.apache.org/jackrabbit-configuration.html

In particular, I recommend using a Bundle Database
Persistencenemanager (e.g. *.bundle.DerbyPersistenceManager) instead
of the *.db.DerbyPersistenceManager that is configured by Sling as
default. The BundlePM has much better performance, in my experience.


-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 22 00 84 76
Quando omni flunkus moritatus!

Re: What is the process

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Tony,

On 04.06.2010 15:53, Anthony Giaccone wrote:
> 
> 
> I want to deploy a production level sling system. To do that I have to
> go beyond what's offered in the launchpad.

Basically the launchpad should get your started with just about anything
you might need for your application.

> 
> I want to install jackrabbit as a stand alone war file.
> 
> Then link sling to talk to that instance of jackrabbit.

I personally think that running Jackrabbit embedded in Sling is the best
option from the perspective of systems management, ease of use,
performance etc.

And if you are not required to use a specific servlet container, I would
go for the Sling standalone application which has quite nice start/stop
control (run java -jar org.apache.sling.launchpad.app-5-incubator.jar
-help to get a list of command line options for the standalone application).

> 
> 
> First is this a reasonable way to do the deploy? Second, how do I do that?

You can deploy Sling and Jackrabbit as two separate web applications in
the same servlet container, but I would not recommend it, because it
brings close to no value and is complicated to set up.

If you still want to go that route, you have to:

  * put the jcr.jar and jackrabbit-api.jar into a shared class laoder
    of the servlet container
  * configure Sling to use the JCR and Jackrabbit API using
    bootclassloading
  * replace the Embedded Jackrabbit bundle by the Client Jackrabbit
    bundle
  * Ensure the Sling Client Jackrabbit bundle can access the the
    repository through JNDI (see jackrabbit docs for more information).

Regards
Felix

> 
> 
> Is there a document that describes how to set up a production sling
> environment?
> 
> 
> Tony Giaccone
>