Enhance non-blocking connection pool
Just to mention I'll rewrite portions of the MemberSingle drain loop and NonBlockingConnectionPool to maximize non-blocking. At the moment establishment of a connection blocks the drain loop. It should be scheduled with a subsequent drain call. Might get to release stage in a week or two.
Hi David the method connections() on the Database returns a Single<Connection>. Is this Right? I would have have thought if a Database object was created via NonBlockingConnectionPool then surely you would have a pool of connections thus method would return a Flowable<Connection>. If i am wrong can you pleas clarify? Thanks.
Thanks for your question. I should rename that method to connection().
I don't have a use case for a Flowable<Connection>, a Single<Connection> is all I needed so that design is use-case driven. What's your use case and I'll see if there's a need for Flowable<Connection>?
Be aware that the Single<Connection> is reusable in that each subscription gets a Connection.
Note also that the Single<Connection> can be trivially turned into a Flowable by calling .repeat() but I wouldn't suggest it without discussing the use case first.
Thanks David.
I do not have a particular use case, just puzzled by connections(). I can see you have made the change. It would be good if you could add some JavaDocs at some point to the the code.
drain rework is just about complete and has been merged to master. It includes removal of all blocking code from the MemberSingle.drain() method. I'll add more tests.
Hi David, a quick question do you have support for stored procedures?
No, not yet. I'll raise an issue and see about getting to it. See #8.