You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Bruno Abitbol <br...@googlemail.com> on 2007/12/12 08:51:36 UTC

serving static binaries

Hi guys,

my problem is the following: I don't want to use any java input/output
stream  method  when  retrieving  binaries objects from the repository.
It would be great if apache can serve directly those binaries. Would it
be possible to replicate the binaries in a specific location (on the
file system) and save them with their extension. How should I proceed?

Many thanks for your help.

Re: serving static binaries

Posted by Bruno Abitbol <br...@googlemail.com>.
I will have a look.

cheers.

On Dec 12, 2007 8:57 AM, Michael Wechner <mi...@wyona.com> wrote:

> Bruno Abitbol wrote:
>
> >First thanks for your help and your very quick response.
> >
> >Yes, that's right, I prefer to have apache for serving read-only static
> >content.
> >It seems expensive on a simple http GET request to call the servlet
> >container,
> >the database (the blobs are stored on a postgreSQL DB because the
> >application is deployed on multiple nodes),
> >and java input/output stream.
> >
> >
>
> as an alternative you might want to consider mod_cache or something
> similar resp.
>
> http://svn.apache.org/repos/asf/lenya/sandbox/mod_lenya/README.txt
>
> resp.
>
>
> http://mail-archives.apache.org/mod_mbox/lenya-dev/200508.mbox/%3c4304B8EE.90405@j-hohwiller.de%3e
>
> cheers
>
> Michael
>
>
>
> >I will probably need to extend the SimpleDbPersistenceManager, this is
> the
> >one I've used for the application.
> >
> >On Dec 12, 2007 8:00 AM, Michael Wechner <mi...@wyona.com>
> wrote:
> >
> >
> >
> >>Bruno Abitbol wrote:
> >>
> >>
> >>
> >>>Hi guys,
> >>>
> >>>my problem is the following: I don't want to use any java input/output
> >>>stream  method  when  retrieving  binaries objects from the repository.
> >>>It would be great if apache can serve directly those binaries. Would it
> >>>be possible to replicate the binaries in a specific location (on the
> >>>file system) and save them with their extension. How should I proceed?
> >>>
> >>>
> >>>
> >>>
> >>I guess you would have to implement a custom persistance manager, which
> >>also saves "binary" data as regular files.
> >>
> >>But maybe you could explain a bit more about your processes. I guess you
> >>have a Java application which is using JCR, through which you would like
> >>to read/write data and at the same time you would like to serve the
> >>binary content as read-only through the Apache webserver, right?
> >>
> >>Cheers
> >>
> >>Michael
> >>
> >>
> >>
> >>>Many thanks for your help.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
> >>Michael Wechner
> >>Wyona      -   Open Source Content Management   -    Apache Lenya
> >>http://www.wyona.com                      http://lenya.apache.org
> >>michael.wechner@wyona.com                        michi@apache.org
> >>+41 44 272 91 61
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
> --
> Michael Wechner
> Wyona      -   Open Source Content Management   -    Apache Lenya
> http://www.wyona.com                      http://lenya.apache.org
> michael.wechner@wyona.com                        michi@apache.org
> +41 44 272 91 61
>
>

Re: serving static binaries

Posted by Michael Wechner <mi...@wyona.com>.
Bruno Abitbol wrote:

>First thanks for your help and your very quick response.
>
>Yes, that's right, I prefer to have apache for serving read-only static
>content.
>It seems expensive on a simple http GET request to call the servlet
>container,
>the database (the blobs are stored on a postgreSQL DB because the
>application is deployed on multiple nodes),
>and java input/output stream.
>  
>

as an alternative you might want to consider mod_cache or something 
similar resp.

http://svn.apache.org/repos/asf/lenya/sandbox/mod_lenya/README.txt

resp.

http://mail-archives.apache.org/mod_mbox/lenya-dev/200508.mbox/%3c4304B8EE.90405@j-hohwiller.de%3e

cheers

Michael



>I will probably need to extend the SimpleDbPersistenceManager, this is the
>one I've used for the application.
>
>On Dec 12, 2007 8:00 AM, Michael Wechner <mi...@wyona.com> wrote:
>
>  
>
>>Bruno Abitbol wrote:
>>
>>    
>>
>>>Hi guys,
>>>
>>>my problem is the following: I don't want to use any java input/output
>>>stream  method  when  retrieving  binaries objects from the repository.
>>>It would be great if apache can serve directly those binaries. Would it
>>>be possible to replicate the binaries in a specific location (on the
>>>file system) and save them with their extension. How should I proceed?
>>>
>>>
>>>      
>>>
>>I guess you would have to implement a custom persistance manager, which
>>also saves "binary" data as regular files.
>>
>>But maybe you could explain a bit more about your processes. I guess you
>>have a Java application which is using JCR, through which you would like
>>to read/write data and at the same time you would like to serve the
>>binary content as read-only through the Apache webserver, right?
>>
>>Cheers
>>
>>Michael
>>
>>    
>>
>>>Many thanks for your help.
>>>
>>>
>>>
>>>      
>>>
>>--
>>Michael Wechner
>>Wyona      -   Open Source Content Management   -    Apache Lenya
>>http://www.wyona.com                      http://lenya.apache.org
>>michael.wechner@wyona.com                        michi@apache.org
>>+41 44 272 91 61
>>
>>
>>    
>>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


Re: serving static binaries

Posted by Bruno Abitbol <br...@googlemail.com>.
First thanks for your help and your very quick response.

Yes, that's right, I prefer to have apache for serving read-only static
content.
It seems expensive on a simple http GET request to call the servlet
container,
the database (the blobs are stored on a postgreSQL DB because the
application is deployed on multiple nodes),
and java input/output stream.

I will probably need to extend the SimpleDbPersistenceManager, this is the
one I've used for the application.

On Dec 12, 2007 8:00 AM, Michael Wechner <mi...@wyona.com> wrote:

> Bruno Abitbol wrote:
>
> >Hi guys,
> >
> >my problem is the following: I don't want to use any java input/output
> >stream  method  when  retrieving  binaries objects from the repository.
> >It would be great if apache can serve directly those binaries. Would it
> >be possible to replicate the binaries in a specific location (on the
> >file system) and save them with their extension. How should I proceed?
> >
> >
>
> I guess you would have to implement a custom persistance manager, which
> also saves "binary" data as regular files.
>
> But maybe you could explain a bit more about your processes. I guess you
> have a Java application which is using JCR, through which you would like
> to read/write data and at the same time you would like to serve the
> binary content as read-only through the Apache webserver, right?
>
> Cheers
>
> Michael
>
> >Many thanks for your help.
> >
> >
> >
>
>
> --
> Michael Wechner
> Wyona      -   Open Source Content Management   -    Apache Lenya
> http://www.wyona.com                      http://lenya.apache.org
> michael.wechner@wyona.com                        michi@apache.org
> +41 44 272 91 61
>
>

Re: serving static binaries

Posted by Michael Wechner <mi...@wyona.com>.
Bruno Abitbol wrote:

>Hi guys,
>
>my problem is the following: I don't want to use any java input/output
>stream  method  when  retrieving  binaries objects from the repository.
>It would be great if apache can serve directly those binaries. Would it
>be possible to replicate the binaries in a specific location (on the
>file system) and save them with their extension. How should I proceed?
>  
>

I guess you would have to implement a custom persistance manager, which 
also saves "binary" data as regular files.

But maybe you could explain a bit more about your processes. I guess you 
have a Java application which is using JCR, through which you would like 
to read/write data and at the same time you would like to serve the 
binary content as read-only through the Apache webserver, right?

Cheers

Michael

>Many thanks for your help.
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61