GithubHelp home page GithubHelp logo

quadstore-server-on-aws-serverless's Introduction

quadstore-server-on-aws-serverless

SPARQLエンドポイントをAWSサーバーレス環境下に作成するためのプロジェクトです。 AWSの以下のサービスを利用します。

RDF Storeにnode-quadstorelevelDBを利用しています。

RDF Storeの準備

あらかじめ Turtleファイルを使って levelDBファイルを作成しておきます。 サンプルとして 国立国会図書館が公開する「図書館及び関連組織のための国際標準識別子(ISIL)」試行版LODのTurtleファイルを同梱しています。

cd quadstore-server-on-aws-serverless/quadstore-server-lambda
npm install
npm run build:db -- ../sample/isillod.ttl

これで、sparql-dbディレクトリが作成されます。

デプロイ方法

デプロイには、AWS SAMを利用します。 AWS SAM CLIをあらかじめインストール、設定しておいてください。

cd quadstore-server-on-aws-serverless 
sam build
sam deploy --guided ※ 二回目以降は sam deploy でデプロイできます。

デプロイ後に表示されるQuadstoreServerApiのURLが実際のエンドポイントとなります。

ローカルでの動作確認

以下のコマンドにより、ローカル環境で実行が可能です。実行には、Dockerが必要です。

cd quadstore-server-on-aws-serverless
sam local invoke --event events/event.json

これで以下のSPARQLクエリが実行されます。

select (count(distinct *) as ?count) 
where {
  ?s ?p ?o
}

AWS SAM CLI のその他の利用については以下を参照してください。

https://docs.aws.amazon.com/ja_jp/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html

quadstore-server-on-aws-serverless's People

Contributors

uedayou avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.