Commit Graph

208 Commits

Author SHA1 Message Date
Tim Kuehn
7cfca8f721 Singular module names 2016-02-11 23:02:35 -08:00
Tim Kuehn
28735296fe Merge branch 'master' into organize-tests 2016-02-11 22:53:28 -08:00
Tim Kuehn
3d2cc1f0d3 Organize macro module tests 2016-02-11 22:53:13 -08:00
Adam Wright
428e5a87b6 Merge branch 'implicit-return-type' into 'master'
Implicit return type

Enables

```
service! {
    rpc ack();
}
```

See merge request !23
2016-02-12 12:01:50 +05:30
Tim Kuehn
f6063828df Workout the implicit return change a bit more in tests 2016-02-11 22:28:53 -08:00
Tim Kuehn
f727dac87b Merge branch 'type-ascription' into implicit-return-type 2016-02-11 22:22:14 -08:00
Adam Wright
34b05632f6 Merge branch 'type-ascription' into 'master'
Try out type ascription



See merge request !22
2016-02-12 11:43:30 +05:30
Adam Wright
b84f60b843 Merge branch 'serialize-traits' into 'master'
Factor out serialization code into a Serialize and Deserialize trait

Makes the client and server code a bit nicer by sharing commonalities between them.

See merge request !20
2016-02-12 11:42:45 +05:30
Adam Wright
2d22d435f9 Merge branch 'master' into serialize-traits 2016-02-11 22:10:51 -08:00
Adam Wright
971b27a4d2 Merge branch 'remove-inflight-rpcs' into 'master'
Remove the struct InflightRpcs.

We were previously doing a lot of accounting to make sure the server never exits before all open connection handlers. However, now that we're using scoped threads, that's taken care of by the scoped library, and we were essentially doing redundant work.

See merge request !19
2016-02-12 11:34:15 +05:30
Tim Kuehn
51ec0a1219 Merge branch 'serialize-traits' into type-ascription 2016-02-11 22:04:14 -08:00
Tim Kuehn
dbadbf3ef5 Merge remove-inflight-rpcs into serialize-traits 2016-02-11 22:03:45 -08:00
Tim Kuehn
42d876bf41 Don't panic if on Err from try_clone 2016-02-11 21:57:58 -08:00
Tim Kuehn
7099fccbfa Allow rpc methods with an implicit unit return type 2016-02-11 21:19:04 -08:00
Adam Wright
9416921797 Merge branch 'server-writer-thread' into 'master'
Server: use a dedicated writer thread for each open connection

So that the TcpStream does not need to be locked.

See merge request !18
2016-02-12 10:04:56 +05:30
Adam Wright
8bbcb16d7f Remove unwanted whitespace 2016-02-11 20:33:18 -08:00
Tim Kuehn
868938d83a Try out type ascription 2016-02-11 00:04:20 -08:00
Tim Kuehn
3a046e783c Merge remove-inflight-rpcs into serialize-traits 2016-02-10 23:52:04 -08:00
Tim Kuehn
7ab3ae8689 Merge server-writer-thread into remove-inflight-rpcs 2016-02-10 23:31:00 -08:00
Tim Kuehn
62a9fb6391 Merge master into server-writer-thread 2016-02-10 23:29:36 -08:00
Tim
e0acd9dafd Consistently stylize tarpc in readme 2016-02-11 07:15:03 +05:30
Tim Kuehn
5ae1d6fe91 Update Cargo.toml license 2016-02-08 13:57:23 -08:00
Adam Wright
7baa8b947a Merge branch 'update-license' into 'master'
Update license from dual Apache 2.0/MIT to just MIT.



See merge request !21
2016-02-09 01:31:38 +05:30
Tim Kuehn
a58dea0ec5 Update license from dual Apache 2.0/MIT to just MIT. 2016-02-08 11:52:51 -08:00
Adam Wright
5d05ebab26 Merge branch 'client-server-modules' into 'master'
Move client and server code into protocol submodules

Things were getting too large in protocol.rs

See merge request !17
2016-02-09 01:03:15 +05:30
Tim Kuehn
b771854e78 Factor out serialization code into a Serialize and Deserialize trait 2016-02-06 14:53:40 -08:00
Tim Kuehn
22927dedfa Merge branch 'master' into server-writer-thread 2016-02-01 22:35:06 -08:00
Adam Wright
d223c699c3 Merge branch 'no-mod' into 'master'
Refactor the macro

1. Rename `rpc!` ==> `service!`
2. Rip out the module-related parts.

The end result is that, in the common case, there will be one level of indentation less. In some cases, there will be two levels less. The module parts had no benefit over simply scoping the macro invocation within a module.

The macro was renamed because this looks bad:

```rust
rpc! {
    rpc hello(s: String) -> String;
}
```

And I think `service!` better describes what is expanded.

See merge request !16
2016-02-01 13:31:49 +05:30
Tim Kuehn
e4b483304d Use wildcard dep for now 2016-01-31 22:35:13 -08:00
Tim Kuehn
6e49bcdae9 Amend some documentation 2016-01-31 22:20:43 -08:00
Tim Kuehn
919441c9d0 Document the benchmark 2016-01-31 22:14:43 -08:00
Tim Kuehn
5d8d04d521 Use expect() instead of unwrap() 2016-01-31 22:05:04 -08:00
Tim Kuehn
a6fec6f861 Merge branch 'master' of ssh://git.adam-wright.net:10022/shaladdle/tarpc into no-mod 2016-01-31 21:37:37 -08:00
Adam Wright
361976b7de Merge branch 'async' into 'master'
Add an AsyncClient generated by rpc!

Returns `Future<T>` instead of `Result<T>`. `Future<T>` has one method, `get()`, which returns a `Result<T>`.

See merge request !15
2016-02-01 11:05:46 +05:30
Tim Kuehn
cf8f0e23b9 Merge branch 'server-writer-thread' into remove-inflight-rpcs 2016-01-31 21:31:49 -08:00
Tim Kuehn
8b6f89c0c6 Merge branch 'client-server-modules' into server-writer-thread 2016-01-31 21:31:21 -08:00
Tim Kuehn
59f502ef3e Merge no-mod ==> client-server-modules 2016-01-31 21:31:02 -08:00
Tim Kuehn
55d3e00691 Merge master ==> client-server-modules.
Some log statements were lost in this transition.
2016-01-31 21:29:49 -08:00
Tim Kuehn
eb4b47b25b Merge branch 'async' into no-mod 2016-01-31 21:21:50 -08:00
Tim Kuehn
fb468eb81f Merge master into async 2016-01-31 21:21:11 -08:00
Tim Kuehn
f211a4a2e7 Remove the struct InflightRpcs.
We were previously doing a lot of accounting to make sure the server never exits
before all open connection handlers. However, now that we're using scoped threads,
that's taken care of by the scoped library, and we were essentially doing redundant
work.
2016-01-31 20:04:35 -08:00
Tim Kuehn
a4de0db8eb Server: use a writer thread for each open connection 2016-01-29 22:44:02 -08:00
Tim Kuehn
277e707db9 Separate client and server code into protocol submodules 2016-01-29 22:40:22 -08:00
Tim Kuehn
84d402ebf5 Use a writer thread that handles all outbound requests. 2016-01-29 01:24:19 -08:00
Tim Kuehn
e711bb006c Wrap-up:
1. Use a scoped thread pool instead of crossbeam. It uses crossbeam under the hood but doesn't spawn endless threads.
   Hardcoded to 100 threads currently, but we can play with that.
2. Buffer IO. Seems to improve performance.
3. Shuffle around where the stream's timeouts are set. I think they should only need to be set once.
2016-01-28 01:28:56 -08:00
Tim Kuehn
b0f70cf47f Merge branch 'async' into no-mod 2016-01-28 00:30:31 -08:00
Tim Kuehn
a285a5a993 rpc_async means we can't unwrap() the result of sending a reply.
Add a test for this.
2016-01-28 00:29:17 -08:00
Tim
af2d701cfd Merge branch 'debug' into 'master'
Debug



See merge request !13
2016-01-28 11:51:35 +05:30
Adam Wright
707daff475 Remove superfluous log 2016-01-27 22:18:04 -08:00
Adam Wright
43cb920c56 Merge branch 'disclaimer' into 'master'
Add disclaimer to README



See merge request !14
2016-01-28 11:43:41 +05:30