All Projects â†’ csarven â†’ mayktso

csarven / mayktso

Licence: Apache-2.0 license
🌌 mayktso: encounters at an endpoint

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to mayktso

Web Client
Generic Linked Data browser and UX component framework. Apache license.
Stars: ✭ 105 (+452.63%)
Mutual labels:  linked-data, rdf, semantic-web
Dokieli
💡 dokieli is a clientside editor for decentralised article publishing, annotations and social interactions
Stars: ✭ 582 (+2963.16%)
Mutual labels:  linked-data, rdf, semantic-web
Semanticmediawiki
🔗 Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities
Stars: ✭ 359 (+1789.47%)
Mutual labels:  linked-data, rdf, semantic-web
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 112 (+489.47%)
Mutual labels:  linked-data, rdf, semantic-web
jsonld-context-parser.js
Parses JSON-LD contexts
Stars: ✭ 20 (+5.26%)
Mutual labels:  linked-data, rdf, semantic-web
Rdf
RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data.
Stars: ✭ 353 (+1757.89%)
Mutual labels:  linked-data, rdf, semantic-web
Grafter
Linked Data & RDF Manufacturing Tools in Clojure
Stars: ✭ 174 (+815.79%)
Mutual labels:  linked-data, rdf, semantic-web
awesome-ontology
A curated list of ontology things
Stars: ✭ 73 (+284.21%)
Mutual labels:  linked-data, rdf, semantic-web
Limes
Link Discovery Framework for Metric Spaces.
Stars: ✭ 94 (+394.74%)
Mutual labels:  linked-data, rdf, semantic-web
Jsonld.js
A JSON-LD Processor and API implementation in JavaScript
Stars: ✭ 1,212 (+6278.95%)
Mutual labels:  linked-data, rdf, semantic-web
Rdflib
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
Stars: ✭ 1,584 (+8236.84%)
Mutual labels:  linked-data, rdf, semantic-web
Php Json Ld
PHP implementation of a JSON-LD Processor and API
Stars: ✭ 246 (+1194.74%)
Mutual labels:  linked-data, rdf, semantic-web
LinkedDataHub
The Knowledge Graph notebook. Apache license.
Stars: ✭ 150 (+689.47%)
Mutual labels:  linked-data, rdf, semantic-web
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 120 (+531.58%)
Mutual labels:  linked-data, rdf, semantic-web
rdf-ldp
A suite of LDP software and middleware for RDF.rb & Rack
Stars: ✭ 14 (-26.32%)
Mutual labels:  linked-data, rdf, ldp
Pyld
JSON-LD processor written in Python
Stars: ✭ 413 (+2073.68%)
Mutual labels:  linked-data, rdf, semantic-web
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (+152.63%)
Mutual labels:  linked-data, rdf, semantic-web
sparql-micro-service
SPARQL micro-services: A lightweight approach to query Web APIs with SPARQL
Stars: ✭ 22 (+15.79%)
Mutual labels:  linked-data, rdf, semantic-web
Informationmodel
The Information Model of the International Data Spaces implements the IDS reference architecture as an extensible, machine readable and technology independent data model.
Stars: ✭ 27 (+42.11%)
Mutual labels:  linked-data, rdf, semantic-web
Rdf4j
Eclipse RDF4J: scalable RDF for Java
Stars: ✭ 242 (+1173.68%)
Mutual labels:  linked-data, rdf, semantic-web

mayktso

Encounters at an endpoint.

Docker Automated build Docker Build Status

About

  • HTTP server and command-line RDF tool to get/send, serialise data.
  • Server can receive HTTP HEAD, OPTIONS, GET, POST, PUT requests. Content negotiation with text/turtle, application/ld+json, text/html, application/xhtml+xml. It can serialize from HTML+RDFa, but does not serialize to HTML+RDFa.
  • Spec coverage:
  • No authenication/authorisation mechanism
  • Basic configuration to set constraints on a directory (size/max)
  • Basic configuration to handle stuff like https://linkedresearch.org/cloud

This server was initially built for LDN tests but then decided to support/test dokieli's needs (source: https://github.com/linkeddata/dokieli) and do LDP etc.

Dive into issues because it is fun.

Docker

If you use Docker, try the image csarven/mayktso:

docker run -p 3000:3000 -d csarven/mayktso

Persistent Docker container

docker volume create mayktso-data
docker run --name mayktso --restart=always \
  --mount source=mayktso-data,target=/mayktso \
  -p 3000:3000 \
  -d csarven/mayktso

To update:

docker pull csarven/mayktso
docker stop mayktso
docker rm mayktso

.. then recreate using the docker run from above.

Installation from source

$ git clone https://github.com/csarven/mayktso
$ cd mayktso
$ npm install

Receiver

Server runs on http://localhost:3000/ by default:

$ node index.js

Config

Optional config use: cp config.json.default config.json

{
  "port": "3000",
  "sslKey": "/path/to/privkey.pem",
  "sslCert": "/path/to/cert.pem",
  "proxyURL": "http://example.org/proxy?uri=",
  "rootPath": ".",
  "basePath": "",
  "inboxPath": "inbox/",
  "queuePath": "queue/",
  "maxPayloadSize": 100000,
  "maxResourceCount": 10,
}
  • Defaults will be used for omitted key/values (except sslKey/sslCert are unused)
  • basePath is useful when running as a reverse proxy in a dedicated directory (e.g., Apache)
ProxyPass /foo/ https://localhost:3000/
ProxyPassReverse /foo/ https://localhost:3000/

so that http://example.org/foo/bar resolves, otherwise, server only sees /bar e.g., basePath: "/foo/bar/"

  • inboxPath and queuePath are relative to root e.g., http://localhost:3000/{inbox,queue}/

  • queue is used for HTTP 202 responses (default for payload above maxPayloadSize in bytes). Status: Testing

  • rootPath defaults to the current directory (.) or a full path can be specified. Requests are relative to this location.

  • maxPayloadSize is for POSTs (as the name suggests)

  • maxResourceCount is for number of notifications to keep in inbox/ or queue

  • Simple data shape check that's based off https://linkedresearch.org/cloud 's needs. It is triggered by having a line like this "checkDataShape": [ { "uri": "inbox/linkedresearch.org/cloud/" } ]. This needs to be better documented and built further.

Sender and Consumer

Command line

$ node index.js --help
mayktso: https://github.com/csarven/mayktso
  * Running without parameter/option starts server, otherwise:
  * Usage: node index.js [parameter] [options]
    [parameter]
    --help
    --discoverInbox <URI>        Discover a target's Inbox
    --getNotifications <URI>     Get the notifications contained in an Inbox
    --head <URI>                 Headers of a URI
    --options <URI>              Check the options of a URI
    --get <URI> [options]        Dereference a resource to RDF
    --post <URI> [options]       Send notification to Inbox
    --put <URI> [options]        Store data under a URI
    [options]
    --accept (m, default: application/ld+json)
    --contentType (m, default: application/ld+json)
    --slug string
    -d, --data <data>
    -o, --outputType (m, default: application/ld+json)
    m: mimetype or format; jsonld, turtle
$ node index.js --discoverInbox http://localhost:3000/ --accept \
application/ld+json
$ node index.js --getNotifications http://localhost:3000/inbox/abc --accept \
application/ld+json
$ node index.js --head http://localhost:3000/
$ node index.js --get http://localhost:3000/ --accept application/ld+json
$ node index.js --post http://localhost:3000/inbox/ --slug foo \
--contentType application/ld+json -d \
'[{"@id":"http://example.org/foo","http://schema.org/name":"Foo"}]'
$ node index.js --put http://localhost:3000/inbox/ --contentType \
application/ld+json -d \
'[{"@id":"http://example.org/foo","http://schema.org/name":"Foo"}]'

Or just curl:

# Get target URL
$ curl -i -H'Accept: application/ld+json' http://localhost:3000/
$ curl -I -H'Accept: application/ld+json' http://localhost:3000/
$ curl -i -X OPTIONS -H'Accept: application/ld+json' http://localhost:3000/

# Send to Inbox
$ curl -i -X POST -H'Content-Type: application/ld+json' \
-d '[{"@id":"","http://schema.org/name":"Foo"}]' http://localhost:3000/inbox/
$ curl -i -X POST -H'Content-Type: text/turtle' \
-d '<> <http://schema.org/name> "Bar" .' http://localhost:3000/inbox/

# Get Inbox URL
$ curl -i -H'Accept: application/ld+json' http://localhost:3000/inbox/
$ curl -i -H'Accept: application/ld+json, text/turtle' \
http://localhost:3000/inbox/
$ curl -i -H'Accept: text/turtle, application/ld+json' \
http://localhost:3000/inbox/
$ curl -I -H'Accept: application/ld+json' http://localhost:3000/inbox/
$ curl -I -H'Accept: text/turtle' http://localhost:3000/inbox/

# Location header in POST response
$ curl -i http://localhost:3000/inbox/abc
$ curl -i -H'Accept: application/ld+json' http://localhost:3000/inbox/abc
$ curl -i -H'Accept: text/turtle' http://localhost:3000/inbox/abc
$ curl -i -H'Accept: application/ld+json, text/turtle' \
http://localhost:3000/inbox/abc
$ curl -i -H'Accept: text/turtle, application/ld+json' \
http://localhost:3000/inbox/abc
$ curl -I http://localhost:3000/inbox/abc
$ curl -I -H'Accept: application/ld+json' http://localhost:3000/inbox/abc
$ curl -i -X OPTIONS -H'Accept: application/ld+json' \
http://localhost:3000/inbox/abc

Dependencies

  • SimpleRDF (MIT License) used for RDF
  • Express
  • and other node libraries for general plumbing

License

Apache License, Version 2.0

See the files LICENSE and NOTICE for required notices.

See also

Contributors

How to contribute

  • Use it! Break things.
  • Report issues and document.
  • Fix issues.
  • Request new features.
  • .. and however else you want to contribute.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].