News for hackers. Stuff that matters.
Re:Japanese textile factory still uses tape cassette and pun... by oxfordmale on Monday July 10, 2023 @04:28AM (#36663517)
But surely this needs to be upgraded to run on a cloud hosted Kubernetes instance? With Karpenter to dynamically scale up an down resources as needed? Supported by a ten people Infosec/SRE team
Re:Japanese textile factory still uses tape cassette and pun... by yard2010 on Monday July 10, 2023 @04:47AM (#36663623)
Don't forget rewriting the code in Rust because it's faster and type safe! Or nodejs with typescript because it's type safe
Re:Japanese textile factory still uses tape cassette and pun... by masswerk on Monday July 10, 2023 @06:19AM (#36664244)
Arguably, 8-bit BASIC is type-safe, as well. :-)
Re:Japanese textile factory still uses tape cassette and pun... by patates on Monday July 10, 2023 @07:51AM (#36665049)
Totally non-opinionated tried and tested fact that all humanity knows: Anything that doesn't have discriminated unions cannot be used productively.
Re:Japanese textile factory still uses tape cassette and pun... by kayodelycaon on Monday July 10, 2023 @11:27AM (#36667833)
Excellent choice of term.

I've been a full-stack web developer for over a decade across multiple companies and this is the first time I've seen the phrase "discriminated unions".

And the wikipedia article is horrendous. It starts with the following sentence and gets worse from there.

> In computer science, a tagged union, also called a variant, variant record, choice type, discriminated union, disjoint union, sum type or coproduct, is a data structure used to hold a value that could take on several different, but fixed, types.

It uses lots and lots of words to explain something that's very simple. If you don't already know what it is, you can't figure out which words are important.

Then after all of the theory, it dives into a binary tree example which has to be the worst possible way to explain it. If you haven't implemented a binary tree before, you don't know any idea what you're looking at. It didn't help that I implemented a linked list in college.

Also, the choice of language ensures you have no idea what the types are. I completely missed the first example was self-referential.

It's like parody of a function programmer writing an explanation for anyone who isn't a functional programmer.

Re:Japanese textile factory still uses tape cassette and pun... by agentultra on Monday July 10, 2023 @12:17PM (#36668499)
"Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it." -- Djikstra.

I've been programming in some form or another since the late-80s. I've been paid to write code for other people for over twenty years. I haven't gone to university.

Maybe it's because I started back in BASIC, assembler, and later C that I know what that term is and have encountered it in various languages and forms several times since?

The problem with wikipedia definitions is that they have to be the definition. Some one like me would expect a link to the definition and not a tutorial. They're not written to take into account that you've been a professional programmer and have never been exposed to a computer science curriculum nor are they written for laypersons who don't know anything about programming.

It's a similar problem for functional programmers trying to explain functors, monoids, and monads: these are not terribly complicated abstractions but catering your explanation to the various audiences out there is incredibly difficult. The definitions sounds like gibberish... but with effort and education it is possible to understand and appreciate it.

Re:Japanese textile factory still uses tape cassette and pun... by TedDoesntTalk on Monday July 10, 2023 @01:35PM (#36669848)
You could edit the wiki page.
Re:Japanese textile factory still uses tape cassette and pun... by bentcorner on Monday July 10, 2023 @12:09PM (#36668385)
Care the elaborate? I'm not challenging you I'd just like to learn more. I recently transitioned from writing C++ to Typescript and probably haven't fully grokked the TS way.
Re:Japanese textile factory still uses tape cassette and pun... by patates on Tuesday July 11, 2023 @01:03AM (#36676597)
Oh, I'm so sorry, I was being (or trying to be) sarcastic. However, if you are curious, here is a deep dive:

https://basarat.gitbook.io/typescript/type-system/discrimina...

I'm sincerely sorry for confusing you! Discriminated unions are nice but above I was exaggerating excessively to make a point :)

Re:Japanese textile factory still uses tape cassette and pun... by bentcorner on Tuesday July 11, 2023 @11:39AM (#36682528)
Hahaha no problem thanks for clarifying :)
Re:Japanese textile factory still uses tape cassette and pun... by bitwize on Monday July 10, 2023 @04:45PM (#36672713)

    10 DEFINT A-Z
Re:Japanese textile factory still uses tape cassette and pun... by rewmie on Monday July 10, 2023 @08:33AM (#36665398)
> Don't forget rewriting the code in Rust because it's faster and type safe!

I also enjoy piling on Rust fanboys,but those of us who had to go through late night troubleshooting sessions to track issues that were ultimately caused by use-after-free issues do tend to be vulnerable to Rust's memory safety siren's song

Re:Japanese textile factory still uses tape cassette and pun... by CodeSgt on Monday July 10, 2023 @11:26AM (#36667817)
Typescript is one of the few additional layers of complexity that I truly feel is usually worth it. The exceptions being: a) if you have a complete or near-complete system that functions as intended with no major changes planned for the foreseeable future. And b) the system you’re writing is small, fairly self-contained, and the team isn’t already familiar with Typescript.

In any other situation I firmly believe the benefits Typescript brings very quickly outweigh the small amount of added complexity.

Re:Japanese textile factory still uses tape cassette and pun... by masswerk on Monday July 10, 2023 @05:07AM (#36663793)
Also, it's really unfair to the ransomeware folks! They need to make a living, too!

(But this may be addressed by a more cooperative attitude, compare: https://www.masswerk.at/pet/?prg=wannapet&clr=white or https://www.masswerk.at/pet/?prg=petrabbit&clr=white)

Re:Japanese textile factory still uses tape cassette and pun... by throw_5202 on Monday July 10, 2023 @05:13AM (#36663834)
It's so frustrating to talk to Kubernetes enthusiasts.

enthusiast: if you'll migrate service X from a small sets of VMs to K8s cluster (which will take N man-moths because of reasons) it will auto-scale

Old grumpy man: but the the load is low and predictable we don't need autoscale and if load will grow we will just create two more VMs

enthusiast: auto-scaling will save time in the distant and unlikely future and CTO agrees that K8s is the best way to run software so you have to migrate anyway

Re:Japanese textile factory still uses tape cassette and pun... by seper8 on Monday July 10, 2023 @05:45AM (#36664033)
create two more vms? just give it some more cores/ram/network/disks...
Re:Japanese textile factory still uses tape cassette and pun... by NikolaNovak on Monday July 10, 2023 @07:25AM (#36664835)
We are running a busy self service ERP for growing 400k employees, on a single database instance for 7 years now. Currently at 256gb ram, 8tb database, 32 P9 cores. I got 99 problems but the single database server ain't one of them!
Re:Japanese textile factory still uses tape cassette and pun... by giovannibonetti on Monday July 10, 2023 @08:51AM (#36665605)
Parent was probably talking about the application server, which is the typical example of K8s usage, whereas most databases don't fit well there and are usually separate from the K8s cluster.
Re:Japanese textile factory still uses tape cassette and pun... by benglish11 on Monday July 10, 2023 @10:23AM (#36666904)
Yeah. They must be. I’ve had several k8s enthusiast dissuade from putting a db in k8s for performance reasons. This may change overtime but I believe there is a performance bottleneck in disk I/o (or at least that’s how it was explained to me)
Re:Japanese textile factory still uses tape cassette and pun... by mschuster91 on Monday July 10, 2023 @10:39AM (#36667138)
That really depends on your k8s environment. If you're running on bare metal and use host bind mounts for storage, you won't have a problem. But as soon as you introduce shared storage it gets messy...
Re:Japanese textile factory still uses tape cassette and pun... by tjoff on Monday July 10, 2023 @11:12AM (#36667599)
Doesn't that defeat the promise of k8 in the first place?

Because then it won't scale.

And the moment you do you run into other bottlenecks.

Re:Japanese textile factory still uses tape cassette and pun... by mschuster91 on Monday July 10, 2023 @12:14PM (#36668470)
Meh, not having to worry about configuring load balancers and letsencrypt alone is worth the effort to get k8s running.
Re:Japanese textile factory still uses tape cassette and pun... by Mister_Snuggles on Monday July 10, 2023 @12:41PM (#36668906)
We've just migrated our ERP from a regular deployment on VMs into Kubernetes. We have a very bursty self-service component, so being able to scale up easily for the week we need it is quite nice. We've taken advantage of this ability multiple times and seen great success each time.

We're not running the DB in Kubernetes though.

Re:Japanese textile factory still uses tape cassette and pun... by mysterydip on Monday July 10, 2023 @01:44PM (#36670038)
Just curious, what backup/replication/disaster recovery solution(s) are you running with that?
Re:Japanese textile factory still uses tape cassette and pun... by NikolaNovak on Monday July 10, 2023 @02:49PM (#36671159)
Used to run Tivoli Storage Manager, now Commvault. Backup can be used for certain type of issues that are isolated to the database.

For DR, Entire stack is being continually synced with a set of hot server in separate datacentre. We run a fully DR exercise yearly and it works well. It's a fairly proprietary AIX / DB2 method though so not sure you'd find value unless you're using the exact same technology stack :-/

Re:Japanese textile factory still uses tape cassette and pun... by rewmie on Monday July 10, 2023 @08:25AM (#36665331)
> Old grumpy man: but the the load is low and predictable we don't need autoscale and if load will grow we will just create two more VMs

That's perfectly ok, if your deployment costs are irrelevant and/or your company gladly pays up your infrastructure costs without a second thought.

This is not the case in some organizations, and toggling a setting to auto scale a deployment can automatically save you thousands of dollars per month.

Would you still be so casual about infrastructure costs if you had to bankroll the extra capacity you need to add to your baseline to support peaks?

The decision process involved in managing your single-box deployment is not the same that goes in managing global deployments with dozens of instances per region. Cloud providers charge a premium, and that premium is a lot.

It's like the thermostat in your office. If you're just running an AC in a single room then you can just set it to full blast to keep it day and night at a certain temperature. Once there's a decision to cut costs then you start to talk about the best time to turn off/turn on a AC unit.

Re:Japanese textile factory still uses tape cassette and pun... by yjftsjthsd-h on Monday July 10, 2023 @10:49AM (#36667281)
Their entire point was that their load was static, and you've immediately started talking about how it changes constantly.
Re:Japanese textile factory still uses tape cassette and pun... by perryizgr8 on Monday July 10, 2023 @10:37AM (#36667104)
VM deployment has a drawback though. If the machine runs out of memory, it will lock up (at least that's my experience with EC2). And then you need to set up some sort of health checks and auto scaling (!) for EC2 based on those health checks. This is much more cumbersome and fragile than just containerising the app and setting it up in a k8s cluster which will automatically take care of this scenario.

Also, deploying a new build on VMs is extremely manual compared to k8s, unless again you set up some sort of home brew rube Goldberg machine to auto deploy. It's just way better to use k8s in tandem with a simple GA workflow.

Re:Japanese textile factory still uses tape cassette and pun... by stephenhuey on Monday July 10, 2023 @11:27AM (#36667829)
I think grumpy old man knows about the drawbacks with VMs, but grumpy old man also knows that for his particular service k8s has drawbacks. Grumpy old man is thinking that if his particular service goes down, some users just tell him it's not working and it's not a huge problem like people are losing $10 million per hour because of it. And in the event that happens sometime in the next 23 months (if it happens at all) he'll just do that little manual process for a couple more VMs, and that's all the time he'll spend on it. Contrast that with the time it would take to get it ready for k8s and keep someone around who understands k8s well enough to take care of it, even though their need for it might be so low.
Re:Japanese textile factory still uses tape cassette and pun... by ChainOfFools on Monday July 10, 2023 @03:14PM (#36671485)
And grumpy old man also knows that compared to the 5-year overhead costs of some overcomplicated k8s system, it's quite reasonable to overprovision the bejesus at the colo bare metal>hypervisor layer as cheap insurance.
Re:Japanese textile factory still uses tape cassette and pun... by fho on Monday July 10, 2023 @11:31AM (#36667887)
Every time I read something like this I think that there has to be a tipping point were a well-written (i.e. compiled, not interpreted) solution running on a beefy server has to more cost efficient than running the same thing spread over several containers.

Definitely not an expert, but I get the impression that this point is a lot higher that most people assume it is.

Re:Japanese textile factory still uses tape cassette and pun... by x86x87 on Monday July 10, 2023 @12:55PM (#36669140)
Spoiler alert: a well written application on a beefy server almost always beat the k8s rube Goldberg machines on cost. I still don't get why people refuse to think for themselves and just jump on the latest hype train.

K8s makes little sense unless you run on bare-metal. Once you jump to vms you are injecting another abstraction layer and take on a herculean level of ops without understanding what you're getting into.

Re:Japanese textile factory still uses tape cassette and pun... by toast0 on Monday July 10, 2023 @01:42PM (#36670006)
VMs are nice when you can't fill a machine with a single task (plus whatever redundancy). Once you get to a single machine, you want to scale up that one machine; you can go a long way where scaling up is cheaper than scaling out. But at some point, scaling out gets cheaper.

I'm not sure where the check points are now, but typical points where cost jumps are desktop -> server socket, single socket -> two sockets, two sockets -> four sockets, four -> eight sockets. AFAIK, AMD EPYC isn't offered at more than two sockets, and going to four sockets used to be possible off the shelf but very expensive, and eight sockets was very expensive if off the shelf or very expensive because custom engineering. Sometimes ram costs go way up for the highest density too.

Re:Japanese textile factory still uses tape cassette and pun... by reginaldo on Monday July 10, 2023 @12:40PM (#36668899)
Quote them some Henry David Thoreau[1]: "Why should we live with such hurry and waste of life? We are determined to be starved before we are hungry. Men say that a stitch in time saves nine, and so they take a thousand stitches today to save nine tomorrow. As for work, we haven't any of any consequence."

[1] From Walden: read at https://www.gutenberg.org/files/205/205-h/205-h.htm

Re:Japanese textile factory still uses tape cassette and pun... by zo1 on Monday July 10, 2023 @12:41PM (#36668926)
The irony is the last time I fell for this "SRE/K8s/Platform Engineering" crap, they promised auto-scaling and used it as a motivation for the tech. Yet when the time came, and services inevitably needed to scale due to load, they had to manually log in to increase some random config to let it grow.