Skip to content

Releases: valehasadli/BlinkHub

v0.4.6

22 Apr 13:13
672c0ed
Compare
Choose a tag to compare

BlinkHub Emitter - Introducing Delayed Event Subscription

We're thrilled to announce a significant update to the BlinkHub Emitter library! This release is focused on enhancing the flexibility and usability of our event handling system with the introduction of the subscribeWithDelay feature. Here's an overview of what we've accomplished:

New Feature:

  • Subscribe with Delay: The new subscribeWithDelay method allows you to subscribe to events with a specified delay. This feature enables callbacks to be executed after a delay, adding a new dimension to how you handle events.

Testing Enhancements for subscribeWithDelay:

  • Multiple Delayed Subscriptions: Added tests to verify that multiple callbacks with different delays can be subscribed to the same event and are called at the correct times.

  • Independent Delay Execution: Ensured through testing that callbacks with delays are executed independently and do not interfere with each other.

  • Unsubscribe Functionality: Included tests for unsubscribing delayed callbacks both before and after the delay period, ensuring that the unsubscribe mechanism works as expected with delayed execution.

  • Edge Case Handling: Tested various edge cases, such as zero delay and unsubscribing within a delayed callback, to ensure robustness and reliability.

Enhanced Test Cases for general scope:

  • Unsubscribe Functionality Test:

    • Added a test to verify the effective unsubscription of callbacks from events. This ensures that once a callback is unsubscribed, it no longer receives event notifications.
  • Multiple Arguments Handling Test:

    • Implemented tests to validate the handling of multiple arguments in event callbacks, ensuring all provided data is correctly passed and handled.
  • Error Handling in Callbacks Test:

    • Introduced error handling tests to confirm that errors in one callback do not prevent the execution of subsequent callbacks in the event loop.
  • Event Emission with No Subscribers Test:

    • Added a test to check the behavior when events are emitted without any subscribed callbacks, ensuring that such cases are handled gracefully.
  • Dynamic Callback Management Test:

    • Developed tests for dynamic subscribing and unsubscribing within event callbacks, enhancing the flexibility and dynamic nature of event handling.
  • Asynchronous Callbacks Test:

    • Created tests for the handling of asynchronous callbacks, ensuring that they are properly called and managed within the event emission process.

Other Test Improvements:

  • While our focus was on the subscribeWithDelay feature, we also took the opportunity to enhance our overall test suite. This includes:
    • Testing for multiple subscriptions to the same event.
    • Ensuring callbacks are only triggered for their subscribed events.
    • Verifying the order of callback execution.
    • Expanding tests to cover various argument types and error handling scenarios.

Future Considerations:

  • In upcoming updates, we plan to explore additional testing areas such as asynchronous callbacks, performance optimization, and memory leak prevention to continually improve the reliability and efficiency of the Emitter.

Special Thanks

  • We would like to extend our special thanks to @emilQA for his exceptional commitment and contributions on the testing side. His meticulous efforts have significantly improved the quality and reliability of our library.

Conclusion:

This update significantly enhances the Emitter's capabilities, making it an even more versatile tool for event management in your applications. We encourage you to explore the new subscribeWithDelay feature and provide feedback for continuous improvement.

v0.4.3

19 Dec 15:24
b4e468f
Compare
Choose a tag to compare

BlinkHub Emitter - Introducing Delayed Event Subscription

We're thrilled to announce a significant update to the BlinkHub Emitter library! This release is focused on enhancing the flexibility and usability of our event handling system with the introduction of the subscribeWithDelay feature. Here's an overview of what we've accomplished:

New Feature:

  • Subscribe with Delay: The new subscribeWithDelay method allows you to subscribe to events with a specified delay. This feature enables callbacks to be executed after a delay, adding a new dimension to how you handle events.

Testing Enhancements for subscribeWithDelay:

  • Multiple Delayed Subscriptions: Added tests to verify that multiple callbacks with different delays can be subscribed to the same event and are called at the correct times.

  • Independent Delay Execution: Ensured through testing that callbacks with delays are executed independently and do not interfere with each other.

  • Unsubscribe Functionality: Included tests for unsubscribing delayed callbacks both before and after the delay period, ensuring that the unsubscribe mechanism works as expected with delayed execution.

  • Edge Case Handling: Tested various edge cases, such as zero delay and unsubscribing within a delayed callback, to ensure robustness and reliability.

Enhanced Test Cases for general scope:

  • Unsubscribe Functionality Test:

    • Added a test to verify the effective unsubscription of callbacks from events. This ensures that once a callback is unsubscribed, it no longer receives event notifications.
  • Multiple Arguments Handling Test:

    • Implemented tests to validate the handling of multiple arguments in event callbacks, ensuring all provided data is correctly passed and handled.
  • Error Handling in Callbacks Test:

    • Introduced error handling tests to confirm that errors in one callback do not prevent the execution of subsequent callbacks in the event loop.
  • Event Emission with No Subscribers Test:

    • Added a test to check the behavior when events are emitted without any subscribed callbacks, ensuring that such cases are handled gracefully.
  • Dynamic Callback Management Test:

    • Developed tests for dynamic subscribing and unsubscribing within event callbacks, enhancing the flexibility and dynamic nature of event handling.
  • Asynchronous Callbacks Test:

    • Created tests for the handling of asynchronous callbacks, ensuring that they are properly called and managed within the event emission process.

Other Test Improvements:

  • While our focus was on the subscribeWithDelay feature, we also took the opportunity to enhance our overall test suite. This includes:
    • Testing for multiple subscriptions to the same event.
    • Ensuring callbacks are only triggered for their subscribed events.
    • Verifying the order of callback execution.
    • Expanding tests to cover various argument types and error handling scenarios.

Future Considerations:

  • In upcoming updates, we plan to explore additional testing areas such as asynchronous callbacks, performance optimization, and memory leak prevention to continually improve the reliability and efficiency of the Emitter.

Special Thanks

  • We would like to extend our special thanks to @emilQA for his exceptional commitment and contributions on the testing side. His meticulous efforts have significantly improved the quality and reliability of our library.

Conclusion:

This update significantly enhances the Emitter's capabilities, making it an even more versatile tool for event management in your applications. We encourage you to explore the new subscribeWithDelay feature and provide feedback for continuous improvement.

v.0.3.15

22 Nov 12:51
6676af5
Compare
Choose a tag to compare

We are excited to announce the release of version 0.3.9 of Blinkhub. This update introduces a significant enhancement to our event-handling mechanism, making it more efficient and robust, especially under high-load scenarios.

What's New

Priority Queue Integration

  • Improved Event Handling: Implemented a priority queue system for managing event listeners. This ensures that high-priority events are handled more promptly and efficiently.

  • Optimized Performance: The new system enhances performance, especially in scenarios where certain events need immediate attention over others.

  • API Consistency: Maintained backward compatibility and API consistency, ensuring that existing implementations remain unaffected by these improvements.

Performance Insights

  • Conducted extensive load testing using Artillery to evaluate the impact of these changes.

  • Observed notable improvements in maximum response time and average session length.

  • A slight trade-off in request rate was noted, justified by the more efficient handling of critical events.

Test Results: Before and After

Before Priority Queue Implementation:

  • Request Rate: 5027 requests/sec

  • Max Response Time: 49 ms

  • Mean Session Length: 7.5 seconds

After Priority Queue Implementation:

  • Request Rate: 3210 requests/sec

  • Max Response Time: 19 ms

  • Mean Session Length: 3.2 seconds

Folder structure refactored

Now core implementation is located under lib folder

v0.3.8

16 Nov 15:55
85b8e28
Compare
Choose a tag to compare

What's New

  • New Feature: subscribeList

    • Introducing subscribeList functionality to enhance event handling capabilities. This feature allows users to get a list of all subscribers for a specific event, providing better control and insights into event management.

Enhancements & Fixes

Developer Experience

  • Improved documentation for the new subscribeList feature and updated examples to demonstrate its usage.

  • Enhanced test coverage for new and existing features, ensuring robustness and reliability.

Notes to Developers

  • If you're extending or integrating with Blink-Hub, please review the updated documentation for the subscribeList feature.

  • The changes in Jest configuration may require updates to your local development setup. Refer to the updated jest.config.js for the latest configuration.

v0.3.4

15 Nov 23:15
cd3d082
Compare
Choose a tag to compare

We are thrilled to announce the release of BlinkHub Emitter v2.1.0, featuring the much-anticipated Channel Functionality. This update is a significant step forward in providing our users with more robust and flexible event management capabilities.

What's New:

🚀 Channel Feature:

  • Isolated Event Handling: Introducing the concept of channels to our Emitter class. Now you can create isolated event spaces, or 'channels', to manage events more efficiently and with better organization.

  • Namespaced Events: Each channel can have its own set of events, preventing event name collisions and making your event management cleaner and more modular.

  • Usage Simplicity: Channels are created and used with the same ease and intuitiveness you've come to expect from BlinkHub Emitter, ensuring a seamless developer experience.

Updates:

  • Improved type safety across the library.

  • Enhanced documentation with new examples and use cases for the channel feature.

  • Various bug fixes and performance improvements.

Breaking Changes:

  • None. This release maintains backward compatibility with previous versions.