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

Async client (unchanged API) #43

Merged
58 commits merged into from Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5fb7d19
WIP new async client
May 7, 2020
2621314
Refactor the new client
May 12, 2020
54138fa
Add periodic flushing
May 12, 2020
54fdc3a
Simplify operation queueing
May 13, 2020
fb26fc8
Refactor
May 13, 2020
189efc8
Implement flush
May 13, 2020
ff90ac4
Some cleanup
May 13, 2020
6b6196a
Implement reconnect
May 18, 2020
12ef099
Count reconnects properly
May 18, 2020
e3473c8
Implement authentication
May 19, 2020
e32880d
Simplify options
May 19, 2020
07bfd1a
Merge branch 'master' into wip-async
May 19, 2020
33890af
Adapt to the new benchmark
May 19, 2020
96986a3
Merge branch 'master' into wip-async
May 25, 2020
0683bc8
Implement reconnect buffer
Jun 1, 2020
eea49ea
Fix a few bugs, add tests
Jun 2, 2020
abf5122
Move pongs into Writer
Jun 2, 2020
2b8558a
Refactor
Jun 11, 2020
7e40310
Merge branch 'master' into wip-async
Jun 11, 2020
66db04d
Tune performance
Jun 15, 2020
e546e7d
Merge branch 'master' into wip-async
Jun 15, 2020
5aef3f1
Make clippy happy
Jun 15, 2020
3057bff
Fix a compilation error
Jun 15, 2020
c872c66
Turn off annoying clippy lint
Jun 15, 2020
7531e45
Turn off annoying lints
Jun 16, 2020
96e61b5
Add draining
Jun 16, 2020
6c03f8c
Fix failing doctests
Jun 16, 2020
b949fa0
Implement missing Connnection methods
Jun 16, 2020
4cec320
Add AsyncConnection
Jun 16, 2020
9958d60
Add AsyncSubscription and AsyncMessage
Jun 17, 2020
26739a3
Update options builder
Jun 17, 2020
d1f6a10
Undo clippy suppressions
Jun 17, 2020
9c112b1
Fix clippy
Jun 17, 2020
f4d743c
Fix clippy
Jun 17, 2020
58ee13a
Fix clippy
Jun 17, 2020
29b654b
Fix reconnection test
Jun 17, 2020
f920541
Update actions-rs
Jun 17, 2020
9d0beca
Merge codebases
Jun 23, 2020
e6b58f0
Fix failing tests
Jun 23, 2020
6be458d
Update smol
Jun 23, 2020
41fdc7b
Remove unused code
Jun 23, 2020
5945828
Delete unused sync API in asynk module
Jun 23, 2020
ce96dc8
Cleanup
Jun 23, 2020
55fa9d9
Cleanup
Jun 23, 2020
56609ad
Final touch
Jun 23, 2020
90e8a9f
Workaround for broken MSRV by base64-url
Jun 23, 2020
b4977b5
Upgrade dependencies
Jun 23, 2020
a2b7dec
Bump MSRV to 1.40.0
Jun 24, 2020
303c44c
Delete the Async prefix
Jun 24, 2020
8404b72
Cleanup dependencies
Jun 24, 2020
bd9ff49
Merge branch 'master' into wip-async
Jun 24, 2020
b7d444c
Move Options into the root of the crate. Rename asynk::Options::conne…
spacejam Jun 24, 2020
4487bc5
implement Handler::unsubscribe
spacejam Jun 24, 2020
98149d6
Small cleanup
spacejam Jun 24, 2020
db24a82
Some clippy feedback. Remove clippy lints that are difficult to use w…
spacejam Jun 24, 2020
f7bd2db
Fix renamed clippy lints
spacejam Jun 24, 2020
96e2da8
Fix renamed clippy lints
spacejam Jun 24, 2020
16a2beb
Fix renamed clippy lints
spacejam Jun 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 20 additions & 14 deletions Cargo.toml
Expand Up @@ -13,7 +13,7 @@ keywords = ["nats", "client", "messaging", "api"]
categories = ["network-programming", "api-bindings"]

[features]
fault_injection= []
fault_injection = []

[badges]
maintenance = { status = "actively-developed" }
Expand All @@ -22,26 +22,32 @@ maintenance = { status = "actively-developed" }
panic = 'abort'

[dependencies]
serde = { version = "1.0.106", features = ["derive"] }
serde_json = "1.0.52"
regex = "1.3.7"
nuid = "0.2.1"
lazy_static = "1.4.0"
nom = "5.1.1"
async-channel = "1.1.0"
async-dup = "1.1.0"
async-mutex = "1.1.4"
async-native-tls = "0.3.3"
base64-url = "1.2.0"
blocking = "0.4.6"
crossbeam-channel = "0.4.2"
parking_lot = "0.10.2"
rand = "0.7.3"
native-tls = "0.2.4"
futures = "0.3.5"
itoa = "0.4.6"
lazy_static = "1.4.0"
log = "0.4.8"
native-tls = "0.2.4"
nkeys = "0.0.9"
base64-url = "1.1.13"
once_cell = "1.3.1"
nuid = "0.2.1"
once_cell = "1.4.0"
rand = "0.7.3"
regex = "1.3.9"
serde = { version = "1.0.114", features = ["derive"] }
serde_json = "1.0.55"
smol = "0.1.18"

[dev-dependencies]
criterion = "0.3.2"
quicli = "0.4.0"
structopt = "0.3.14"
env_logger = "0.7.1"
quicli = "0.4.0"
structopt = "0.3.15"

[[bench]]
name = "nats_bench"
Expand Down
4 changes: 1 addition & 3 deletions examples/nats_bench.rs
Expand Up @@ -6,7 +6,6 @@ use std::{
};

use nats;
use rand::{thread_rng, Rng};
use structopt::StructOpt;

/// Simple NATS bench tool
Expand Down Expand Up @@ -76,8 +75,7 @@ fn main() -> std::io::Result<()> {
let nc = nc.clone();
let subject = args.subject.clone();
threads.push(thread::spawn(move || {
let mut rng = thread_rng();
let msg: Vec<u8> = (0..message_size).map(|_| rng.gen::<u8>()).collect();
let msg: String = (0..message_size).map(|_| 'a').collect();
barrier.wait();
for _ in 0..messages {
nc.publish(&subject, &msg).unwrap();
Expand Down