Throwaway Protocol: For Your Information I read this recently, and found the idea interesting: https://deanebarker.net/tech/blog/let-me-know/ In sum, a protocol for informing one that an event has occurred would be useful. I focussed most on the author's first example, when a series of articles are released and one wishes to know about that next entry. I've been intending to design throwaway protocols lately, and decided to create one for this purpose, without all of the disgusting fat commonly seen crushing the organs of such protocols. I added categories to my website and Gopher hole in preparation for this article. The form of a tag is its category's name followed by a space and the decimal number giving its position in the series. The indices of each category on my website include such numbers, so that a reader may anticipate the forms of future newest entries, and enter them into a client if he desired, which would surprise me. The protocol couldn't be far simpler: A client sends a UDP packet containing the tag, and the server replies with the tag if the event has occurred or an empty packet otherwise. I oft-times see people bemoaning ``packet amplification'' with UDP, and so note that this protocol is a packet deamplifier. It's rather pleasant to use the empty packet for some purpose; I loathe when protocols unnecessarily flavour things, and see the empty packet as negative acknowledgment to be about as plain as it gets. The Internet currently suffers under a disease of encryption. Every protocol is expected to have an encrypted version, typically using TLS and the certificate authority cartel joining that of the DNS. It's a waste of mental power to solve this problem of strangers meeting securely like this, as third parties make the problem worse, and the underlying network should handle encryption rather than glut every overlying protocol. Authenticity is generally more important than confidentiality, so perhaps IPsec can be used to secure this protocol, to any lunatic who feigns concern for such worthlessness. I call my protocol ``For Your Information'', or FYI, and its chosen port is 411. The implementation in Ada is very simple, putting all tags into a trie and searching it upon request. This way imposes no form on such tags; a more complex implementation would use a trie merely to hold the names of the categories, with an integer counter stored, but I doubt any complex implementations will need to be. The simple client written in sh suffices for its purpose, but is lackluster compared to what may be. It allows four parameters: the tag, the address, an optional port, and an optional timeout duration. This client is intended to be used by cron, not that I use cron nor know I another soul who uses it. I see a minor issue in my simple protocol, from its use of the empty packet, with a similarly simple solution: The empty packet necessarily identifies no particular request, so a simple client asking a server multiple questions should wait some time between asking them in series; slightly more complex clients could use multiple UDP system resources, so that each would have a different destination and so become distinguishable. In reality this is no issue whatsoever, but is worth noting nonetheless. The server takes three parameters: the file from which to read tags delimited by some character, the port to use, and the character to act as delimiter. I'm quite delighted with this third parameter's implementation, as it takes a single character directly or uses the Character'Value attribute on the parameter otherwise; the asinine design of certain systems means that zeroeth character, null, can't be passed directly, but this elegantly avoids the issue, for Ada was made by men who weren't stupid. In an ideal such system, no delimiter would be necessary, but that requires a language with a better interactive environment than Ada, such as Common Lisp. The only other issue with this design is its dependence on choosing some character for the delimiter, but in practice the zeroeth character works just as well as one of the four separator characters ASCII uses for the exact purpose, or any other. The Ada server is wholly intolerant to errors in tag ingestion, and will kill the program from them. The following two example lines show UNIX sh commands which can be used to launch the server and the client. The server uses the zeroeth character as a tag separator, and the client waits two seconds: fyi tags 411 NUL # The server and client share the single name. fyi 'throwaway protocol 1' verisimilitudes.net 411 2s # This article is the first with the tag here. It's fun to design a simple protocol that creates the simplest possible interface to some behaviour. .