
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Existing LDF servers are typically used to expose a datasource with less restrictive querying capabilities (e.g. a SPARQL endpoint) with more restrictive querying capabilities (triple pattern fragments).
A minimal server for linked data fragments designed to create linked data views over things that aren't linked data.
Existing LDF servers are typically used to expose a datasource with less restrictive querying capabilities (e.g. a SPARQL endpoint) with more restrictive querying capabilities (triple pattern fragments).
In contrast, ldf-facade is designed to expose a datasource with more restrictive querying capabilities - such as a HTTP API - as triple pattern fragments, which are often less restrictive than the API.
There are two user callbacks used by ldf-facade which you need to implement:
Crucially, everything is paginated. To accommodate this, the user callbacks are deterministic mappers from state -> { results, nextState|null }. If called multiple times with the same state, the callback should return the same results each time. The actual value of the state is entirely up to you: it could be an offset, an identifier, or anything else required to keep track of upstream position.
This allows the ldf-server to create prev and next links for each page, so that ldf clients can navigate a result set. The nextState returned by a user callback becomes the state parameter passed into the same callback to retrieve the next page.
var LDFServer, { BOUND, UNBOUND } = require('ldf-facade')
var server = new LDFServer({ /* opts */ })
server.enumSubjects(async function(state) {
if(!state) {
// create initial state
}
// get some subjects from somewhere
// get total number of subjects
return { values: [ subjects... ], total, nextState }
// return nextState: null when there are no more subjects to enumerate
})
You can register as many user callbacks for pattern as required. Each pattern callback is associated with a pattern. For example, a user callback registered for { s: BOUND, p: UNBOUND, o: UNBOUND } would match triple patterns where the subject is specified but the predicate and object are not (i.e. tell me everything you know about this subject).
Where a pattern is requested of the server and no user callback is registered to match it, ldf-facade will attempt to generalise (for unbound -> bound) or specialize by filtering (for bound -> unbound). In theory, this means that registering any one pattern allows any other pattern to be answered, but as generalisation and specialisation is likely to be very expensive, any patterns that can be answered directly should be registered.
server.pattern({
s: BOUND, p: UNBOUND, o: UNBOUND
}, async function(state, pattern) {
// pattern.s contains the subject as it is bound
// pattern.p and pattern.o will be undefined
// generate triples that match { pattern.s, ?, ? }
return { triples, total, nextState }
// return nextState: null when there are no more triples to return
})
server.listen(port)
FAQs
Existing LDF servers are typically used to expose a datasource with less restrictive querying capabilities (e.g. a SPARQL endpoint) with more restrictive querying capabilities (triple pattern fragments).
We found that ldf-facade demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.