Skip to content

diesel 4 Extensions

dowski edited this page Jan 2, 2015 · 1 revision

Overview

diesel 3.x provides a great API for building network applications upon itself. However, it doesn't provide an API for building new functionality into the core. For example, it wasn't possible to add useful CPU per-Loop CPU time statistics without directly changing the core.

Goals

  • Factor CPU timing code out of the Loop class.
  • Provide an API for additional extensions.
  • Expose counters/statistics via this API.

Design

There are a couple of APIs needed - APIs for creating extensions and for selectively including them in an application. Adding APIs adds more overhead to someone understanding diesel as a whole though. It might make more sense for diesel to simply fire messages for various internal events and code that is interested in acting on that can do so. The other option is a more full blown API with callbacks that are called at various points.

Two interesting events that often occur during the life of a diesel application are "dispatch-in" and "dispatch-out" - when a Loop is switched into to run, and when it yields control back to the event hub.

Finally, this feature probably needs more justification before seeing the light of day. It's probably most useful for integrating various types of monitoring, but those use cases should probably be expanded more.

Progress

Planing stage only.