I presented ADBA at the San Francisco Java Users Group last night. It was great. There were a number of folks who were strong advocates of reactive streams and we talked for well over an hour after the presentation ended. The kind of feedback we got last night is critical to the future success of this project.
This discussion resulted in a concrete proposal to make ADBA better integrate with reactive streams. I’m working on the API updates in a branch and will push that branch ASAP. At present this is strictly a idea under discussion as it is a substantial change and we won’t go down this path without more discussion from the wider community.
The proposal is easy to describe though there are definitely some tricky bits in the actual API design.
- Replace Submission everywhere with java.util.concurrent.Flow.Publisher
- Replace ParameterizedOperation.set(String, CompletionStage, SqlType) with set(String, Publisher, SqlType)
- Make DataSource a Publisher<Session>
That’s the core idea but there will be other changes. Effectively this replaces all uses of CompletionStage with Publisher. Not exactly because it also removes Submission as it is not needed.
I have one small question. CompletionStage<Void> is ok. It is used to signal that an Operation completed with no result. Is Publisher<Void> ok? I assume that such a Publisher could only call onComplete or onError which is just what is needed for these use cases.