Skip to content
Jim Amsden edited this page Feb 9, 2017 · 1 revision

Introduction

As part of the LDP standardization process, Steve Speicher and Sam Padgett created LDP.js: a JavaScript implementation of a W3C Linked Data Platform compliant server that uses MongoDB for storage services, and Monitoring and Analytics services. This was implemented to create a second LDP implementation (required by W3C, and to demonstrate an implementation in another language. Access the application at this route: ldpjs.mybluemix.net.

LDP.js is a Node.js Express app that:

  1. implements the LDP server using MongoDB for persistence
  2. provides a simple Web app that can create, read, update and delete LDP resources, and visualize them in a graph

This project leverages this work by refactoring LDP.js into two separate modules: ldp-app and ldp-service. This project refactor LDP.js into ldp-app to create a sample Express Web application that uses the ldp-service Express middleware.

Project ldp-service provide the implementation of the LDP Express middleware..

Implementation Notes

Default configuration information is provided by this app in file config.js. Configuring the middleware requires an environment argument with the following fields:

  • scheme: http or https
  • host: the host name of the HTTP server
  • port: the port of the HTTP server
  • context: the path name of the root LDPC, e.g., /r/
  • appBase: e.g., http://localhost:3000/
  • ldpBase: e.g., http://localhost:3000/r/
  • mongoURL: The MongoDB database URL, e.g., mongodb://localhost:27017/ldp All the environment information is handled by file env.js. The default properties are provided in config.json file, and may be overridden by things in the user's environment, or the VCAP Bluemix environment for a Bluemix app.

Visualization

The Visualization capability is Express middleware that needs access to the MongoDB database. The db is exported from the ldp-service as an exported db property.

This middleware also requires the same vocabulary as ldp-service. The vocab folder is copied in both project since it is not unusual for an app that extends the server middleware to need access to its own vocabulary.

Clone this wiki locally