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

[feat] Move mqtt parser to server-factory #4

Closed
robertsLando opened this issue Oct 28, 2020 · 4 comments
Closed

[feat] Move mqtt parser to server-factory #4

robertsLando opened this issue Oct 28, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@robertsLando
Copy link
Member

robertsLando commented Oct 28, 2020

Based on this: #2 (comment)

I was also thinking about another idea, I would like to move the mqtt parser to the server factory, so the client will always receive plain mqtt, in that case I would create another function for example handleMqtt that will accept a plain mqtt stream instead (along with connection details)

@mcollina What do you think? Everytime I look into client.nextBath I think that we could do something better, do you have any suggestion?

@robertsLando robertsLando added the enhancement New feature or request label Oct 28, 2020
@mcollina
Copy link

I don't think it's possible to do anything different and keep things performant

@robertsLando
Copy link
Member Author

Could you better explain the reason why this moscajs/aedes#519 solution could slow down aedes? I think it would implement the stream parsing in the 'aedes' way (by using a stream), and I don't understand what's the downside of this

@mcollina
Copy link

Streams are slow and in this specific case unnecessary overhead.

@robertsLando
Copy link
Member Author

I always tought that streams were the reason behind aedes good performances 😆 Thank you @mcollina for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants