Giter VIP home page Giter VIP logo

pubsub-light-plugin's Introduction

Pub-Sub "light" Bus plugin for Jenkins

A light-weight Publish-Subscribe (async) event notification module for Jenkins.

Contains the org.jenkins.pubsub.PubsubBus abstract class, which is a Jenkins ExtensionPoint, with a default implementation based on Google's Guava EventBus.

Note: Other implementations can be created for other Messaging Systems e.g. a JMS based implementation for a distributed bus. An alternative to a distributed bus might be a Messaging Bridge, with a Jenkins master instance using the default bus implementation internally, while "sharing" events globally via a bridge that just listens in on the bus and republishes the events.

API

Please see the online Javadoc for how to use the API.

Release notes

See CHANGELOG.md

This is not a full-blown Event Bus

The guiding design principal of this module is:

  • Light-weight, untyped, name-value pair messages containing "just enough" information to allow an event subscriber to decide if they are interested in getting all of the data associated with the event (typically via a REST API call).

This was never intended to be a full-blown Enterprise Service Bus, with complex message types, complex message routing, complex message transformation etc. It was created to provide light-weight async event notification for the SSE Gateway plugin.

FAQs

Some questions that have been asked (or are anticipated ๐Ÿ˜„ ).

Why not just put everything into the event payload?

This is a fair question to ask; if the lightweight event just results in a REST API call to get more data, then why not short-circuit the process and put all the data into the event before publishing?

We feel that there's no "right" answer to the question of whether we should go with light or heavy events. Different use cases will have different requirements. Some will want less data than others. Some will want completely different data i.e. just using the event as a trigger, not using any of the event data.

If we had gone with heavier events, it is guaranteed that at some point in time, people would encounter situations where heavy events are being published and only one or two fields from those events are being used. Guess what the obvious question from these people would be? So in reality, there's no "right" answer to this question, but on balance, we feel that the lightweight message approach will work out to be better.

Note, your application can also implement MessageEnricher extension points to add data to the default payloads. This could be used as a way to "bulk up" events with more data that you know will be used, saving follow-up REST calls etc. Please use with a clear head !!

pubsub-light-plugin's People

Contributors

ahenryjard avatar amuniz avatar basil avatar cliffmeyers avatar dependabot[bot] avatar jglick avatar jtnord avatar markewaite avatar olamy avatar oleg-nenashev avatar olivergondza avatar scherler avatar stephenc avatar szym avatar tfennelly avatar vlatombe avatar zbynek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.