[Linux-aus] Suggestions for best approach/language for this scenario

Daniel Bryan danbryan at gmail.com
Thu Jun 5 13:06:46 EST 2014


I suggest Go [1] as the implementation language.

Advantages it has a new language:

* garbage collection
* simple, familiar syntax and semantics
* a large, well-documented standard library [2]
* an interactive tour for learning the language [3]
* an active and helpful community

Reasons I think it's good for your project:

* lightweight coroutines ("goroutines") providing language-level support
for multi-threading - much simpler and more natural than writing threaded
code in (for example) Python and C
* a very good socket API
* a solid HTTP client API (for submitting your RESTful requests)

I've been using Go professionally for about two years now and it's
drastically simplified a number of networked projects that I've worked on.

Happy to discuss more off list if you have more questions about it.

[1] http://golang.org
[2] http://golang.org/pkg/
[3] http://golang.org/pkg/

On Wed, Jun 4, 2014 at 10:09 AM, Avi Miller <avi.miller at gmail.com> wrote:

> Hey LUV’rs and LA'rs,
> I volunteer for a community/NFP radio station here in Melbourne. We’re
> currently deploying a new radio automation system, as well as replacing our
> existing online streaming services.
> The radio automation system that has a TCP service running on a particular
> port. Whenever a play event fires in the studio, the automation system
> sends out the data to anything listening on that port. I have control over
> what the automation system sends.
> What I need to do is write an intermediate daemon that connects to the
> upstream automation system looking for song events (which has an associated
> duration field) and presents a similar interface to the stream publisher.
> This is because we don’t use the automation system for every show, so
> after the event duration expires I want my intermediate system to send
> currently airing show information instead. This way, the client-side
> streaming apps will either see information about the song currently being
> played, or if automation is not active, information about the show
> currently on air.
> As an added bonus, I’d like the intermediate daemon to also submit RESTful
> API requests to a web service online.
> So, it looks vaguely like this:
> [Stream publisher] ==> [Intermediate daemon] ==> [Automation system]
>                                              ==REST=> [web service]
> I suspect I’ll need a multi-threaded application, with one thread to
> listen for events from the automation system and two more to send events to
> the stream publisher and the RESTful service. Given that the majority of my
> programming experience is in PHP, I’m going to have to learn something new
> for this.
> So, I’m looking for suggestions on the programming language and/or tools
> that would be well-suited for this task. Alternatively, if there is already
> something that could do this (or be munged to do this), I’m all ears.
> Thanks,
> Avi
> _______________________________________________
> linux-aus mailing list
> linux-aus at lists.linux.org.au
> http://lists.linux.org.au/listinfo/linux-aus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/linux-aus/attachments/20140605/fa05e806/attachment.htm 

More information about the linux-aus mailing list