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

Feature request: extend Haxl to support streaming throughout the tree #11

Closed
gleber opened this issue Jul 18, 2014 · 3 comments
Closed

Comments

@gleber
Copy link

gleber commented Jul 18, 2014

If Haxl is implemented to support streaming throughout the tree, from each leaf up to the root. With this feature, Haxl will (?) be usable as a framework to perform operations on a data which does not necessary fit into the memory.

@simonmar
Copy link
Contributor

I have no idea what streaming would look like. That doesn't necessarily mean it's a bad idea, just that it's not at all clear (to me) what the design is. Maybe you have something in mind?

@evincarofautumn
Copy link

Seems like the biggest challenge would be reconciling streaming with caching. Either streaming fetches should not be cached, in which case you only benefit from concurrency, or Haxl needs to somehow provide the guarantee that anything not yet seen by all readers be cached. If the data doesn’t necessarily fit into memory, you never want to cache all of it, but that would seem too easy to do accidentally:

do
  (sx, sy) <- liftA2 (,) fetchThings fetchThings
  x <- consume sx
  -- Here, the entire contents of the shared stream are in
  -- the cache because sy hasn’t been consumed.
  y <- consume sy
  return (x + y)
where
fetchThings :: Haxl (Stream Thing)
consume :: Stream Thing -> Haxl Int

@simonmar
Copy link
Contributor

simonmar commented Jun 5, 2015

I don't think it's useful to keep this issue open given that we don't have a concrete plan or design, and there's been no discussion for months.

@simonmar simonmar closed this as completed Jun 5, 2015
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

3 participants