GithubHelp home page GithubHelp logo

sachanganesh / connect-rs Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 1.0 133 KB

a message-queue abstraction over async network streams

Home Page: https://docs.rs/connect/

License: Apache License 2.0

Rust 100.00%
async message-queue networking rust

connect-rs's People

Contributors

sachanganesh avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

connect-rs's Issues

Remove use of `block_on` in `poll_x` functions

The following code from the TCP server Stream impl and TLS server Stream impl uses block_on within the poll_next function. This is a really bad practice and should be changed.

match futures::executor::block_on(self.listener.incoming().next()) {

match futures::executor::block_on(self.listener.incoming().next()) {

match futures::executor::block_on(self.acceptor.accept(tcp_stream)) {

However, naively using the corresponding poll_x function of the async code leads to misbehavior in the server example programs. The servers just hang and do not get alerted to new connections. This particular error is most likely an implementation error on my part, so the proper solution is unclear.

Consider a connection pool for high-contention connections

There could be a use case for creating connection pools to certain destinations that have too high a backlog of messages. Of course, with this added concurrency, there needs to be a way of re-ordering messages on the receiving side.

Design thorough tests

I'm not sure at the moment how to design reasonable tests for things like the socket successfully bound to a ip-addr/port, etc. without some human verification. This needs to be solved in the long term though.

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.