<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/arti-rpcserver/src/session.rs, branch arti-v1.1.4</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.4</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.4'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2023-04-19T16:38:26Z</updated>
<entry>
<title>RPC: Log all internal errors.</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-19T16:35:49Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7c1f45a514c0c6f5579be939151a3f75db62d731'/>
<id>urn:sha1:7c1f45a514c0c6f5579be939151a3f75db62d731</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rpcserver: Use with_fn.</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-18T19:55:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=f33aefd76c42165302ab0093d207b8e57ca0192f'/>
<id>urn:sha1:f33aefd76c42165302ab0093d207b8e57ca0192f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rpc: Use Method types to determine type of method outputs, updates.</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-18T17:53:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0503f7bd4bd420df0b06cf9ccdd0b800646108bd'/>
<id>urn:sha1:0503f7bd4bd420df0b06cf9ccdd0b800646108bd</id>
<content type='text'>
This lets us do much less in our rpc_invoke_fn functions.
</content>
</entry>
<entry>
<title>rpc: Split Method into DynMethod and Method</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-18T17:04:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7dcfb02c2201c29cb3237f5921a4130e6fcd567a'/>
<id>urn:sha1:7dcfb02c2201c29cb3237f5921a4130e6fcd567a</id>
<content type='text'>
Now `Method` has an Output and Update associated type, and
`decl_method` can do a little more.
</content>
</entry>
<entry>
<title>rpc: simplify API by always providing a sink.</title>
<updated>2023-04-16T12:46:42Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-14T16:35:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5a2c38a1347d0508c59b81ec34732c1ed8fefddd'/>
<id>urn:sha1:5a2c38a1347d0508c59b81ec34732c1ed8fefddd</id>
<content type='text'>
Previously we have two places where we had to do "make a `Drain` sink
if updates aren't wanted"; now there's only one.
</content>
</entry>
<entry>
<title>rpc: Ensure well-ordering of responses.</title>
<updated>2023-04-16T12:46:42Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-14T14:05:56Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=83f5dc48884b66be4c1213f02e403807325cd770'/>
<id>urn:sha1:83f5dc48884b66be4c1213f02e403807325cd770</id>
<content type='text'>
Previously the main loop received updates via a `mpsc::channel`, and
final responses via a `futures::unordered`.  This could lead to
final responses being transmitted to the user before the updates
were all flushed.

Now all of the responses are sent to the main loop via the same channel,
and they can't get out-of-sequence.

Closes #817 and (IMO) simplifies the code a bit.
</content>
</entry>
<entry>
<title>rpc: Move update sink out of context.</title>
<updated>2023-04-16T12:46:41Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-13T18:14:17Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3b9fc607637e80bc16876355fbdfa674ce8907f7'/>
<id>urn:sha1:3b9fc607637e80bc16876355fbdfa674ce8907f7</id>
<content type='text'>
Now the update sink is its own boxed object.  It is not yet passed
to the invoke functions that want it.
</content>
</entry>
<entry>
<title>rpc: Change `id=&lt;SYNTAX&gt;` to "no id".</title>
<updated>2023-04-13T13:03:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-13T12:40:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ea77f959fb567b495c1faa0cf3349cbfb86a3b58'/>
<id>urn:sha1:ea77f959fb567b495c1faa0cf3349cbfb86a3b58</id>
<content type='text'>
Now instead of hoping that buggy clients will detect a magic `id`,
we can simply tell them that they will get no `id` at all.  If they
can't handle that case, no major harm is done: the connection will
get closed anyway.
</content>
</entry>
<entry>
<title>rpc: Require that errors are RpcError.</title>
<updated>2023-04-13T13:03:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T20:30:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5041b51498b9854a10f822dd50cc2f0239d586f7'/>
<id>urn:sha1:5041b51498b9854a10f822dd50cc2f0239d586f7</id>
<content type='text'>
Since we're serializing everything in this format, let's enforce it.
With this change, we can no longer cram arbitrary junk into an
RPC error, so we have to clean up our handling of cancelled requests.
</content>
</entry>
<entry>
<title>rpc: Improve error reporting for invalid requests</title>
<updated>2023-04-12T20:21:34Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T19:59:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=767c91557e6b6bc5429f30b886f8a314df2ddf22'/>
<id>urn:sha1:767c91557e6b6bc5429f30b886f8a314df2ddf22</id>
<content type='text'>
This is a bit big, but it's not that _complicated_.

The idea here is that we use serde's "untagged" enum facility
when parsing our `Request`s, such that if parsing as a `Request`
fails, we parse as an `InvalidRequest` and try to report
what the problem was exactly.

This lets us determine the ID of a request (if it had one),
so we can report that ID in our error message.  We can also
recover from a much broader variety of errors.

We now also conform with the spec reporting errors about
completely wrong json, requests without IDs, and so on.
</content>
</entry>
</feed>
