Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ldp-service to expose reusable LDP functions in addition to express middleware functions #13

Open
jamsden opened this issue Nov 28, 2018 · 1 comment

Comments

@jamsden
Copy link

jamsden commented Nov 28, 2018

An app or services such as oslc-service that uses ldp-service could:

  1. Delegate whatever it can to ldp-service, especially the CRUD resource operations
  2. Access storage services directly to implement some things such as Query Capability that are not part of LDP
  3. Combine the two by having ldp-service refactor the implementations of its CRUD methods into reusable functions that it calls to implement its own express middleware, but that could also be called by other services like oslc-service that need similar capability, but have to make additional response modifications. The ldp-service middleware subApp methods would simply call the correspond functions, then do res.sent to complete the result.

There can be many ldp-service instantiations on different storage services used by the same oslc-server. Since oslc-service also depends on storage services (for resource preview, attachments, OSLC 2.0 discovery resources, OSLC query, selective properties), then it is oslc-service that will instantiate the storage services for a particular route, providing that implementation to the ldp-service it uses.

@jamsden
Copy link
Author

jamsden commented Dec 5, 2018

Might do this incrementally and as needed while implementing oslc-service. This will minimize the exposed API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant