Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
autohost-pubsub
Advanced tools
A backbone that allows clients to manage subscriptions to system-wide events.
A backbone that allows clients to manage subscriptions to system-wide events.
The intention is that clients can manage what topics they subscribe to via the web socket API or HTTP API.
// subscribes to a specific topic
socket.emit( "subscription.add", { topic: "my.topic" } );
// subscribes to any topic beginning with `my`
socket.emit( "subscription.add", { topic: "my.#" } );
// unsubscribes to a topic
socket.emit( "subscription.remove", { topic: "my.topic" } );
This example demonstrates using a halon client to make the calls. (because hypermedia makes everything better)
var client = halon({
root: "http://yourserver/api",
adapter: halon.jQueryAdapter($)
});
client.subscription.add( { topic: "my.topic" } );
client.subscription.remove( { topic: "my.topic" } );
npm install autohost-pubsub -S
var autohost = require( "autohost" );
var host;
var hyped = require( "hyped" )();
var fount = require( "fount" );
var postal = require( "postal" );
// create the channel used to communicate between
// a message backbone/app and the pubsub resource
var channel = postal.channel( "ahpubsub" );
fount.register( "ahpubsub", channel );
host = hyped.createHost( autohost, {
port: config.nonstop.host.port,
modules: [
"autohost-pubsub"
],
fount: fount
}, function() {
host.start();
} );
// you can plug any message/event backbone into this system using the postal channel
// just publish events to the topics as the clients have subscribed to them
// and it will handle the rest ...
// this example demonstrates how you could forward messages from a rabbit
// queue via wascally and use the routing key of the message as the topic
rabbit.on( "some.important.message", function( message ) {
channel.publish( message.fields.routingKey, message.body );
} );
FAQs
A backbone that allows clients to manage subscriptions to system-wide events.
We found that autohost-pubsub demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.