2 2

[alpine-devel] build server messaging

Natanael Copa
Details
Message ID
<20111122165940.6c0e0371@ncopa-desktop.nor.wtbts.net>
Sender timestamp
1321977580
DKIM signature
missing
Download raw message
Hi,

Our current messaging between git server and buildservers goes via
public IRC and has not been 100% reliable.

So I have been looking at replacing it with a zeromq[1] based infra.

The idea is that we have a buildmsg-server that listens on 2 ports, one
for subscribers and one for git push notifications.

The buildmsg-send is executed from git hook when something is pushed.
buildmsg-send will connect to the buildmsg-server socket and simply
pass over the git branch (i.e "master" or "2.3-stable").
buildmsg-server will forward this to all subscribers.

The building servers will run buildmsg-subscriber's which connects to
buildmsg-server and subscribes to a "branch". Whenever a message
arrives it starts building.

With zeromq and lua this is all very simple. I have pushed example code
to http://git.alpinelinux.org/cgit/autobuilder/

(I added some deamonization code for buildmsg-server but i think that
maybe its better if start-stop-daemon handles that together with
pidfile creation and stdin/out/err redirection etc)

Feedback is welcome.

Thanks!

-nc

[1] http://www.zeromq.org/


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Jesse Young
Details
Message ID
<20111122191018.2df62a73@telperion.jlyo.org>
In-Reply-To
<20111122165940.6c0e0371@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1322010618
DKIM signature
missing
Download raw message
On Tue, 22 Nov 2011 16:59:40 +0100
Natanael Copa <ncopa@alpinelinux.org> wrote:

> Hi,
>
> Our current messaging between git server and buildservers goes via
> public IRC and has not been 100% reliable.
>
> So I have been looking at replacing it with a zeromq[1] based infra.
>
> The idea is that we have a buildmsg-server that listens on 2 ports,
> one for subscribers and one for git push notifications.

I'm not familiar with the build system, and only minimally familiar with
zmq, so ignore me if I'm totally off base.

The way I understand how zmq subscription sockets work is that
clients will miss notifications if they get disconnected for whatever
reason. So a mechanisim should be in place to replay notifications
that the client may have missed. Maybe this is the non-reliability
you're experiencing with IRC as well?

Jesse


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20111123080924.11e3e72b@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<20111122191018.2df62a73@telperion.jlyo.org> (view parent)
Sender timestamp
1322032164
DKIM signature
missing
Download raw message
On Tue, 22 Nov 2011 19:10:18 -0600
Jesse Young <jlyo@jlyo.org> wrote:

> On Tue, 22 Nov 2011 16:59:40 +0100
> Natanael Copa <ncopa@alpinelinux.org> wrote:
> 
> > Hi,
> >
> > Our current messaging between git server and buildservers goes via
> > public IRC and has not been 100% reliable.
> >
> > So I have been looking at replacing it with a zeromq[1] based infra.
> >
> > The idea is that we have a buildmsg-server that listens on 2 ports,
> > one for subscribers and one for git push notifications.
> 
> I'm not familiar with the build system, and only minimally familiar
> with zmq, so ignore me if I'm totally off base.
> 
> The way I understand how zmq subscription sockets work is that
> clients will miss notifications if they get disconnected for whatever
> reason. So a mechanisim should be in place to replay notifications
> that the client may have missed.

It is not really a big problem since what the build server does
when it gets it notification is pull from git and build all that has
been changed (or more precise, build everything that is missing). In
other words it will pick up everything it has missed while it was
offline.

zeromq is pretty nice in that way, that if the subscriber start up
before the publisher, it will auto connect whenever the publishing
server (buildmsg-server) server comes up.

If the buildmsg-server goes down people who does a git push will notice
it since the git notification will block til server comes back up again.

> Maybe this is the non-reliability
> you're experiencing with IRC as well?

Not really. I think the build bot does not handle all kinds of stuff
that might happen with a public IRC server. (irc server goes offline,
comes back, you get kicked from the channel etc etc).

The problem is that we don't have control over the messaging server
which currently is Freenode.

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---