hashed-wheel-timer | High Performance Timer / Scheduler Library compatible

 by   ifesdjeen Java Version: Current License: EPL-1.0

kandi X-RAY | hashed-wheel-timer Summary

kandi X-RAY | hashed-wheel-timer Summary

hashed-wheel-timer is a Java library. hashed-wheel-timer has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has low support. You can download it from GitHub, Maven.

Hashed and Hierarchical Wheels were used as a base for Kernels and Network stacks, and were described by the freebsd, linux people, researchers and in many other searches. Many modern Java frameworks have their own implementations of Timing Wheels, for example, Netty, Agrona, Reactor, Kafka, Seastar and many others. Of course, every implementation is adapted for the needs of the particular framework. The concept on the Timer Wheel is rather simple to understand: in order to keep track of events on given resolution, an array of linked lists (alternatively - sets or even arrays, YMMV) is preallocated. When event is scheduled, it's address is found by dividing deadline time t by resolution and wheel size. The registration is then assigned with rounds (how many times we should go around the wheel in order for the time period to be elapsed). For each scheduled resolution, a bucket is created. There are wheel size buckets, each one of which is holding Registrations. Timer is going through each bucket from the first until the next one, and decrements rounds for each registration. As soon as registration's rounds is reaching 0, the timeout is triggered. After that it is either rescheduled (with same offset and amount of rounds as initially) or removed from timer. Hashed Wheel is often called approximated timer, since it acts on the certain resolution, which allows it's optimisations. All the tasks scheduled for the timer period lower than the resolution or "between" resolution steps will be rounded to the "ceiling" (for example, given resolution 10 milliseconds, all the tasks for 5,6,7 etc milliseconds will first fire after 10, and 15, 16, 17 will first trigger after 20). If you're a visual person, it might be useful for you to check out these slides, which help to understand the concept underlying the Hashed Wheel Timer better. The early variant of this implementation was contributed to Project Reactor back in 2014, and now is extracted and adopted to be used as a standalone library with benchmarks, debounce, throttle implementations, ScheduledExecutorService impl and other bells and whistles. For buckets, ConcurrentHashSet is used (this, however, does not have any influence on the cancellation performance, it is still O(1) as cancellation is handled during bucket iteration). Switching to the array didn't bring change performance / throughput at all (however, reduced the memory footprint). Array implementation is however harder to get right, as one would have to allow multiple strategies for growth and shrinking of the underlying array. Advancement would be to implement a hierarchical wheels, which would be quite simple on top of this library.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              hashed-wheel-timer has a low active ecosystem.
              It has 199 star(s) with 37 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 4 have been closed. On average issues are closed in 27 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of hashed-wheel-timer is current.

            kandi-Quality Quality

              hashed-wheel-timer has no bugs reported.

            kandi-Security Security

              hashed-wheel-timer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              hashed-wheel-timer is licensed under the EPL-1.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              hashed-wheel-timer releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed hashed-wheel-timer and discovered the below as its top functions. This is intended to give you an instant insight into hashed-wheel-timer implemented functionality, and help decide if they suit your requirements.
            • Creates a Runnable that returns a Runnable that will immediately be executed once
            • Creates a function that debounce the delegate function to execute
            • Creates a function that debounce the delegate consumer to the specified period
            • Invokes all tasks in the given collection waiting for them to complete
            • Invokes the specified collection of Callables
            • Invokes the given collection of tasks and returns the result
            • Executes any of the given tasks
            • Creates a new consumer that executes the given function on the given period
            • Schedules callable
            • Schedules a runnable for execution
            • Submit a task
            • Schedules a runnable task
            • Performs a multi - timer test
            • Returns true if the scheduler thread is terminated
            • Schedules the specified runnable periodically with a fixed delay
            • Setup the timer
            • Schedules a runnable with a fixed delay between failures
            • Returns true if the server is shutdown
            • Shutdown the timer
            • Shuts down the timer
            • Starts the scheduled task
            • Shuts down the background thread
            • Rechedule a registration
            • Measure timer throughput
            • Compares this Delay with another Delay
            • Benchmark throughput
            Get all kandi verified functions for this library.

            hashed-wheel-timer Key Features

            No Key Features are available at this moment for hashed-wheel-timer.

            hashed-wheel-timer Examples and Code Snippets

            No Code Snippets are available at this moment for hashed-wheel-timer.

            Community Discussions

            No Community Discussions are available at this moment for hashed-wheel-timer.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install hashed-wheel-timer

            You can download it from GitHub, Maven.
            You can use hashed-wheel-timer like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the hashed-wheel-timer component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ifesdjeen/hashed-wheel-timer.git

          • CLI

            gh repo clone ifesdjeen/hashed-wheel-timer

          • sshUrl

            git@github.com:ifesdjeen/hashed-wheel-timer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by ifesdjeen

            zweikopf

            by ifesdjeenRuby

            cascading-cassandra

            by ifesdjeenJava

            jReadability

            by ifesdjeenScala

            continuum

            by ifesdjeenJava

            blomstre

            by ifesdjeenJava