creachadair / jrpc2

A Go implementation of a JSON-RPC 2.0 server and client.
BSD 3-Clause "New" or "Revised" License
62 stars 10 forks source link

HTTP bridge needs improvement #57

Closed creachadair closed 3 years ago

creachadair commented 3 years ago

In #52, I changed the way the HTTP bridge works, so that it only exposes a raw channel to the server rather than interposing a client. As it says on the box, that change made things simpler, but it also made the bridge harder to use. Without ID virtualization, clients can easily collide on IDs, and there's no good way for them to coordinate.

My first thought was to simply revert the substance of #52. But then I noticed that there is very little use of this package at all, and I thought maybe it would be better to delete it entirely. It's not particularly useful in its current form, I don't use it in my own applications, and if nobody else is using it either, it might as well not exist.

Make a decision and either fix it or remove it.

creachadair commented 3 years ago

If I decide to keep this, #58 should help.

creachadair commented 3 years ago

After further consideration and some food, I think the right decision is to merge a fix rather than deleting the package. HTTP is probably the most widely-used application transport, for better or worse. Even though it is not an ideal fit for JSON-RPC, I think the library should have a story for how to integrate.