-
Notifications
You must be signed in to change notification settings - Fork 1
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
Standardize an HTTP Server as a Transform #24
Comments
👍 I really like the approach Substack is using for libraries like Hyperquest. |
I'm not quite sure what you mean by this. Are you saying you would like more things to be transform streams? Because it seems like you examples demonstrate more of a duplex stream model, which is how the core already Extra streams for particular use cases should probably be in user-land. By all means experiment! Forgive me if I have misinterpreted your post. |
They are old style streams
I'm not talking about express. Express is Incredible at what it does alone, extremely easy to use and tons of things that interact with it. I'm talking about how within Node's and io.js's framework they don't practice what they preach, usually because they got a million things to do and some of it is still legacy. I'm not even saying I want a body parser, that is available from somebody else. What I'm saying is that if transforms are meant to be for protocols -> They should use them so that others follow. I'll delete the psuedocode because it seems that it distracted you and may distract others |
Ah ok, sorry I know My advice would be to fork io.js and give it a go, i'm sure the contribution for this would be welcome, unless there is a compelling reason why this should remain a vintage stream. There is no harm in experimentation, it certainly gives a better understanding of the problem domain. |
I'll probably give it a go it after I'm done with some other stuff still pending. Stream Writable would work. The most important part is to make sure the Stream implementers in the future don't feel overwhelmed by the http example. Instead of solving the problem in their own way, they have a good example of how the sockets they're using can be piped/unpiped with ease and still be sent over child_processes. By the way, you seem to have a cool head about you. It's pretty calming. I'm pretty sure your a pleasure to work with. Thanks for the responses! |
Thanks, I appreciate the feedback! I just see the benefit of listening to other peoples ideas, collaboration is key. I can't tell you the number of times I have just hacked up some alternative solution to a problem just to see how feasible it would be. Experimentation is how awesome things come about (Node/io.js would probably not exist otherwise). Other times things don't work out so well, but either way it's a learning experience (forgive me I'm probably preaching to the choir! 😃). I guess that's why I would encourage others to do the same(and I would be interested to see how you get on, what sort of problems you run into and the solutions you find to overcome them). There has also a lot of discussions about the current streams implementations (nodejs/node#89 & nodejs/node#188) recently, the advent of io.js seems to have opened the doors for people to express their opinions on all sorts of things and get involved in the evolution of the project, which is great IMO. I have a lot of ideas of my own, but it is great to hear what other people think from a different perspective 😄 |
This is a low priority enhancement. But I do believe this is important in general to set a standard. That being said, the http server spans about... 8 different files with a collective 2661 lines (120+145+498+624+198+228+572+276) (some of which is repeated such as http and https). So I completely understand that this idea is going to be taken lightly if not ignored completely. However, seeing from the last TC meeting, you guys really are paying attention. And it warms my icy cold heart.
The problem
Nodejs already set the standard for using stream.Transform in servers, don't.
It can only be found in Crypto and zlib within the source
However, the nodejs implementers guide suggests using the transform for protocols. I'm not here to complain about hipocracy as much as I'm here to complain about how because node didn't lead by example others didn't follow and understand why it wasn't implemented that way.
Consequences
Other solutions
Some related Lines
The text was updated successfully, but these errors were encountered: