-
Notifications
You must be signed in to change notification settings - Fork 205
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
websocket variant of query endpoint #3936
Conversation
…ocket-service-improvement
- clients may not be in control of how query bodies are delivered to the server, so we should be agnostic in that respect
CHANGELOG_BEGIN - [JSON API - Experimental] WebSocket contract search at ``/contracts/searchForever``. See `issue #3936 <https://github.com/digital-asset/daml/pull/3936>`_. CHANGELOG_END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM;
ledger-service/http-json/src/main/scala/com/digitalasset/http/WebSocketService.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too!
- thanks @leo-da for pointing it out
After submitting an ``Iou_Split`` exercise, which creates two contracts | ||
and archives the one above, the same stream will eventually produce:: | ||
|
||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format differs from what you get from the /commands/exercise
endpoint. Her you get something looking like
{
created: [C1, C2],
archived: [A1, A2]
}
There you'd instead get
[
{created: C1},
{created: C2},
{archived: A1},
{archived: A2}
]
I'd prefer if the encoding is the same for both endpoints. Since the /commands/exercise
endpoint does not work with the first format, we need to use the second in both places. It would be nice if could keep the order of the events we don't filter out during consolidation for the /contracts/searchForever
endpoint, but I don't consider it a hard requirement.
Fixes #3880, fixes #3878. Obsoletes #3912 (by incorporation of most of its parts) for the purposes of the JSON API itself.
Major changes versus #3912 :
/contracts/search
exactly. That means no empty queries are allowed, and the filtering part is actually used./contracts/searchForever
to emphasize that this is not a stream of transactions, as discussed in Add streaming service for queries #3878.{errors, created, archived}
, where all members are lists, rather than containing one contract per output object.Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tags, if appropriateNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.