Skip to content

Web support, better round robin engine#2

Merged
dvlkv merged 15 commits into
ton-core:masterfrom
TrueCarry:truecarry/adnl-client
Feb 22, 2023
Merged

Web support, better round robin engine#2
dvlkv merged 15 commits into
ton-core:masterfrom
TrueCarry:truecarry/adnl-client

Conversation

@TrueCarry

Copy link
Copy Markdown
Contributor

Local implementation of adnl changed to original. Now it has support for tcp:// and ws:// transports. Because of that new engine api changed, maybe time to make 2.0.0 release.

Random bytes imported from tweetnacl instead of crypto, since it's hard to include crypto for browsers and tweetnacl already used in most ton libs.

Round robin engine now uses incremental server select. Also it checks if connection is open to avoid timeouts that we aware of beforehand and retries on errors. It allows to not retry calls when using lib in client/server code.

@IRGC

IRGC commented Jan 4, 2023

Copy link
Copy Markdown

why this PR still not reviewed?

@IRGC

IRGC commented Jan 4, 2023

Copy link
Copy Markdown

@dvlkv @ex3ndr

@dvlkv dvlkv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM but has some issues

Comment thread src/engines/roundRobin.ts
Comment thread tsconfig.json Outdated
@TrueCarry TrueCarry force-pushed the truecarry/adnl-client branch from b9d2103 to 7257732 Compare February 19, 2023 08:24
Comment thread src/engines/roundRobin.ts
throw e
}

await delay(100)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably need to use timeout from arguments

Comment thread src/engines/single.ts Outdated
this.connect();
}
}, 1000);
}, 10000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe do this configurable?

@TrueCarry TrueCarry marked this pull request as ready for review February 21, 2023 08:44
@dvlkv dvlkv merged commit f4b3f83 into ton-core:master Feb 22, 2023
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.

3 participants