Re: develop app needs running exist

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: develop app needs running exist

Grant MacKenzie
> These are internal eXist-db files, it should indeed be better if files and data would be less readable and recognisable.

No no no. I strongly disagree.  The interaction required, is a read
via a  reverse proxy.
This is for performance reasons. You shouldn't make a call to your
back end if you don't have to.
-  For dynamic content, you can cache your queries..
-  For static files you can by pass a call to the database and get the
reverse proxy to fetch the file directly

Nginx is known as being extremely good at serving static files.
It has several tricks up it's sleeve... using open file descriptors etc
My  nginx location blocks for a static assets like css, js, images icons etc...
look like ...
location ~* ^(/resources/(styles|scripts)/.+)$ {
  expires max;
  gzip off;
  gzip_static  always;
  gunzip on;
  root $fsAssetsPath;
}

All eXist stored asset files are gzipped,
declare that nginx to serve the static  gzipped file directly (low
memory footprint )
If the client can't handle the gzipped file then gunzip kicks in.
declare the root path to look for file ( eXist fs. )

> You should only interact using the exist-db APIs via HTTP.

I would think, a read operation is OK, however, you should not modify,
delete or create files directly.
--
Take Care
Grant Mackenzie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: develop app needs running exist

Dannes Wessels-3
Hi Grant,

I did not think about this route, it is kinda brilliant :-)

Please note that it is not designed to work this way, but as it works….. Read only should be safe enough, the drawback I could think of is that eXist’s authentication/authorization layer is not in the loop.

thnx for sharing, maybe we can document it e.g. on the atomic-wiki.

cheers

Danneds



On 25 Mar 2017, at 5:54 , Grant MacKenzie <[hidden email]> wrote:

These are internal eXist-db files, it should indeed be better if files and data would be less readable and recognisable.

No no no. I strongly disagree.  The interaction required, is a read
via a  reverse proxy.
This is for performance reasons. You shouldn't make a call to your
back end if you don't have to.
-  For dynamic content, you can cache your queries..
-  For static files you can by pass a call to the database and get the
reverse proxy to fetch the file directly

Nginx is known as being extremely good at serving static files.
It has several tricks up it's sleeve... using open file descriptors etc
My  nginx location blocks for a static assets like css, js, images icons etc...
look like ...
location ~* ^(/resources/(styles|scripts)/.+)$ {
 expires max;
 gzip off;
 gzip_static  always;
 gunzip on;
 root $fsAssetsPath;
}

All eXist stored asset files are gzipped,
declare that nginx to serve the static  gzipped file directly (low
memory footprint )
If the client can't handle the gzipped file then gunzip kicks in.
declare the root path to look for file ( eXist fs. )

You should only interact using the exist-db APIs via HTTP.

I would think, a read operation is OK, however, you should not modify,
delete or create files directly.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: develop app needs running exist

Adam Retter
It is not a good idea at all, as the operating system may place read
locks on the files which will content with the read/write locks that
might otherwise be assigned by the operating system to eXist.

Also the layout of the fs/ dir will likely change in the near future,
as I have some outstanding fixes for corruptions that can happen in
that folder due to bad transaction lock ordering in the db.

On 25 March 2017 at 16:35, Dannes Wessels <[hidden email]> wrote:

> Hi Grant,
>
> I did not think about this route, it is kinda brilliant :-)
>
> Please note that it is not designed to work this way, but as it works…..
> Read only should be safe enough, the drawback I could think of is that
> eXist’s authentication/authorization layer is not in the loop.
>
> thnx for sharing, maybe we can document it e.g. on the atomic-wiki.
>
> cheers
>
> Danneds
>
>
>
> On 25 Mar 2017, at 5:54 , Grant MacKenzie <[hidden email]> wrote:
>
> These are internal eXist-db files, it should indeed be better if files and
> data would be less readable and recognisable.
>
>
> No no no. I strongly disagree.  The interaction required, is a read
> via a  reverse proxy.
> This is for performance reasons. You shouldn't make a call to your
> back end if you don't have to.
> -  For dynamic content, you can cache your queries..
> -  For static files you can by pass a call to the database and get the
> reverse proxy to fetch the file directly
>
> Nginx is known as being extremely good at serving static files.
> It has several tricks up it's sleeve... using open file descriptors etc
> My  nginx location blocks for a static assets like css, js, images icons
> etc...
> look like ...
> location ~* ^(/resources/(styles|scripts)/.+)$ {
>  expires max;
>  gzip off;
>  gzip_static  always;
>  gunzip on;
>  root $fsAssetsPath;
> }
>
> All eXist stored asset files are gzipped,
> declare that nginx to serve the static  gzipped file directly (low
> memory footprint )
> If the client can't handle the gzipped file then gunzip kicks in.
> declare the root path to look for file ( eXist fs. )
>
> You should only interact using the exist-db APIs via HTTP.
>
>
> I would think, a read operation is OK, however, you should not modify,
> delete or create files directly.
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: develop app needs running exist

Adam Retter
"which will content" should of read "which will contend"

On 26 March 2017 at 13:03, Adam Retter <[hidden email]> wrote:

> It is not a good idea at all, as the operating system may place read
> locks on the files which will content with the read/write locks that
> might otherwise be assigned by the operating system to eXist.
>
> Also the layout of the fs/ dir will likely change in the near future,
> as I have some outstanding fixes for corruptions that can happen in
> that folder due to bad transaction lock ordering in the db.
>
> On 25 March 2017 at 16:35, Dannes Wessels <[hidden email]> wrote:
>> Hi Grant,
>>
>> I did not think about this route, it is kinda brilliant :-)
>>
>> Please note that it is not designed to work this way, but as it works…..
>> Read only should be safe enough, the drawback I could think of is that
>> eXist’s authentication/authorization layer is not in the loop.
>>
>> thnx for sharing, maybe we can document it e.g. on the atomic-wiki.
>>
>> cheers
>>
>> Danneds
>>
>>
>>
>> On 25 Mar 2017, at 5:54 , Grant MacKenzie <[hidden email]> wrote:
>>
>> These are internal eXist-db files, it should indeed be better if files and
>> data would be less readable and recognisable.
>>
>>
>> No no no. I strongly disagree.  The interaction required, is a read
>> via a  reverse proxy.
>> This is for performance reasons. You shouldn't make a call to your
>> back end if you don't have to.
>> -  For dynamic content, you can cache your queries..
>> -  For static files you can by pass a call to the database and get the
>> reverse proxy to fetch the file directly
>>
>> Nginx is known as being extremely good at serving static files.
>> It has several tricks up it's sleeve... using open file descriptors etc
>> My  nginx location blocks for a static assets like css, js, images icons
>> etc...
>> look like ...
>> location ~* ^(/resources/(styles|scripts)/.+)$ {
>>  expires max;
>>  gzip off;
>>  gzip_static  always;
>>  gunzip on;
>>  root $fsAssetsPath;
>> }
>>
>> All eXist stored asset files are gzipped,
>> declare that nginx to serve the static  gzipped file directly (low
>> memory footprint )
>> If the client can't handle the gzipped file then gunzip kicks in.
>> declare the root path to look for file ( eXist fs. )
>>
>> You should only interact using the exist-db APIs via HTTP.
>>
>>
>> I would think, a read operation is OK, however, you should not modify,
>> delete or create files directly.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Exist-open mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>
>
>
> --
> Adam Retter
>
> eXist Developer
> { United Kingdom }
> [hidden email]
> irc://irc.freenode.net/existdb



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...