new archiver

10 views
Skip to first unread message

Kumar McMillan

unread,
Jan 20, 2015, 6:18:26 PM1/20/15
to chir...@googlegroups.com
Hey folks! If anyone is looking for a project, it would be good to replace the service CHIRP runs in-house (i.e. on a linux machine in the broadcast studio closet) to archive the stream. This is pretty crucial as it captures the history of CHIRP radio, minute for minute, and has done so since the dawn of the CHIRP epoch.

The current service is here: https://github.com/chirpradio/chirpradio-machine Specifically: https://github.com/chirpradio/chirpradio-machine/blob/master/chirp/stream/archiver.py

It runs pretty well so it's not urgent to replace but there have been some hiccups in the Prostreamer (our hardware broadcaster) where the archiver has not reconnected to the stream. It's not clear why because it's not very verbose when encountering errors.

I heard someone talk about Go on the list and I think that would be a good fit for the project since it needs to maintain a solid connection to the stream while chopping files every hour in the background. Python does not have good support for concurrency like this.

What does the archiver do? All it does is connect directly by IP to the Prostreamer (we turned on a setting to allow this) and it writes a raw mp3 file to our RAID array which is rotated every hour. That is, no file is longer than an hour. It also does some basic MP3 tagging but this could be improved and could possibly connect to the track API: https://code.google.com/p/chirpradio/wiki/TheChirpApi

I am available to review code on this and help get it tested / deployed.

Kumar

Kumar McMillan

unread,
Sep 28, 2015, 5:23:25 PM9/28/15
to chir...@googlegroups.com, Chris Agocs
Hi! I wanted to dive deeper into Go and the archiver seems like a perfect fit so I built a new archiver in Go :) https://github.com/chirpradio/chirpradio-archiver/

Could anyone who is familiar with Go take a look at the code and let me know if there are any obvious problems? Chris, I think you've done quite a bit of Go so maybe you have some time to look? Here are some ares that I'm looking for feedback:

- This will be a long-running process. Are there any chances for memory leakage or other disasters?
- Is there something more Go-like that I should be doing?
- Just any general feedback.

It's been running on my machine for about a week and I fixed a few bugs. It is mostly running smooth but I will also ask some DJs to help listen to the files to check for errors.

I also filed some issues for more features it needs in case anyone would like to help out: https://github.com/chirpradio/chirpradio-archiver/issues

-Kumar

Chris Agocs

unread,
Sep 28, 2015, 6:00:03 PM9/28/15
to chir...@googlegroups.com
Hey Kumar,
I haven't had a lot of time to dig into the archiver, but this jumped out at me:

Why did you choose to roll your own logger? https://golang.org/pkg/log/ exposes about the same functionality, or (to plug the company I work for), there are logging libraries like this: https://github.com/DramaFever/go-logging

I'll see if I can find the time to dig into some of the issues.

-Chris



--
--
--------------------------------------------------
Project page: http://code.google.com/p/chirpradio/
--------------------------------------------------
You received this message because you are subscribed to the Google
Groups "ChirpDev" group.
To post to this group, send email to chir...@googlegroups.com
To unsubscribe from this group, send email to
chirpdev+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/chirpdev?hl=en

---
You received this message because you are subscribed to the Google Groups "ChirpDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chirpdev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kumar McMillan

unread,
Sep 29, 2015, 12:16:20 PM9/29/15
to chir...@googlegroups.com
On Mon, Sep 28, 2015 at 5:00 PM Chris Agocs <ch...@agocs.org> wrote:
Hey Kumar,
I haven't had a lot of time to dig into the archiver, but this jumped out at me:

Why did you choose to roll your own logger? https://golang.org/pkg/log/ exposes about the same functionality

oh cool, I'll check it out. That looks like it will come in handy to quiet down the logging with a command line switch (something I'd like).
 
, or (to plug the company I work for), there are logging libraries like this: https://github.com/DramaFever/go-logging

Does it have any documentation for usage?

Chris Agocs

unread,
Sep 29, 2015, 12:53:02 PM9/29/15
to chir...@googlegroups.com
https://godoc.org/github.com/DramaFever/go-logging is pretty decent, but I'll see if I can get some examples into the README.md and commit that today.
Reply all
Reply to author
Forward
0 new messages