[three]Bean

Fedmsg Stream Now Available on identi.ca

Dec 08, 2012 | categories: identi.ca, fedmsg, fedora, twitter View Comments

I just finished setting up a fedmsg bot to post updates to identi.ca. You can check it out at @fedmsgbot. There's also this little realtime interface.

Why would this be of any interest?

  • You can check @fedmsgbot for a public timeline of the development of Fedora.
  • If you do something, and you're proud of it, you can go and "favorite" or "re-tweet" a message.

The code works just as well with Twitter (the bot can tweet to multiple platforms and accounts) but I ran into the daily maximum tweet limit; Twitter's 1000-new-updates-per-day is not enough for fedmsg. I asked Twitter if they'd allow an exception, but was denied. Ah, well.. if you have any workaround ideas, let me know.

The source for this, of course, is in the fedmsg repo.

View Comments

Datanommer and Gource

Nov 26, 2012 | categories: fedmsg, datanommer, fedora, gource View Comments

Crazy idea: Take some data and mangle it into a git log. Run gource on that git log.

You may have seen a previous post of mine on datanommer. Well, it's been running for almost two months now. I took the output of datanommer-dump and wrote a script to transform it into a fake git log. The purpose? To run gource on it:

If you have problems with the video, you can download it directly here.

It's like the "Fedora Movie". Just to be clear, the visualization is not of the development of fedmsg itself, but of Fedora in general. You can see wiki edits, IRC meetings, updates to packages, etc.. Can you find yourself in there?

I used gravatar.com to grab the avatar images, using FAS_USERNAME@fedoraproject.org.

View Comments

Ømq and fedmsg DIY

Nov 16, 2012 | categories: python, fedmsg, zeromq, fedora View Comments

Bill Peck wanted to know if he could consume messages from the Fedora Infrastructure message bus without using the fedmsg libs and stack. The answer is yes.

I wrote up an example for him and turns out it was pretty simple, simple enough to warrant being added as its own new section in the docs.

The downshot here is that you don't get the configuration helpers of fedmsg.config, the message manipulation helpers of fedmsg.text and most importantly, the message validation of fedmsg.crypto. The upshot is that you get a quick connection without all those dependencies:

#!/usr/bin/env python
""" You'll need to install python-zmq (pyzmq) for this one.. """

import json
import pprint
import zmq


def listen_and_print():
    # You can listen to stg at "tcp://stg.fedoraproject.org:9940"
    endpoint = "tcp://hub.fedoraproject.org:9940"
    # Set this to something like org.fedoraproject.prod.compose
    topic = 'org.fedoraproject.prod.'

    ctx = zmq.Context()
    s = ctx.socket(zmq.SUB)
    s.connect(endpoint)

    s.setsockopt(zmq.SUBSCRIBE, topic)

    poller = zmq.Poller()
    poller.register(s, zmq.POLLIN)

    while True:
        evts = poller.poll()  # This blocks until a message arrives
        topic, msg = s.recv_multipart()
        print topic, pprint.pformat(json.loads(msg))

if __name__ == "__main__":
    listen_and_print()

p.s., in other news Amit Saha has a post up on collecting stats from the fedmsg bus. This is exciting to me.

View Comments

fedmsg Middleware - Notifications in Every App?

Oct 29, 2012 | categories: python, fedmsg, fedora View Comments

I made this screencast demonstrating the concept of fedmsg middleware for notifications. "Inject a WebSocket connection on every page!"

As usual, if you want to get involved, hit me up in IRC on freenode in #fedora-apps -- I'm threebean there.

View Comments

The first week of fedmsg events in datanommer's DB

Oct 16, 2012 | categories: fedmsg, datanommer, fedora View Comments

Last week we finally got datanommer working in our production environment. Originally ianweller's idea, it is a consumer that sits listening to the fedmsg bus and logs every event to a postgresql database.

It's nice to have in place now. With the data we can make more confident statements about what's happening on the bus... we can record a series of events from our production environment... play those back in staging for testing scenarios... and most importantly, we can make pretty graphs.

I made the following with the output of the datanommer-dump command and these scripts:

https://raw.github.com/ralphbean/datanommer/develop/tools/first-week-of-datanommer/activity.png

You can see the ups and downs of the day/night cycle and you can see activity dip on the weekend, too. Neat!

View Comments

« Previous Page -- Next Page »