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

Share websocket connection #1

Open
pacoccino opened this issue Dec 14, 2017 · 2 comments
Open

Share websocket connection #1

pacoccino opened this issue Dec 14, 2017 · 2 comments

Comments

@pacoccino
Copy link

Hi there,

I am currently using bcoin in a large scale application and now looking into this wallet rewrite. I am concerned about watching thousands of wallet and the performances problems of having thousands of web sockets connection on the same process.

It seems like the bcurl’s client is not bound to a specific wallet, so we don’t need to have one instance for every wallet (today by inheritance). Instead, we could share one instance, so it also share the web socket connection in same process.

This way, each wallet ask client to register to a wallet id, then the client will receive events for every wallets. It could re-dispatch these events with wallet id in name of event, so each wallet only get event that is is destined to.

socket.on(‘wallet tx’) => this.emit('wallet:walletId tx’)

Do you think this is envisageable ?

@chjj
Copy link
Member

chjj commented Jul 12, 2018

Yeah, I agree with you. We really need to refactor how the wallet management is done. We can work on it after this next release I think.

@pacoccino
Copy link
Author

pacoccino commented Jul 14, 2018

Hey thanks for the answer @chjj .

We have managed to finish our product without the sockets, but we're now in kind of optimisation phase. Didn't have a look at bcoin news for a while.
We will try to migrate to the latest version soon. What are the plans for the next release ?

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

2 participants