Re: Caching in Fuseki service
I'm using absolute paths everywhere, so not sure why it can't find the database. I run fuseki as below: /absolute/path/to/fuseki-server - - loc=/absolute/path/to/tdb/database /database-name On Sun, 24 Nov, 2019, 12:18 AM Andy Seaborne, wrote: > > > On 23/11/2019 16:06, Amandeep Srivastava wrote: > > Got it, thanks guys. > > > > I faced another issue while running fuseki as a standalone server. When I > > try to call fuseki-server from an outside directory (not the > > apache-Jena-fuseki dir), the service runs but doesn't load the tdb > dataset. > > Whereas when I call it from within its dir, it loads my tdb dataset and 2 > > test datasets normally. > > > > Any suggestions, how can I run it from another dir? > > When you run it in an outside directory, the current working directory > is different. > > May be that is the reason it does not find the DB. > > Otherwise, please say exactly how you invoke the server - what args do > you use? > > > > > On Fri, 22 Nov, 2019, 9:30 PM ajs6f, wrote: > > > >> You would provide both datasets at Fuseki and then us a reverse proxy > >> (like Varnish) to switch between the two endpoints. Anything more > specific > >> would depend on the reverse proxy you select. > >> > >> ajs6f > >> > >>> On Nov 22, 2019, at 1:06 AM, Martynas Jusevičius < > marty...@atomgraph.com> > >> wrote: > >>> > >>> Varnish is a reverse proxy cache: > >>> https://varnish-cache.org/docs/trunk/tutorial/introduction.html > >>> > >>> On Fri, 22 Nov 2019 at 01.33, Amandeep Srivastava < > >>> amandeep.srivastava1...@gmail.com> wrote: > >>> > Thanks Andy, ajs6f > > I wanted to use the soft links because I'll be updating my database > once > every month. Whenever I have a new database, I'll overwrite inactive > database and point the softlink to it making it active and the current > >> one > inactive (stale) without bringing down fuseki and losing any requests. > >> Next > time I would overwrite second database and switch back to it. But > >> seems, > that won't work because of caching. > > Can you please elaborate how to do it using reverse proxy? > > > On Thu, 21 Nov, 2019, 11:08 PM Andy Seaborne, > wrote: > > > > > > > On 21/11/2019 17:16, ajs6f wrote: > >> Why wouldn't you just load these as two separate datasets available > at > > different endpoints in one instance of Fuseki? Why try to fool Fuseki > into > > thinking that two datasets are really one? > > > > Agreed. > > > >> > >> ajs6f > >> > >>> On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava < > > amandeep.srivastava1...@gmail.com> wrote: > >>> > >>> Hi, > >>> > >>> Is there any resource that talks about caching in Fuseki service? > >>> > >>> Is is handled by Fuseki server itself or the TDB? (I'm using tdb > > dataset in > >>> the backend as input) And can we disable the cache? > >>> > >>> My use case is to query two dumps, one old and one new and I'm > >> setting > > - - > >>> loc to a soft link pointing to the new dump while running fuseki. > > > > In effect, symbolic links are resolved at he start and never checked > again. > > > >>> At times, > >>> I wish to point my soft link to the older dump and query that. I > >> don't > > want > >>> to run another instance of the server. > >>> > >>> By understanding caching, I just want to make sure that when I > point > my > >>> soft link to new location, fuseki service doesn't use its older > cache > to > >>> answer incoming queries. > > > > You can't manipulate the file system going underneath Fuseki or TDB. > > Mostly, likely it simply won't notice (the file are already open) but > >> it > > may be worse. > > > > If you want to swap datasets in-place you'll need to stop and restart > > Fuseki. > > > > One different way is to use a reverse proxy (httpd for example) and > >> have > > two Fuseki servers. Switchover in the reverse proxy - they usually > > reload configs while running, preserving oustanding requests. > > > > Andy > > > > > > > >>> > >>> Thanks, > >>> Aman > >> > > > > >> > >> > > >
Re: Caching in Fuseki service
On 23/11/2019 16:06, Amandeep Srivastava wrote: Got it, thanks guys. I faced another issue while running fuseki as a standalone server. When I try to call fuseki-server from an outside directory (not the apache-Jena-fuseki dir), the service runs but doesn't load the tdb dataset. Whereas when I call it from within its dir, it loads my tdb dataset and 2 test datasets normally. Any suggestions, how can I run it from another dir? When you run it in an outside directory, the current working directory is different. May be that is the reason it does not find the DB. Otherwise, please say exactly how you invoke the server - what args do you use? On Fri, 22 Nov, 2019, 9:30 PM ajs6f, wrote: You would provide both datasets at Fuseki and then us a reverse proxy (like Varnish) to switch between the two endpoints. Anything more specific would depend on the reverse proxy you select. ajs6f On Nov 22, 2019, at 1:06 AM, Martynas Jusevičius wrote: Varnish is a reverse proxy cache: https://varnish-cache.org/docs/trunk/tutorial/introduction.html On Fri, 22 Nov 2019 at 01.33, Amandeep Srivastava < amandeep.srivastava1...@gmail.com> wrote: Thanks Andy, ajs6f I wanted to use the soft links because I'll be updating my database once every month. Whenever I have a new database, I'll overwrite inactive database and point the softlink to it making it active and the current one inactive (stale) without bringing down fuseki and losing any requests. Next time I would overwrite second database and switch back to it. But seems, that won't work because of caching. Can you please elaborate how to do it using reverse proxy? On Thu, 21 Nov, 2019, 11:08 PM Andy Seaborne, wrote: On 21/11/2019 17:16, ajs6f wrote: Why wouldn't you just load these as two separate datasets available at different endpoints in one instance of Fuseki? Why try to fool Fuseki into thinking that two datasets are really one? Agreed. ajs6f On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava < amandeep.srivastava1...@gmail.com> wrote: Hi, Is there any resource that talks about caching in Fuseki service? Is is handled by Fuseki server itself or the TDB? (I'm using tdb dataset in the backend as input) And can we disable the cache? My use case is to query two dumps, one old and one new and I'm setting - - loc to a soft link pointing to the new dump while running fuseki. In effect, symbolic links are resolved at he start and never checked again. At times, I wish to point my soft link to the older dump and query that. I don't want to run another instance of the server. By understanding caching, I just want to make sure that when I point my soft link to new location, fuseki service doesn't use its older cache to answer incoming queries. You can't manipulate the file system going underneath Fuseki or TDB. Mostly, likely it simply won't notice (the file are already open) but it may be worse. If you want to swap datasets in-place you'll need to stop and restart Fuseki. One different way is to use a reverse proxy (httpd for example) and have two Fuseki servers. Switchover in the reverse proxy - they usually reload configs while running, preserving oustanding requests. Andy Thanks, Aman
Re: Caching in Fuseki service
Got it, thanks guys. I faced another issue while running fuseki as a standalone server. When I try to call fuseki-server from an outside directory (not the apache-Jena-fuseki dir), the service runs but doesn't load the tdb dataset. Whereas when I call it from within its dir, it loads my tdb dataset and 2 test datasets normally. Any suggestions, how can I run it from another dir? On Fri, 22 Nov, 2019, 9:30 PM ajs6f, wrote: > You would provide both datasets at Fuseki and then us a reverse proxy > (like Varnish) to switch between the two endpoints. Anything more specific > would depend on the reverse proxy you select. > > ajs6f > > > On Nov 22, 2019, at 1:06 AM, Martynas Jusevičius > wrote: > > > > Varnish is a reverse proxy cache: > > https://varnish-cache.org/docs/trunk/tutorial/introduction.html > > > > On Fri, 22 Nov 2019 at 01.33, Amandeep Srivastava < > > amandeep.srivastava1...@gmail.com> wrote: > > > >> Thanks Andy, ajs6f > >> > >> I wanted to use the soft links because I'll be updating my database once > >> every month. Whenever I have a new database, I'll overwrite inactive > >> database and point the softlink to it making it active and the current > one > >> inactive (stale) without bringing down fuseki and losing any requests. > Next > >> time I would overwrite second database and switch back to it. But > seems, > >> that won't work because of caching. > >> > >> Can you please elaborate how to do it using reverse proxy? > >> > >> > >> On Thu, 21 Nov, 2019, 11:08 PM Andy Seaborne, wrote: > >> > >>> > >>> > >>> On 21/11/2019 17:16, ajs6f wrote: > Why wouldn't you just load these as two separate datasets available at > >>> different endpoints in one instance of Fuseki? Why try to fool Fuseki > >> into > >>> thinking that two datasets are really one? > >>> > >>> Agreed. > >>> > > ajs6f > > > On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava < > >>> amandeep.srivastava1...@gmail.com> wrote: > > > > Hi, > > > > Is there any resource that talks about caching in Fuseki service? > > > > Is is handled by Fuseki server itself or the TDB? (I'm using tdb > >>> dataset in > > the backend as input) And can we disable the cache? > > > > My use case is to query two dumps, one old and one new and I'm > setting > >>> - - > > loc to a soft link pointing to the new dump while running fuseki. > >>> > >>> In effect, symbolic links are resolved at he start and never checked > >> again. > >>> > > At times, > > I wish to point my soft link to the older dump and query that. I > don't > >>> want > > to run another instance of the server. > > > > By understanding caching, I just want to make sure that when I point > >> my > > soft link to new location, fuseki service doesn't use its older cache > >> to > > answer incoming queries. > >>> > >>> You can't manipulate the file system going underneath Fuseki or TDB. > >>> Mostly, likely it simply won't notice (the file are already open) but > it > >>> may be worse. > >>> > >>> If you want to swap datasets in-place you'll need to stop and restart > >>> Fuseki. > >>> > >>> One different way is to use a reverse proxy (httpd for example) and > have > >>> two Fuseki servers. Switchover in the reverse proxy - they usually > >>> reload configs while running, preserving oustanding requests. > >>> > >>> Andy > >>> > >>> > >>> > > > > Thanks, > > Aman > > >>> > >> > >
Re: Caching in Fuseki service
You would provide both datasets at Fuseki and then us a reverse proxy (like Varnish) to switch between the two endpoints. Anything more specific would depend on the reverse proxy you select. ajs6f > On Nov 22, 2019, at 1:06 AM, Martynas Jusevičius > wrote: > > Varnish is a reverse proxy cache: > https://varnish-cache.org/docs/trunk/tutorial/introduction.html > > On Fri, 22 Nov 2019 at 01.33, Amandeep Srivastava < > amandeep.srivastava1...@gmail.com> wrote: > >> Thanks Andy, ajs6f >> >> I wanted to use the soft links because I'll be updating my database once >> every month. Whenever I have a new database, I'll overwrite inactive >> database and point the softlink to it making it active and the current one >> inactive (stale) without bringing down fuseki and losing any requests. Next >> time I would overwrite second database and switch back to it. But seems, >> that won't work because of caching. >> >> Can you please elaborate how to do it using reverse proxy? >> >> >> On Thu, 21 Nov, 2019, 11:08 PM Andy Seaborne, wrote: >> >>> >>> >>> On 21/11/2019 17:16, ajs6f wrote: Why wouldn't you just load these as two separate datasets available at >>> different endpoints in one instance of Fuseki? Why try to fool Fuseki >> into >>> thinking that two datasets are really one? >>> >>> Agreed. >>> ajs6f > On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava < >>> amandeep.srivastava1...@gmail.com> wrote: > > Hi, > > Is there any resource that talks about caching in Fuseki service? > > Is is handled by Fuseki server itself or the TDB? (I'm using tdb >>> dataset in > the backend as input) And can we disable the cache? > > My use case is to query two dumps, one old and one new and I'm setting >>> - - > loc to a soft link pointing to the new dump while running fuseki. >>> >>> In effect, symbolic links are resolved at he start and never checked >> again. >>> > At times, > I wish to point my soft link to the older dump and query that. I don't >>> want > to run another instance of the server. > > By understanding caching, I just want to make sure that when I point >> my > soft link to new location, fuseki service doesn't use its older cache >> to > answer incoming queries. >>> >>> You can't manipulate the file system going underneath Fuseki or TDB. >>> Mostly, likely it simply won't notice (the file are already open) but it >>> may be worse. >>> >>> If you want to swap datasets in-place you'll need to stop and restart >>> Fuseki. >>> >>> One different way is to use a reverse proxy (httpd for example) and have >>> two Fuseki servers. Switchover in the reverse proxy - they usually >>> reload configs while running, preserving oustanding requests. >>> >>> Andy >>> >>> >>> > > Thanks, > Aman >>> >>
Re: Caching in Fuseki service
Varnish is a reverse proxy cache: https://varnish-cache.org/docs/trunk/tutorial/introduction.html On Fri, 22 Nov 2019 at 01.33, Amandeep Srivastava < amandeep.srivastava1...@gmail.com> wrote: > Thanks Andy, ajs6f > > I wanted to use the soft links because I'll be updating my database once > every month. Whenever I have a new database, I'll overwrite inactive > database and point the softlink to it making it active and the current one > inactive (stale) without bringing down fuseki and losing any requests. Next > time I would overwrite second database and switch back to it. But seems, > that won't work because of caching. > > Can you please elaborate how to do it using reverse proxy? > > > On Thu, 21 Nov, 2019, 11:08 PM Andy Seaborne, wrote: > > > > > > > On 21/11/2019 17:16, ajs6f wrote: > > > Why wouldn't you just load these as two separate datasets available at > > different endpoints in one instance of Fuseki? Why try to fool Fuseki > into > > thinking that two datasets are really one? > > > > Agreed. > > > > > > > > ajs6f > > > > > >> On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava < > > amandeep.srivastava1...@gmail.com> wrote: > > >> > > >> Hi, > > >> > > >> Is there any resource that talks about caching in Fuseki service? > > >> > > >> Is is handled by Fuseki server itself or the TDB? (I'm using tdb > > dataset in > > >> the backend as input) And can we disable the cache? > > >> > > >> My use case is to query two dumps, one old and one new and I'm setting > > - - > > >> loc to a soft link pointing to the new dump while running fuseki. > > > > In effect, symbolic links are resolved at he start and never checked > again. > > > > >> At times, > > >> I wish to point my soft link to the older dump and query that. I don't > > want > > >> to run another instance of the server. > > >> > > >> By understanding caching, I just want to make sure that when I point > my > > >> soft link to new location, fuseki service doesn't use its older cache > to > > >> answer incoming queries. > > > > You can't manipulate the file system going underneath Fuseki or TDB. > > Mostly, likely it simply won't notice (the file are already open) but it > > may be worse. > > > > If you want to swap datasets in-place you'll need to stop and restart > > Fuseki. > > > > One different way is to use a reverse proxy (httpd for example) and have > > two Fuseki servers. Switchover in the reverse proxy - they usually > > reload configs while running, preserving oustanding requests. > > > > Andy > > > > > > > > >> > > >> Thanks, > > >> Aman > > > > > >
Re: Caching in Fuseki service
Thanks Andy, ajs6f I wanted to use the soft links because I'll be updating my database once every month. Whenever I have a new database, I'll overwrite inactive database and point the softlink to it making it active and the current one inactive (stale) without bringing down fuseki and losing any requests. Next time I would overwrite second database and switch back to it. But seems, that won't work because of caching. Can you please elaborate how to do it using reverse proxy? On Thu, 21 Nov, 2019, 11:08 PM Andy Seaborne, wrote: > > > On 21/11/2019 17:16, ajs6f wrote: > > Why wouldn't you just load these as two separate datasets available at > different endpoints in one instance of Fuseki? Why try to fool Fuseki into > thinking that two datasets are really one? > > Agreed. > > > > > ajs6f > > > >> On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava < > amandeep.srivastava1...@gmail.com> wrote: > >> > >> Hi, > >> > >> Is there any resource that talks about caching in Fuseki service? > >> > >> Is is handled by Fuseki server itself or the TDB? (I'm using tdb > dataset in > >> the backend as input) And can we disable the cache? > >> > >> My use case is to query two dumps, one old and one new and I'm setting > - - > >> loc to a soft link pointing to the new dump while running fuseki. > > In effect, symbolic links are resolved at he start and never checked again. > > >> At times, > >> I wish to point my soft link to the older dump and query that. I don't > want > >> to run another instance of the server. > >> > >> By understanding caching, I just want to make sure that when I point my > >> soft link to new location, fuseki service doesn't use its older cache to > >> answer incoming queries. > > You can't manipulate the file system going underneath Fuseki or TDB. > Mostly, likely it simply won't notice (the file are already open) but it > may be worse. > > If you want to swap datasets in-place you'll need to stop and restart > Fuseki. > > One different way is to use a reverse proxy (httpd for example) and have > two Fuseki servers. Switchover in the reverse proxy - they usually > reload configs while running, preserving oustanding requests. > > Andy > > > > >> > >> Thanks, > >> Aman > > >
Re: Caching in Fuseki service
On 21/11/2019 17:16, ajs6f wrote: Why wouldn't you just load these as two separate datasets available at different endpoints in one instance of Fuseki? Why try to fool Fuseki into thinking that two datasets are really one? Agreed. ajs6f On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava wrote: Hi, Is there any resource that talks about caching in Fuseki service? Is is handled by Fuseki server itself or the TDB? (I'm using tdb dataset in the backend as input) And can we disable the cache? My use case is to query two dumps, one old and one new and I'm setting - - loc to a soft link pointing to the new dump while running fuseki. In effect, symbolic links are resolved at he start and never checked again. At times, I wish to point my soft link to the older dump and query that. I don't want to run another instance of the server. By understanding caching, I just want to make sure that when I point my soft link to new location, fuseki service doesn't use its older cache to answer incoming queries. You can't manipulate the file system going underneath Fuseki or TDB. Mostly, likely it simply won't notice (the file are already open) but it may be worse. If you want to swap datasets in-place you'll need to stop and restart Fuseki. One different way is to use a reverse proxy (httpd for example) and have two Fuseki servers. Switchover in the reverse proxy - they usually reload configs while running, preserving oustanding requests. Andy Thanks, Aman
Re: Caching in Fuseki service
Why wouldn't you just load these as two separate datasets available at different endpoints in one instance of Fuseki? Why try to fool Fuseki into thinking that two datasets are really one? ajs6f > On Nov 21, 2019, at 6:57 AM, Amandeep Srivastava > wrote: > > Hi, > > Is there any resource that talks about caching in Fuseki service? > > Is is handled by Fuseki server itself or the TDB? (I'm using tdb dataset in > the backend as input) And can we disable the cache? > > My use case is to query two dumps, one old and one new and I'm setting - - > loc to a soft link pointing to the new dump while running fuseki. At times, > I wish to point my soft link to the older dump and query that. I don't want > to run another instance of the server. > > By understanding caching, I just want to make sure that when I point my > soft link to new location, fuseki service doesn't use its older cache to > answer incoming queries. > > Thanks, > Aman