Hi Andy,

Also, I intend to setup a load balancer on multiple instances of Fuseki2
> deployed on same server.
>

I don't follow - why LB multiple instances on the same machine?  What can't
Tomcat do? (Fuseki internally can handle multiple requests simultaneously)

My apologies. I wasn't clear enough.

This is to ensure high availability. In a PROD environment they are likely
to be on different machines but in our lower environments this may have to
be implemented on the same machine. I can see what you mean. Deploying
multiple instances on Tomcat might suffice.

Thanks,
Akhilesh

On Sat, Jan 16, 2016 at 2:24 AM, Andy Seaborne <[email protected]> wrote:

> On 15/01/16 13:35, Bangalore Akhilesh wrote:
>
>> Hi Andy,
>>
>> Thanks for your response.
>>
>> 1) I intend to deploy Fuseki as war. How do I include the config file
>> which
>>
>>> is supplied as command line argument?
>>>
>>>
>> Run Fuseki2 once, and it will create it's necessary files : /etc/fuseki
>>
>> There should be a config.ttl there.
>>
>> I am currently running Fuseki2 on a windows machine. Any idea where the
>> files get created?
>>
>
> Safest to search the machine filesystem for a file called "config.ttl".
>
> Also, I intend to setup a load balancer on multiple instances of Fuseki2
>> deployed on same server.
>>
>
> I don't follow - why LB multiple instances on the same machine?  What
> can't Tomcat do? (Fuseki internally can handle multiple requests
> simultaneously)
>
> In which case, where will the files be created?
>> Can both the instances access the same config file?
>>
>
> Probably - they both end up with JDBC connections to the same SQL instance
> so I'm that clear what is gained here.
>
> If it is performance, TDB is faster and scales better than SDB.
>
> TDB is the database engine - to share a TDB database use Fuseki to handle
> multiple clients.
>
>     Andy
>
>
>
>> 2) Is there a way to supply a (pooled) datasource as a JNDI name instead
>> of
>>
>>> just the connection parameters?
>>>
>>>
>> Personally, I don't know.  I haven't run it that way; I used the
>> jetty-based server version. Maybe someone else here can give you the
>> recipe. Maybe someone connected with VIVO?
>>
>> I do not know what is VIVO? Can you please point me in the right
>> direction?
>>
>> Cheers,
>> Akhilesh
>>
>> On Fri, Jan 15, 2016 at 4:10 PM, Andy Seaborne <[email protected]> wrote:
>>
>> On 15/01/16 04:00, Bangalore Akhilesh wrote:
>>>
>>> Hi Andy,
>>>>
>>>> I was able to work it out. From the documentation I was able to
>>>> understand
>>>> which tables to include but the complete schema definition was not
>>>> clear.
>>>>
>>>> I had to create a utility (not a very bright one) to create the schema
>>>> on
>>>> oracle:
>>>>
>>>> import java.sql.*;
>>>> import org.apache.jena.sdb.sql.*;
>>>> import org.apache.jena.sdb.layout2.hash.*;
>>>>
>>>> public class OracleSchemaCreator {
>>>>
>>>>     public static void main(String... args) throws Exception {
>>>>    Class.forName("oracle.jdbc.driver.OracleDriver");
>>>>    Connection conn =
>>>> DriverManager.getConnection("jdbc:oracle:thin:@localhost
>>>> :1521:XE","dbuser","dbpassword");
>>>>
>>>>          SDBConnection sdbConn = new SDBConnection(conn);
>>>>    FmtLayout2HashOracle oracleLayout = new
>>>> FmtLayout2HashOracle(sdbConn);
>>>>
>>>>    oracleLayout.create();
>>>>
>>>>     }
>>>> }
>>>>
>>>>
>>> The tools do this.
>>>
>>> if no where else, scripts are in:
>>>
>>> https://github.com/apache/jena/tree/master/jena-sdb/bin
>>>
>>> or call "sdb.sdbconfig.main" from Java.
>>>
>>>
>>> Couple of things on which I request your help:
>>>
>>>>
>>>> 1) I intend to deploy Fuseki as war. How do I include the config file
>>>> which
>>>> is supplied as command line argument?
>>>>
>>>>
>>> Run Fuseki2 once, and it will create it's necessary files : /etc/fuseki
>>>
>>> There should be a config.ttl there.
>>>
>>>
>>> 2) Is there a way to supply a (pooled) datasource as a JNDI name instead
>>> of
>>>
>>>> just the connection parameters?
>>>>
>>>>
>>> Personally, I don't know.  I haven't run it that way; I used the
>>> jetty-based server version. Maybe someone else here can give you the
>>> recipe. Maybe someone connected with VIVO?
>>>
>>>          Andy
>>>
>>>
>>> Thanks,
>>>
>>>> Akhilesh
>>>>
>>>> On Thu, Jan 14, 2016 at 9:41 PM, Andy Seaborne <[email protected]> wrote:
>>>>
>>>> On 14/01/16 09:46, Bangalore Akhilesh wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>>
>>>>>> I would like to know the steps involved in setting up Fuseki to work
>>>>>> with
>>>>>> SDB against Oracle database. Can one of you please help?
>>>>>>
>>>>>> Also, does Fuseki2 work as expected with SDB?
>>>>>>
>>>>>> Thanks,
>>>>>> Akhilesh
>>>>>>
>>>>>>
>>>>>> Hi Akhilesh,
>>>>>>
>>>>>
>>>>> It works (I just checked) though it is a bit tricky.  It is easily
>>>>> influenced by the external environment.
>>>>>
>>>>> 1/ Get the jars onto the Fuseki class path - it's easier to take the
>>>>> script or however you are running it and change it to put the jars and
>>>>> the
>>>>> fuseki server jar, use -cp and then main entry point:
>>>>>
>>>>> org.apache.jena.fuseki.cmd.FusekiCmd
>>>>>
>>>>> The "fuseki-dev" script in
>>>>>
>>>>>
>>>>> https://github.com/apache/jena/tree/master/jena-fuseki2/jena-fuseki-core
>>>>>
>>>>> may help. It does not use a standalone jar.
>>>>>
>>>>> (Or download source and modify the POM and rebuild - once you have that
>>>>> working you can have a completely self contained jar for the server.
>>>>> Convenient, but it takes more to set up.)
>>>>>
>>>>> 2/
>>>>> If you have a store description for an SDB store,
>>>>>
>>>>> http://jena.apache.org/documentation/sdb/
>>>>> http://jena.apache.org/documentation/sdb/fuseki_integration.html
>>>>>
>>>>> You need a fuseki configuration file including stuff in the server file
>>>>> (config.ttl). I didn't test in different "configuration/" files.
>>>>>
>>>>> ---- config.ttl
>>>>> @prefix :        <#> .
>>>>> @prefix fuseki:  <http://jena.apache.org/fuseki#> .
>>>>> @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>>>>>
>>>>> @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
>>>>> @prefix sdb:     <http://jena.hpl.hp.com/2007/sdb#> .
>>>>> @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
>>>>>
>>>>> [] rdf:type fuseki:Server ;
>>>>>       ## Initialize SDB.
>>>>>       ja:loadClass "org.apache.jena.sdb.SDB" ;
>>>>>       fuseki:services (
>>>>>         <#service1>
>>>>>       ) .
>>>>>
>>>>> # Probably unnecessary nowadays in a Fuseki description.
>>>>> # sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .
>>>>>
>>>>> <#service1> rdf:type fuseki:Service ;
>>>>>       # URI of the dataset -- http://host:port/ds
>>>>>       fuseki:name                        "ds" ;
>>>>>       fuseki:serviceQuery                "sparql" ;
>>>>>       fuseki:serviceQuery                "query" ;
>>>>>       fuseki:serviceUpdate               "update" ;
>>>>>       fuseki:serviceUpload               "upload" ;
>>>>>       fuseki:serviceReadWriteGraphStore  "data" ;
>>>>>       fuseki:serviceReadGraphStore       "get" ;
>>>>>       fuseki:dataset                     <#dataset> ;
>>>>>       .
>>>>>
>>>>>       <#dataset> rdf:type sdb:DatasetStore ;
>>>>>           sdb:store <#store> .
>>>>>
>>>>>       <#store> rdf:type sdb:Store ;
>>>>>           sdb:layout     "layout2" ;
>>>>>           sdb:connection <#conn> ;
>>>>>           .
>>>>>
>>>>>       <#conn> rdf:type sdb:SDBConnection ;
>>>>>           ... your setup ...
>>>>> -----
>>>>> ja:loadClass will become unnecessary in 3.1.0
>>>>>
>>>>>
>>>>> An example (and not tested recently) Oracle setup for a Store:
>>>>>
>>>>>
>>>>> https://github.com/apache/jena/blob/master/jena-sdb/Store/sdb-oracle.ttl
>>>>>
>>>>>
>>>>> If you get it to work, I'll revise the documentation some more.
>>>>>
>>>>>           Andy
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to