• Topic
  • Discussion
  • VOS.VirtEC2AMIDBpediaInstall(Last) -- DAVWikiAdmin? , 2017-06-29 07:36:59 Edit WebDAV System Administrator 2017-06-29 03:36:59

    Installing the DBpedia data set on a Virtuoso EC2 AMI instance

    OpenLink Software provides a backup of the current DBpedia Database as hosted on the live service at http://dbpedia.org/, that users can restore into a Virtuoso EC2 AMI instance in the cloud, giving them an instance of DBpedia for their own use.

    Prerequisites

    • A Virtuoso EC2 AMI instance.



      • Note that a Virtuoso Release 5 AMI instance (ami-id ami-59628630 or ami-c46084ad) must be used with this backup.
      • The live DBpedia instance is an m1.large EC2 instance type, and we recommend a 64-bit large image AMI instance with at least 8GB of memory for best performance.

    Safeguarding Your SPARQL End-point

    Important — The following section should be added to the Virtuoso configuration file (/opt/virtuoso/database/virtuoso.ini) to control and safeguard your SPARQL end-point against overzealous usage:


    [SPARQL]
    MaxCacheExpiration         = 1    ; Cache Expiration time in seconds that overrides Sponger's default cache invalidation scheme
    ExternalQuerySource        = 1
    ExternalXsltSource         = 1
    ResultSetMaxRows           = 100000
    ;DefaultGraph               = http://demo.openlinksw.com/dataspace/person/demo
    MaxQueryCostEstimationTime = 10000    ; in seconds
    MaxQueryExecutionTime      = 30    ; in seconds
    ;ImmutableGraphs            = http://unknown:8890/dataspace
    ;PingService                = http://rpc.pingthesemanticweb.com/
    DefaultQuery               = select distinct ?URI ?ObjectType where {?URI a ?ObjectType} limit 50
    DeferInferenceRulesInit    = 0  ;  Defer Loading of inference rules at start up
    

    Details about these settings can be found in the Virtuoso Online Documentation in the SPARQL Configuration File section. The "DeferInferenceRulesInit = 1" setting is important when hosting large RDF data sets like DBpedia, as it defers the load of the inference rules which can take quite some time (up to an hour) during server startup.

    OAuth support can be used to secure the SPARQL endpoint by installing the conductor_dav.vad VAD package. This allows the /sparql endpoint to be disabled or mapped to the Virtuoso OAuth SPARQL service thereby requiring an API key to use the endpoint as detailed in the Virtuoso OAuth documentation.

    Virtuoso Web Services ACLs can be used to control (limit) access to the SPARQL endpoint as detailed in the documentation link.

    DBpedia VAD Application Package

    If you are running a Virtuoso EC2 AMI instance created before December 2, 2008, you will need to update your DBpedia VAD Application package to obtain the latest enhancements, by taking the following steps --

    1. Download the DBpedia VAD Application (dbpedia_dav.vad) package.
    2. Navigate to the "System Admin" -> "Packages" tab of the Virtuoso Conductor.



    3. Scroll down to the "Install Package" section of the tab, use the "Upload Package" option "browse" button.



    4. Navigate to the location of the downloaded dbpedia_dav.vad file and click the "open" button to select it.



    5. Click the "Proceed" button to begin the installation process.



    Steps

    1. Load the Virtuoso Conductor Administration interface of the running EC2 AMI instance with a URL of the form http://your-ec2-instance-cname/conductor.



    2. From the Virtuoso Conductor, navigate to the "System Admin" -> "Packages" tab to obtain a list of available Virtuoso packages (VADs) to install.



    3. Click the "Install" button to initiate installation of the "EC2 Extensions" VAD package for use in performing backup and restore tasks.



    4. Click the "Proceed" button to install the "EC2 Extensions" VAD package.
    5. Go to the URL http://your-ec2-instance-cname/ec2exts to load the Virtuoso Extensions for Amazon EC2 Images login page and log in as the "dba" user.



    6. From the Virtuoso Extensions for Amazon EC2 Images main page, click the "Restore a Remote Backup" link.



    7. On the "Restore a Remote Backup" page, set the follow options.

      Protocol: WebDAV/HTTP Host: s3.amazonaws.com Path or Bucket: dbpedia-version-32-bundle Backup File Prefix: dbpedia-version-32



    8. Click the "Restore" button to begin the restoration of the DBpedia database from backup.


      .
      .
      .


    9. Click on the "Continue" button to begin the re-assembly of the database from the restored backup files. Output similar to the following will be displayed when the re-assembly of the database is complete.

    Note that server restart may take a while as there are some initialization procedures that take some time to complete. Once these are complete, the restored DBpedia database is ready for use.

    Usage Examples

    You can then access pages such as these on your DBpedia server:

    • DBpedia About pagehttp://your-ec2-instance-cname/About



    • SPARQL end-pointhttp://your-ec2-instance-cname/sparql



    • DBPedia resourcehttp://your-ec2-instance-cname/resource/OpenLink_Software



    Related

    • The DBpedia SPARQL endpoint can be accessed on http://your-ec2-instance-cname/sparql
    • The OpenLink Interactive SPARQL Query Builder can be accessed on http://your-ec2-instance-cname/isparql, enabling the visual construction of queries (Graph Patterns).
    • OAuth support can be used to secure the SPARQL endpoint by installing the conductor_dav.vad VAD package. This allows the /sparql endpoint to be disabled or mapped to the Virtuoso OAuth SPARQL service thereby requiring an API key to use the endpoint as detailed in the Virtuoso OAuth documentation.