• 0 Posts
  • 190 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle

  • Concerning logs:

    1. You can still log to text if you want by configuration (e.g. forward stuff to syslog) and you can use any tools you like to read those files you want. So if you like text logs you can get them. You can even invoke journalctl to output logs on an ad hoc / scheduled basis in a variety of text formats and delimited fields.
    2. Binary allows structured logging (i.e. each log message is comprised of fields in a record), indexing and searching options that makes searches & queries faster. Just like in a database. e.g. if you want to search by date range, or a particular user then it’s easy and fast.
    3. Binary also allows the log to be signed & immutable to prevent tampering, allow auditing, intrusion detection etc… e.g. if someone broke into a system they could not delete records without it being obvious.
    4. You can also use splunk with systemd.

    So people object to systemd writing binary logs and yet they can get text, or throw it into splunk or do whatever they like. The purpose of the binary is make security, auditing and forensics better than it is for text.

    As for scripts, the point I’m making is systemd didn’t supplant sysvinit, it supplanted upstart. Upstart recognized that writing massive scripts to start/stop/restart a process was stupid and chose an event driven model for running stuff in a more declarative way. Basically upstart used a job system that was triggered by an event, e.g. the runlevel changes, so execute a job that might be to kick off a process. Systemd chose a dependency based model for starting stuff. It seems like dists preferred the latter and moved over to it. Solaris has smf which serves a similar purpose as systemd.

    So systemd is declarative - you describe a unit in a .service file - the process to start, the user id to run it with, what other units it depends on etc. and allow the system to figure out how to launch it and take care of other issues. It means stuff happens in the right order and in parallel if it can be. It’s fairly simple to write a unit file as opposed to a script. But if you needed to invoke a script you could do that too - write a unit file that invokes the script. You could even take a pre-existing init script and write a .service file that kicks it off.


  • arc@lemm.eetolinuxmemes@lemmy.worldSystemd controversy be like
    link
    fedilink
    arrow-up
    27
    arrow-down
    1
    ·
    edit-2
    4 months ago

    Kind of sad there are still people raging over systemd. When it flares up in discussions there is the usual debunked nonsense:

    • it only logs information to binary and this is somehow bad. Except it it can be configured to log to text as well and it uses binary so it can forward secure sign records to prevent tampering as well as offering database style query operations.
    • it’s insecure because the repo has millions of lines of code. Except that they compile into hundreds of small binaries running with least privilege, and often replacing the task of far more dangerous processes (e.g. there is an NTP client in systemd which sets the time and nothing else).
    • various rants about the primary author

    What is more bizarre is the nostalgia and hearkening back to sysvinit scripts when systemd didn’t replace sysvinit! Systemd replaced upstart which replaced sysvinit. Because writing 100s of lines of script to stop/start/restart a process sucked - insecure, slow, didn’t scale, didn’t capture dependencies and everyone knew it. Upstart was the first attempt to solve the issue and was used in Debian / Ubuntu, Fedora / Red Hat, openSUSE and others until systemd came along.



  • Yuzu gave them the opening to sue though. If they had been more circumspect - “Oh this is to develop homebrew / indie games nudge nudge” then maybe Nintendo wouldn’t have unleashed the lawyers or done so ineffectively. After all it wouldn’t be Yuzu’s fault if some wicked website corrupted their pure intentions by releasing device keys or patches that allowed their emulator run commercial games. But they were more blatant than that.

    Also from an empathic perspective, of course Nintendo were going to sue. Yuzu should have known they would since that’s what console platforms do when something interferes with their profits. Yuzu is doubly bad since it interferes with hardware sales and game sales unlike custom firmware / cartridges which only affect game sales.

    Of course the genie is already out of the bottle. Yuzu’s source code and binaries were on github for anyone to clone / fork. All the games are out in the wild. The piracy will carry on. I think it’s fair to say the NSP is effectively dead as a platform at this point. If a NSP2 turns up this year, as rumored, then I expect it will have revised anti-piracy measures and potentially a heavy online service aspect to go with it - it’s far easier to detect pirates and wield the banhammer when a device is online.


  • The problem is, that most languages have no native support other than 32 or 64 bit floats and some representations on the wire don’t either. And most underlying processors don’t have arbitrary precision support either.

    So either you choose speed and sacrifice precision, or you choose precision and sacrifice speed. The architecture might not support arbitrary precision but most languages have a bignum/bigdecimal library that will do it more slowly. It might be necessary to marshal or store those values in databases or over the wire in whatever hacky way necessary (e.g. encapsulating values in a string).


  • We had tens of thousands of lines in our rake files to build a bunch of targets, none of which were even Ruby. I think if I needed to build another complex build system that was a directed acyclic graph I think I’d use Gradle, for a several reasons - we had some Java targets so we save on an additional developer runtime, it would run faster & Gradle is more mainstream and easy to get various plugins & documentation for.


  • It probably wasn’t a big deal when it was a niche project until Twitter imploded. Then all the public instances got overloaded with new users and the limits became obvious.

    A better design is Lemmy which is written in Rust so it has far more scalability. It’s compiled and because it’s tokio / actix based, it can also do a lot more stuff asynchronously so it’s not spawning thousands of threads to cope with concurrent requests.


  • There is a lot of magic in Java. Try Spring Boot for example, and things magically connect together with annotations, or somehow methods get injected onto interface on the fly, or an http interface maps onto a function with parameters because the runtime is doing it. This is most evident when you set a break point in some class and there might be 4 or 5 mystery functions it passed through between it and where you thought it was calling from. Sl4j, Lombok, Hibernate are doing the same kind of thing.


  • I wrote extensively in Ruby but for Rake - using Ruby as a build system. Can’t say I liked the language although it was okay for how we used it. We have 20 sub projects with some very complex build targets and dependency scanning going on and the Rake syntax was okay. Personally I think its biggest shortcoming was the documentation was very poor and stuff like gems felt primitive compared to other package management systems. One thing I liked from the language was blocks could evaluate to a value which I really use a lot in Rust too.

    I think if I were doing an acyclic dependency build system these days I’d use Gradle probably.

    As for Rails I expect failed to catch on because even compared to Python, Ruby is a slow language. And Python isn’t fast by any stretch. Projects that started with Rails hit the performance brick wall and moved to something else.


  • I wait for “try prime for 30 days” offers. I’ll sign up for it, instantly cancel it to prevent recurring bills, and then order whatever it was I was thinking of over the last six months. Because once upon a time I’d be on Amazon all the time, browsing this and that, but it has become such a cesspool that I infrequently bother. If I wanted to wade through a sea of Chinese OEM crap and counterfeit products, then I might as well use Aliexpress and be done with it.



  • Doesn’t sound like this system is safety critical. You should be more worried if some hacker can change train signs from stop to go. If you ever ride on a train and see steel boxes by the side of the track, those are control systems and they run up and down the line. They might be locked, or possibly alarmed but that’s about the extent of their protection. A simple attack would be to just take an axe to one, or set fire to it. A more sophisticated attack could snoop on the profinet traffic and do something evil.



  • It really depends if these systems (that appear to control arrival boards) are on a network or not. If they’re not, then there is minimal risk to leave them the way they are. Somebody would need physical access to the devices to do harm. If they are on a network then that’s a pretty big deal, but some attacks could be mitigated against by tunnelling and/or additional packet filtering to ensure the integrity of messages.

    Continuing on a railway theme you should be FAR more worried all the devices that run up and down the side of railway lines - PLCs that talk with each other and operations centres to control things like lights, junctions, crossings etc. If they’re more than 5 years old then chances are then all that traffic is in the clear, and because these things live in boxes by the railway line, it wouldn’t take much to break into a network and potentially kill people by running two trains into each other.




  • arc@lemm.eetotumblr@lemmy.worldEnough IS enough
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    5 months ago

    While I think there are limits to how much money anybody can reasonably spend, if someone works hard and makes money legally and ethically by virtue of their efforts then that’s their own business. It’s different of course if they made their money through crime or exploitation, and it’s easy to think of examples, but that isn’t the case for most people.

    Also, if people perceive inequity then the answer is progressive taxation and other forms of financial remuneration to the state which can be dispersed as they see fit. If billionaires were hit with super taxes then they’d still be billionaires but it would pay for services that would raise the quality of life for everyone else.