Git Product home page Git Product logo

rendezvous-server's People

Contributors

da-kami avatar dependabot[bot] avatar domol avatar klochowicz avatar rishflab avatar thomaseizinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rendezvous-server's Issues

Docker image

A simple Docker image for running a rendezvous server might be useful. Would help with making running one more reliable and easy.

src/transport.rs: Consider using `V1Lazy`

Unsolicited feedback. Feel free to ignore.

Given that you are supporting a single authentication protocol only, you might want to consider using Version::V1Lazy instead of V1, potentially saving you one round trip. See V1Lazy docs for details.

/// "Completes" a transport by applying the authentication and multiplexing
/// upgrades.
///
/// Even though the actual transport technology in use might be different, for
/// two libp2p applications to be compatible, the authentication and
/// multiplexing upgrades need to be compatible.
pub fn authenticate_and_multiplex<T>(
transport: Boxed<T>,
identity: &identity::Keypair,
) -> Result<Boxed<(PeerId, StreamMuxerBox)>>
where
T: AsyncRead + AsyncWrite + Unpin + Send + 'static,
{
let auth_upgrade = {
let noise_identity = noise::Keypair::<X25519Spec>::new().into_authentic(identity)?;
NoiseConfig::xx(noise_identity).into_authenticated()
};
let multiplex_upgrade = SelectUpgrade::new(yamux::YamuxConfig::default(), MplexConfig::new());
let transport = transport
.upgrade(Version::V1)
.authenticate(auth_upgrade)
.multiplex(multiplex_upgrade)
.timeout(Duration::from_secs(20))
.map(|(peer, muxer), _| (peer, StreamMuxerBox::new(muxer)))
.boxed();
Ok(transport)
}

Do we really need the examples?

I am not sure how much value they are adding over the examples that already exist in the rust-libp2p repository. I'd rather keep this repository simple.

Move `bin/rendezvous_server.rs` to `main.rs`

With only a single binary, we can move all the code into main.rs and it will by convention have the name of the crate.

While we are at it, I think we can just remove lib.rs altogether.

This project is a binary, not a library. It shouldn't expose a library interface. Might need to consider #9 as part of that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.