State handling using Oracle

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

State handling using Oracle

Wouter Zelle
Hi,

I want to use Orbeon with Oracle and I prefer not to use Exist at all. I've managed to get Orbeon to store form types and form data into Oracle, but it still wants to use Exist when oxf.xforms.state-handling=server. I've found these properties that seem to configure the storage for state handling:

    <property as="xs:string"  name="oxf.xforms.store.application.username"              value="guest"/>
    <property as="xs:string"  name="oxf.xforms.store.application.password"              value="guest"/>
    <property as="xs:anyURI"  name="oxf.xforms.store.application.uri"                   value="xmldb:exist:///"/>
    <property as="xs:string"  name="oxf.xforms.store.application.collection"            value="/db/orbeon/xforms/cache/"/>

Is it possible to change these to use Oracle or is server side state handling limited to an Exist DB?

Regards,

Wouter Zelle


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: State handling using Oracle

Wouter Zelle
An even better alternative might be to no longer store the state on disk, but simply keep it in the HttpSession only. Is this possible?

Regards,

Wouter Zelle

On Wed, May 20, 2009 at 09:12, Wouter Zelle <[hidden email]> wrote:
Hi,

I want to use Orbeon with Oracle and I prefer not to use Exist at all. I've managed to get Orbeon to store form types and form data into Oracle, but it still wants to use Exist when oxf.xforms.state-handling=server. I've found these properties that seem to configure the storage for state handling:

    <property as="xs:string"  name="oxf.xforms.store.application.username"              value="guest"/>
    <property as="xs:string"  name="oxf.xforms.store.application.password"              value="guest"/>
    <property as="xs:anyURI"  name="oxf.xforms.store.application.uri"                   value="xmldb:exist:///"/>
    <property as="xs:string"  name="oxf.xforms.store.application.collection"            value="/db/orbeon/xforms/cache/"/>

Is it possible to change these to use Oracle or is server side state handling limited to an Exist DB?

Regards,

Wouter Zelle



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: State handling using Oracle

Erik Bruchez
Administrator
In reply to this post by Wouter Zelle
> I want to use Orbeon with Oracle and I prefer not to use Exist at  

> all. I've managed to get Orbeon to store form types and form data  
> into Oracle, but it still wants to use Exist when oxf.xforms.state-
> handling=server. I've found these properties that seem to configure  
> the storage for state handling:
>
>     <property as="xs:string"  
> name="oxf.xforms.store.application.username"              
> value="guest"/>
>     <property as="xs:string"  
> name="oxf.xforms.store.application.password"              
> value="guest"/>
>     <property as="xs:anyURI"  
> name="oxf.xforms.store.application.uri"                    
> value="xmldb:exist:///"/>
>     <property as="xs:string"  
> name="oxf.xforms.store.application.collection"            value="/db/
> orbeon/xforms/cache/"/>
>
> Is it possible to change these to use Oracle or is server side state  
> handling limited to an Exist DB?
Right now, limited to eXist.

Another implementation, using either the filesystem or Oracle, is  
certainly doable.

See XFormsPersistentApplicationStateStore.java for the current  
implementation.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: State handling using Oracle

Erik Bruchez
Administrator
In reply to this post by Wouter Zelle
The reason we use eXist or more generally a disk-based store is that  
we wanted to provide support for use cases such as:

* A portion of the users are not actively using forms, but eventually  
come back.
* Handling the "back" button, which requires retrieving the page's  
initial state.

This just means that there is more state to store, and since RAM is  
precious, we decided to offload this out of RAM.

So it would be possible to do away with external storage, but at the  
risk of losing some state information and we are not too keen on that.

-Erik

On May 20, 2009, at 2:06 AM, Wouter Zelle wrote:

> An even better alternative might be to no longer store the state on  
> disk, but simply keep it in the HttpSession only. Is this possible?
>
> Regards,
>
> Wouter Zelle
>
> On Wed, May 20, 2009 at 09:12, Wouter Zelle <[hidden email]>  
> wrote:
> Hi,
>
> I want to use Orbeon with Oracle and I prefer not to use Exist at  
> all. I've managed to get Orbeon to store form types and form data  
> into Oracle, but it still wants to use Exist when oxf.xforms.state-
> handling=server. I've found these properties that seem to configure  
> the storage for state handling:
>
>     <property as="xs:string"  
> name="oxf.xforms.store.application.username"              
> value="guest"/>
>     <property as="xs:string"  
> name="oxf.xforms.store.application.password"              
> value="guest"/>
>     <property as="xs:anyURI"  
> name="oxf.xforms.store.application.uri"                    
> value="xmldb:exist:///"/>
>     <property as="xs:string"  
> name="oxf.xforms.store.application.collection"            value="/db/
> orbeon/xforms/cache/"/>
>
> Is it possible to change these to use Oracle or is server side state  
> handling limited to an Exist DB?
>
> Regards,
>
> Wouter Zelle
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: State handling using Oracle

Wouter Zelle
Hi Erik,

So basically, if you have the memory to burn (which we do, assuming the memory use is somewhat reasonable), then you could just turn off disk persistence? It seems to me that this option could be added fairly easily in XFormsStateStore.java by checking a property and simply not expiring to the external storage when the property value is true. Then form states will be lost after an Orbeon restart, but there won't be any other loss of features, correct?

Regards,

Wouter


On Wed, May 20, 2009 at 17:42, Erik Bruchez <[hidden email]> wrote:
The reason we use eXist or more generally a disk-based store is that we wanted to provide support for use cases such as:

* A portion of the users are not actively using forms, but eventually come back.
* Handling the "back" button, which requires retrieving the page's initial state.

This just means that there is more state to store, and since RAM is precious, we decided to offload this out of RAM.

So it would be possible to do away with external storage, but at the risk of losing some state information and we are not too keen on that.

-Erik


On May 20, 2009, at 2:06 AM, Wouter Zelle wrote:

An even better alternative might be to no longer store the state on disk, but simply keep it in the HttpSession only. Is this possible?

Regards,

Wouter Zelle

On Wed, May 20, 2009 at 09:12, Wouter Zelle <[hidden email]> wrote:
Hi,

I want to use Orbeon with Oracle and I prefer not to use Exist at all. I've managed to get Orbeon to store form types and form data into Oracle, but it still wants to use Exist when oxf.xforms.state-handling=server. I've found these properties that seem to configure the storage for state handling:

   <property as="xs:string"  name="oxf.xforms.store.application.username"              value="guest"/>
   <property as="xs:string"  name="oxf.xforms.store.application.password"              value="guest"/>
   <property as="xs:anyURI"  name="oxf.xforms.store.application.uri"                   value="xmldb:exist:///"/>
   <property as="xs:string"  name="oxf.xforms.store.application.collection"            value="/db/orbeon/xforms/cache/"/>

Is it possible to change these to use Oracle or is server side state handling limited to an Exist DB?

Regards,

Wouter Zelle


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: State handling using Oracle

Alessandro Vernet
Administrator
Wouter,

Wouter Zelle wrote
So basically, if you have the memory to burn (which we do, assuming the
memory use is somewhat reasonable), then you could just turn off disk
persistence? It seems to me that this option could be added fairly easily in
XFormsStateStore.java by checking a property and simply not expiring to the
external storage when the property value is true. Then form states will be
lost after an Orbeon restart, but there won't be any other loss of features,
correct?
Correct, but you'd have to really make sure that you have enough memory for your application to run entirely in memory, otherwise your users will just get out of memory errors. It is a bit like disabling swapping on an operating system. Obviously you don't want any swapping to happen, and you want to have enough memory so the swap isn't used. But imagine that at one point you don't have enough memory; do you prefer your app to crash, or the swap to be used? Most people would go for the latter option.

Alex