Skip to content

Check partial answers for ongoing requests #141

Closed

Description

For long-running requests, it makes sense to show partial results in the UI (for example when searching for all references in a workspace, but even for completion). Streaming them from the server is not a very good idea, but the client could send progress requests whenever it wants and receive the current results, updating the UI. Kind of like cancelRequest but without cancelling.

Activity

  1. felixfbecker commented on Dec 27, 2016

    @felixfbecker

    I have made a proposal for progress in #70

  2. vladdu commented on Dec 27, 2016

    @vladdu
    ContributorAuthor

    This is more than progress report. I'd like to be able to get a list of partial results for an ongoing request. This should be something the client requests.

  3. kdvolder commented on Dec 28, 2016

    @kdvolder

    Streaming them from the server is not a very good idea,

    Why not? Personally I very much like the idea of having a fully async and incremental mechanic for sending completions (for example).

    Having this allows for server to deliver any results as soon it has them rather than having to buffer them and make an awkward implementation decision around how much time is 'reasonable' to try and compute as many results as possible before returning an incomplete list. This often means you end up returning 0 completions even if the user was willing to wait a bit (or just stopped typing for a moment to reflect).

  4. vladdu commented on Dec 28, 2016

    @vladdu
    ContributorAuthor

    I think also that it would be neat with a streaming API, fully async. It has the downside is that it offers no flow control. Also, I believe that clients might have trouble handling it properly, thus making it less likely to get implemented. I started with a less ambitious suggestion, hoping to get it accepted easier.

    I have absolutely no objection against a fully async protocol, when it is supported by both the client and the server. There will have to be a fallback solution for participants that need flow control or can't handle the async streams of events.

  5. added
    feature-request
    on Dec 29, 2016
  6. dbaeumer commented on Dec 29, 2016

    @dbaeumer
    Member

    With the new capability flag support in 3.0 I can imagine a flag 'supportsResultStreaming' on the completion capability to indicate that the client accept streamed results. Then the server can stream results.

  7. felixfbecker commented on Dec 29, 2016

    @felixfbecker

    With the new capability flag support in 3.0 I can imagine a flag 'supportsResultStreaming' on the completion capability to indicate that the client accept streamed results. Then the server can stream results.

    How exactly would that work? Streaming depends entirely on the client parsing the response as a JSON stream, for example if it is an array emitting each array item instantly and not waiting for the whole response to parse it completely.

    EDIT: Okay, it doesn't work, because the server needs to send a Content-Length before-hand

  8. vladdu commented on Dec 29, 2016

    @vladdu
    ContributorAuthor

    Not necessarily, I think. The server could also send multiple answers to a request, with a flag saying if it's done or not. There should be a merging policy for the non-array values. This way, it works fine even if a response would contain two arrays that are computed in parallel (there isn't such a response now, but there could be).

  9. dbaeumer commented on Dec 30, 2016

    @dbaeumer
    Member

    Agree with Vlad Dumitrescu (@vladdu). This can be achieved using a paging support. That would even allow the client to request all results if a user picks a already sent one in the example of code complete.

  10. felixfbecker commented on May 8, 2017

    @felixfbecker

    Partial results are possible with our streaming implementation: #182

  11. dbaeumer commented on Nov 24, 2017

    @dbaeumer
    Member

    Marking as dup of #110

  12. added
    *duplicate
    on Nov 24, 2017
  13. locked and limited conversation to collaborators on Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *duplicatefeature-request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions