-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I used to write a lot of telnet/ssh games back in the day. Telnet has a bunch of command codes as part of its protocol. Each command starts with an IAC code. This code could be anywhere within the stream of bytes coming from the end-users terminal. IAC is \x01b\x0ff\x0ff. The fun part of implementing text-based network protocols is you must scan, byte for byte, until you reach a \n or whatever your line-feed is. As you are processing the stream, if you come across an escape, you must branch off into the command processing loop instead of the input processing loop. Likewise, responses to these commands can come AT ANY TIME. Mid sentence from a user? Yup. Randomly as you are sending your buffer? Probably. Full-Duplex mode with ACK? Not a guarantee.
When developing terminal services, you're standing on the shoulders of giants and must account for 30+ years of terminal hackery. The up-side is you can also use that same terminal hackery for fun things like progress bars, emoji's, colors, blinking (ux faux paux) for attention, spinners, tables, and yes - even matrix rain effect by positioning cursors and clearing partial screen coords. [1]
[1] https://github.com/gabereiser/go-rain
Ansi escape codes are fun tho! My favorite so far's been finding a way to [scroll the screen up or down by one line](https://github.com/9001/r0c/blob/master/r0c/ivt100.py#L1651-...) in a way that works on as many terminal emulators as possible - the spec says how to do it, but most actual terminals don't implement it correctly.
Another fun one was [asking the terminal how big it is](https://github.com/9001/r0c/blob/master/r0c/ivt100.py#L625-L...) (and also figuring out the modem speed as a side effect) -- especially when a major telnet client fails as soon as the width is [above 256 characters](https://github.com/9001/r0c/commit/5e7d64d7f81cab3350259b0cd...)...
Both of these would have been simple if the terminal is a local one, but the fun part is dealing with an unknown implementation at the other end of tcp - and the fact that that's even possible :-)