adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS
https://adlnet.gov/projects/xapi/
Apache License 2.0
219 stars 114 forks source link

Added server-side node compatibility (take 2) #126

Closed oliverfoster closed 5 years ago

oliverfoster commented 5 years ago

67

Works undertaken

Notes

vbhayden commented 5 years ago

We discussed this internally today and are floating the idea of a separate repo for a NodeJS-specific xAPI wrapper. There's a limited functionality one that we use internally, but will let you know after we talk about it more tomorrow morning.

Also, I used your branch this morning and some of the response callbacks were getting dropped when stress testing. Switching to an axios-driven internal wrapper resolved the issue, how are requests being handled for the Node version?

oliverfoster commented 5 years ago

Superb.

how are requests being handled for the Node version?

There is a partial shim for the xmlhttprequest api https://github.com/adlnet/xAPIWrapper/pull/126/files#diff-1b2039be21a4454c52d6b497832996ebR1397 I'm not surprised it drops callbacks, but i'm sure it'd be quite easy to fix with a replacement as you said.

I think the biggest barriers to using this wrapper in node are:

Other than that it's pretty nice. It would work in all environments just by changing the scope slightly by always distributing it as a bundled library rather than separate but dependent files.

oliverfoster commented 5 years ago

I really don't mind doing the work, I just need someone to help me figure out an order to submit the prs, a review process and what's possible with the current user requirements and the current state of the code.

Considering that the work required here is pretty straight forward, would it not make sense to use the same well tested wrapper for both environments rather than releasing an entirely new code base?

FlorianTolk commented 5 years ago

A new branch was created for this project.

oliverfoster commented 5 years ago

@FlorianTolk what did you envisage for the NodeCompatibleWrapper branch?

I have series of PR's going into master to move this idea forward. Did you want me to re-base them to the other branch?

I could do with an answer to the question of browser support (#135) and wrapping functions (#137).

FlorianTolk commented 5 years ago

This new branch is meant as a playground where most these new PRs can be directed at, as we do not want to make any major functionality changes to the main. To quote @vbhayden 's response to another PR, the only major changes we want to push to the main branch are:

The new branch was created to ingest any other changes members of the community would like to make to the xAPI Wrapper. Thanks!

oliverfoster commented 5 years ago

Thanks for getting back to me. This branch would need to be published to npm to provide standard node support. It'd either need to replace the master publication or be a separate version lineage.

ptc-alhill commented 3 years ago

Can someone comment on the status of this thread? There does not appear to be another branch called NodeCompatibleWrapper and the package (xapiwrapper-node) published by @oliverfoster does not appear to be up to date with his repo (the github page for it has disappeared too)

oliverfoster commented 3 years ago

Well. My attempt failed. There was too much fear that dropping support for older browsers would somehow break the library. Then there was mention of a node version of the wrapper used internally and that it would be released instead of making this one compatible.

Nothing much happened after that and I gave up.

ptc-alhill commented 3 years ago

Thanks for the update. I'll assume that npm package is functionally the same but that your later commits were compatibility oriented