Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

rotor

The mio-based framework for rust for doing I/O in simple and composable way (ABANDONED)

Subscribe to updates I use rotor


Statistics on rotor

Number of watchers on Github 377
Number of open issues 4
Average time to close an issue 9 days
Main language Rust
Average time to merge a PR about 9 hours
Open pull requests 1+
Closed pull requests 0+
Last commit over 3 years ago
Repo Created over 4 years ago
Repo Last Updated about 2 years ago
Size 6.64 MB
Organization / Authortailhook
Contributors5
Page Updated
Do you use rotor? Leave a review!
View open issues (4)
View rotor activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating rotor for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

=====

Rotor

:Status: Alpha :Examples: TCP echo server, TCP client (telnet) :Ecosystem: libraries and apps using rotor_ :Documentation: http://tailhook.github.com/rotor/

.. _TCP echo server: https://github.com/tailhook/rotor/blob/master/examples/tcp_echo_server.rs .. _TCP client (telnet): https://github.com/tailhook/rotor/blob/master/examples/telnet.rs .. _libraries and apps using rotor: http://rotor.readthedocs.org/en/latest/ecosystem.html

The mio-based framework for rust for doing I/O in simple and composable way.

The rotor core (this crate) basically consists of:

  • An event loop handler (in terms of mio) which turns mio event into event to specific state machine
  • A Future type which allows communication between state machines in safe and efficient way
  • A simple way to combine multiple libraries (e.g. multiple protocol handlers) into single mio event loop

At the end of the day, rotor is the minimalistic core for making composable libraries on top. It's less than 0.5KLoC.

You are expected to use some higher level abstraction most of the time. For example, you should use stream abstraction (yet to be implemented) for making TCP protocol parser.

Resources

Both are rather historical at the moment

  • Asynchronous IO in Rust <https://medium.com/@paulcolomiets/asynchronous-io-in-rust-36b623e7b965>_ (random design notes about this library)
  • Asynchronous IO in Rust (part II) <https://medium.com/@paulcolomiets/async-io-for-rust-part-ii-33b9a7274e67>_
  • Async IO in Rust (part III) <https://medium.com/@paulcolomiets/async-io-in-rust-part-iii-cbfd10f17203>_

Benchmarks

These benchmarks are based on old version of this example_. Hopefully we will get updated benchmarks soon.

.. _this example: https://github.com/tailhook/rotor-http/blob/master/examples/hello_world_server.rs

Just few micro-benchmarks to show that framework has a decent peformance.

The performance on the few years old laptop (i7-3517U CPU @ 1.90GHz)::

> wrk -t2 -c 400 http://localhost:8888/
Running 10s test @ http://localhost:8888/
  2 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    11.19ms   18.03ms 627.44ms   99.54%
    Req/Sec    19.66k     1.76k   21.93k    81.00%
  391170 requests in 10.01s, 32.83MB read
Requests/sec:  39071.42
Transfer/sec:      3.28MB

Performance on newer desktop class CPU (i7-4790K CPU @ 4.00GHz)::

> ./wrk -t 2 -c 400 http://127.0.0.1:8888
Running 10s test @ http://127.0.0.1:8888
  2 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.24ms    1.56ms 126.94ms   99.91%
    Req/Sec    91.35k     2.27k   93.76k    98.00%
  1818133 requests in 10.00s, 152.58MB read
Requests/sec: 181781.96
Transfer/sec:     15.26MB

Note: both benchmarks are run on single threaded server.

The benchmarks are too early (not a full implementation of HTTP), so no comparison bencmarks listed here.

rotor open issues Ask a question     (View All Issues)
  • over 3 years Comparison with tokio-core
  • almost 4 years Support for DPDK
  • about 4 years Expose mio::Handler.tick
rotor open pull requests (View All Pulls)
  • doc: intro nits
rotor questions on Stackoverflow (View All Questions)
  • VoiceOver difference between rotor and two finger swipe
  • Enable Links in Accessibility Rotor VoiceOver on UIView
  • Heading with link not listed in VoiceOver Headings rotor
  • Rotor SSCLI 2.0 - Error in building PAL
  • How can I add to the iOS VoiceOver rotor for a custom view?
  • How to implement rotor with auto-text for my custom input method in VoiceOver?
  • Can I influence what appears in the VoiceOver rotor?
  • Is it possible to remove the delete button in UITableViewCell but keep the VoiceOver Rotor "Action" element?
  • Flot tick rotor showing ticks twice
  • iOS Voice Over rotor notifications?
  • What is the difference between SSCLI 2.0 (ROTOR) and .NET?
  • SSCLI (Rotor) for the v4.0 clr?
  • Is there a version of Rotor for .NET 3.5? If so, where?
rotor list of languages used
Other projects in Rust