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

added initial draft for stream interfaces #55

Merged
merged 2 commits into from
Apr 28, 2016
Merged

Conversation

bergos
Copy link
Member

@bergos bergos commented Mar 18, 2016

No description provided.


### Sink

- `undefined .write(Stream stream)`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .write method could be confusing. It's more like a reverse .pipe, but that method name should be reserved, because some classes may implemented full featured streams. Another proposed method name was .consume.

It's the same for .read. Reading triples from a source could be also described as writing all triples from the source to a stream. .filter could be used, but would be confusing if the filter feature isn't used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the last meeting we collected the following alternative methods names. What do you think about them? Other proposals?

.accept
.consume
.input
.import
.append
.readFrom
.pull(From)
.reversePipe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for import/readFrom

-1 for pull (without From)/reversePipe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 .consume / .import
-1 .accept / .input / .readFrom / .pull / .pullFrom / .reversePipe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 .consume / .accept / .readFrom / .reversePipe / .append

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlongley We're indeed using a subset of Node.js streams (intentionally not the full interface, because its backpressure control makes it expensive).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have at least 2 * +1 for .import. I will change my PR. If there are good arguments for a different method name, we can change that later.

@elf-pavlik
Copy link
Member

IMO this PR received enough feedback to merge it after @bergos turns this feedback into new commits. After that everyone still have possibility to make new PRs proposing specific improvement to this initial draft, this should also allow for more granular changes and focused conversations.

@elf-pavlik elf-pavlik merged commit 120ab99 into rdfjs:master Apr 28, 2016
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

Successfully merging this pull request may close these issues.

6 participants