1. A distributed system, comprising: multiple computer systems; and a distributed system of software components configured to execute on the computer systems, wherein the software components, when executed on the computer systems, are configured to provide: an input gateway for accepting input events; a distribution component for distributing the input events, via the input gateway, to an input port; an event registry in which an event driven component registers an interest in accepting a subset of the input events to generate output events when executing a plurality of services, wherein each service in the plurality of services is associated with one or more events; a coarse-grained component for providing a coarse-grained function via the input port, wherein the coarse-grained function provides the plurality of services; a buffered port that provides respective queues corresponding to each of the plurality of services according to a configurable policy, wherein the buffered port is dedicated to be exclusively used by the event driven component, and wherein each of the queues: holds at least one of the subset of the input events, selects an input event of the at least one of the subset of input events using the configurable policy, and provides the selected input event to the course-grained component which generates an output event by applying the service associated with a respective one of the queues to the selected input event; and an output gateway for dispatching the generated output event to an output port.