[ale] Cross platform notification

Alex Carver agcarver+ale at acarver.net
Sat Jan 11 17:19:59 EST 2014


Well I don't care about the receivers receiving in bash.  I'm fine with
using premade programs especially since it's multiple platforms
(Android, OSX, Windows, Linux) and trying to make toaster-style alerts
pop up on the screen goes beyond a bash script anyway.

What I do want is an immediate notification.  When the message is
transmitted, the receiver lights up.  What I don't want is polling
(burning my battery on Android for example) and I absolutely do NOT want
to go outside of the local network so Dropbox and Google are out.  All
the communication has to stay inside the LAN.  That's why I was looking
at push method like Growl.  The receivers are just programs waiting for
a data packet.  The senders just push a packet directly to a receiver,
no middle server.  Once a packet shows up at the receiver, they show the
message.  That's all I need.  The specifics of showing that message in a
GUI depend entirely on the OS itself (on Windows and OSX it'll probably
be a toaster popup in the corner of the screen, on X11 it might be
something similar or perhaps a biff, on Android it's a notification in
the notification bar) so leaving that task to a third-party receiver
program is fine with me.

The only bash component here is whatever happens to be *sending* the
message.  Some of the devices that would be sending notifications are
running embedded OSes and I can't just load any library (if it even
exists) or make monster programs (think OpenWRT on a Linksys with only 8
MB of storage).  But I can write very simple shell scripts and transmit
data out via things like tcpconnect or netcat which I do have available
on the embedded systems.

I read over the XMPP documents but it appears that requires installing a
central server to handle all subscriptions and communication.  I can't
push a message direct to an endpoint, I have to push it to a server
subscription node for it to be sent to other devices.  Looks like Growl
is probably my best bet for now.

On 1/11/2014 13:56, Bruno Bronosky wrote:
> To me the most important thing to understand is how immediate you want
> these notifications to be received. Rather than requiring that a daemon be
> ready to receive when the message is sent, I'd lean more toward a
> publishing system or standard. Google pubsubhubbub. Alternately, I might
> use a web server or Dropbox to host a gpg encrypted formatted text file and
> have the machines and devices poll it and append to it as need. And yes,
> I'd do it all in bash.
> On Jan 10, 2014 11:53 PM, "Alex Carver" <agcarver+ale at acarver.net> wrote:
> 
>> On 1/10/2014 16:50, Pete Hardie wrote:
>>> XMPP is a fairly widespread protocol, and libraries exist for the
>>> sending end to hook into for most languages
>>
>> Most languages but if it's able to be used by bash then I'll consider
>> it.  Not every transmitter is going to be a fully compiled program.  I
>> really do want to occasionally set up a simple bash script that fires
>> off a preformatted text file at the destination receiver.  I have
>> already tested that with Growl, simple text file with the GNTP headers
>> as per the protocol spec, transmit with netcat and notifications pop up
>> on the receivers.  No libraries needed.
>>
>>
>>>
>>> On Fri, Jan 10, 2014 at 7:02 PM, JD <jdp at algoloma.com> wrote:
>>>> On 01/10/2014 06:16 PM, Alex Carver wrote:
>>>>> I was looking into notification methods that I could use for one of my
>>>>> projects to send quick messages to multiple machines (pretty much every
>>>>> desktop or mobile platform currently in use) on my local network.  I
>> see
>>>>> Growl seems to be available for nearly every platform and seems to be a
>>>>> fairly simple protocol.  I just wanted to solicit opinions on this kind
>>>>> of notification method.  The originating computer is going to be one of
>>>>> the Linux machines and I've been experimenting with sending by bash
>>>>> script which is nice, simple, and requires no libraries, just netcat.
>>  I
>>>>> might later write up a small transmitter in C but I think bash will
>>>>> probably work well for now.
>>>>
>>>> Netcat is a HUGE!!!!!!! security risk. I wouldn't ever use it beyond
>> POC and
>>>> only on an air-gapped lab network.
>>>>
>>>> What sort of notifications?  Desktops, system to system, system to
>> specific
>>>> client?  system to any normal web-client?
>>>> Any chance this will every be wanted over the internet in the future?
>>>>
>>>> And ... isn't growl commercial?  What is the fallback if it isn't
>> available?
>>>> What about non-GUI client machines?
>>>>
>>>> Is polling an option? If so, you could setup a REST web interface on a
>> central
>>>> box that clients can push and pull from. REST means it is trivial to
>> make a
>>>> client via a bash+curl script.
>>>>
>>>> XMMP? More effort to use (only slightly), but extremely flexible.
>>>>
>>>> Or place the messages into a file that every client has read access
>> from. KISS
>>>> does work after all.
>>>>
>>>> What are the authentication needs?
>>>>
>>>> What are the encryption needs? Anything sensitive involved .. even in
>> the future?
>>>>
>>>> _______________________________________________
>>>> Ale mailing list
>>>> Ale at ale.org
>>>> http://mail.ale.org/mailman/listinfo/ale
>>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>>> http://mail.ale.org/mailman/listinfo
>>>
>>>
>>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
> 
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
> 



More information about the Ale mailing list