inejge / ldap3

A pure-Rust LDAP library using the Tokio stack
Apache License 2.0
220 stars 38 forks source link

tokio-core is deprecated. #29

Closed quadrupleslap closed 4 years ago

bbigras commented 6 years ago

Any progress on this?

masonk commented 6 years ago

I think that conversion from tokio_core to tokio is blocking the use of ldap3 with any other tokio system, such as actix-web (and many others).

inejge commented 6 years ago

Just a short note (as I otherwise don't have the time to work on this library): moving away from tokio_core to tokio would have to account for the use of the former in tokio_proto, also deprecated but unfortunately the foundation of ldap3. I don't see a straightforward way to excise tokio_proto without a massive rewrite of this crate's internals.

masonk commented 6 years ago

Yes, I was realizing that last night when I was trying to do the migration myself.

nevi-me commented 5 years ago

Hi @inejge , I had a go at trying to port to tokio today, and have made some progress. It looks like the blocker is tokio_proto more than anything, for the multiplex tcp connections.

I'm due to release a program that will be deployed at clients in the coming days, so I don't have a choice but to "make it work". I'm going to try something from the tower ecosystem and see if it works. I'll provide feedback in a few days

inejge commented 5 years ago

Right, the tokio_proto multiplexer is the tricky part, and having it available is what made initial development comparatively straightforward. For your immediate problem, I'd recommend starting a dedicated thread for LDAP connection(s), with its own tokio_core event loop, and communicating with the rest of the system via oneshot/mpsc channels. I believe these can work across tokio flavors.

nevi-me commented 5 years ago

I found https://github.com/red75prime/tokio-proto/commit/cd1af828791fcd60dc518eb713a53d00e9aacf91, which while not ideal, still allowed me to get the crate to build. I just got it to build now actually.

inejge commented 4 years ago

With the port to Tokio 0.2, this can now be closed.

nevi-me commented 4 years ago

Thanks @inejge