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

Optimise Fragment type for network performance #15

Closed
stefankreitmayer opened this issue Feb 26, 2019 · 1 comment
Closed

Optimise Fragment type for network performance #15

stefankreitmayer opened this issue Feb 26, 2019 · 1 comment
Labels
frontend Frontend-related

Comments

@stefankreitmayer
Copy link
Contributor

Current solution

In the current Elm implementation, each Fragment contains the OER data it pertains to.

type alias Fragment =
  { oer : Oer
  , start : Float -- 0 to 1
  , length : Float -- 0 to 1
  }

This implementation is neat in the sense that it keeps the frontend code clean and simple. However, it makes the Fragment type less suitable for use in client-server communication, as Oer data can be large.

Better solution

A more network-friendly solution would avoid storing the entire OER in the Fragment and instead use only its URL.

type alias Fragment =
  { url : String
  , start : Float -- 0 to 1
  , length : Float -- 0 to 1
  }

Pro

  • better network performance when dealing with large OERs and/or many fragment-wise recommendations

Con

  • increased complexity in the frontend code, as Fragments and OERs must be loaded and managed separately.
@stefankreitmayer stefankreitmayer added the frontend Frontend-related label Feb 26, 2019
@stefankreitmayer stefankreitmayer self-assigned this Feb 26, 2019
@stefankreitmayer
Copy link
Contributor Author

This was solved as part of #42

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

No branches or pull requests

1 participant