Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3654

The proxy should support end-to-end back-pressure

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 5.5.0
    • Component/s: core apis, proxy
    • Labels:
      None

      Description

      It would be really nice if our client APIs could be reactive. Unfortunately, RxJava's Flowable is intended for homogeneous streams of objects which doesn't match very well to LDAP's stateful heterogeneous response streams. In particular, we want a Flowable whose completion notification includes the final LDAP Result, instead of the Result being included in the stream itself.

      The goal of this issue is investigate whether we can implement our own reactive response streams in the style of Rx's Flowable without having to recreate the wheel. Clearly we don't want to duplicate all the functionality provided by Flowable as there's a lot of it - in effect we would be adding at least one addition type + related types to the existing Flowable, Maybe, Single, and Completable types. Can we provided a simple wrapper around Flowable that is sufficient for our needs? For example, here's two possible use cases:

      Connection connection = ...;
      
      connection.search(searchRequest)
                .subscribe(new SearchSubscriber() {
                    @Override
                    public void onSubscribe(final Subscription s) {
                        
                    }
      
                    @Override
                    public void onSearchResultEntry(final SearchResultEntry entry) {
      
                    }
      
                    @Override
                    public void onSearchResultReference(final SearchResultReference reference) {
      
                    }
      
                    @Override
                    public void onIntermediateResponse(final IntermediateResponse im) {
      
                    }
      
                    @Override
                    public void onError(final Throwable t) {
      
                    }
      
                    @Override
                    public void onResult(Result result) {
                          
                    }
                });
      
      // Example of blocking usage:
      List<SearchResultEntry> entries = connection.search(searchRequest)
                                                  .toListOfSearchResultEntries()
                                                  .blockingGet();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ylecaillez Yannick Lecaillez
                Reporter:
                matthew Matthew Swift
                Dev Assignee:
                Yannick Lecaillez
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: