News for hackers. Stuff that matters.
Re:The Stupid Programmer Manifesto by ttctciyf on Thursday June 15, 2023 @10:00AM (#36340625)
Yeah, I read this post as a dig at "cargo cult" programmers who read up on google-scale programming and best practice and unthinkingly apply those constructs to their own Bob's-Restaurant-scale task at hand where they are often at best an unneeded time and complexity overhead.
Re:The Stupid Programmer Manifesto by Cthulhu_ on Thursday June 15, 2023 @10:14AM (#36340816)
I've worked in a number of projects where they decided to move to microservices for reasons they wish they had, while not fully understanding microservices or applying basic litmus tests to where to split off services.

So we ended up with great puzzles like how to link an order service with an inventory service to check if there's enough inventory to fulfill an order, all through a central event bus. Then of course the order service has to update the inventory if the order is confirmed. But of course, the order service also has to talk to the pricing service, and since the price of products varies by day, they'd have to remember the price at the time the order was made. Whose responsibility is that? No idea, that's someone else's service.

Re:The Stupid Programmer Manifesto by collyw on Thursday June 15, 2023 @11:04AM (#36341538)
We had a dev in my last work pushing to microservice everything (small company, only a few developers). I could tell that it was going to cause more pain than it was going to solve. Plus, every service that you add makes setting up a development machine even more difficult.
Re:The Stupid Programmer Manifesto by beezlewax on Thursday June 15, 2023 @01:29PM (#36343885)
Not to mention testing all of this. Its an absolute nightmare.
Re:The Stupid Programmer Manifesto by collyw on Friday June 16, 2023 @08:08AM (#36355205)
Replacing function calls with network calls is only going to make things more difficult.
Re:The Stupid Programmer Manifesto by robofanatic on Thursday June 15, 2023 @11:21AM (#36341812)
There is a youtube video for that https://www.youtube.com/watch?v=y8OnoxKotPQ
Re:The Stupid Programmer Manifesto by 908B64B197 on Thursday June 15, 2023 @12:46PM (#36343238)
> I've worked in a number of projects where they decided to move to microservices for reasons they wish they had

I've advised engineers to rewrite code before, mostly for resume building to help jumping ship to somewhere better. Basically, use the current job as a way to train on the stack the company you really want to work for is using.

If a company doesn't have a stock-based comp and sticks to prevailing wages/CoL there's no incentive to help the company succeed. Especially with non-technical management, the best thing to do for ICs is often to aggressively rewrite (in the language that's trendy right now and that better companies use) and get promoted by showing off a significant output. Then jump to a better company having spent a year training on their stack at the previous company's expenses.

Re:The Stupid Programmer Manifesto by epups on Thursday June 15, 2023 @12:53PM (#36343347)
This is a good point. The other side of the coin is that by not moving to a modern day stack, the company slowly finds it harder and harder to attract staff to maintain it. So, keeping up with trends is not just good for the ICs.
Re:The Stupid Programmer Manifesto by kartoshechka on Thursday June 15, 2023 @01:49PM (#36344138)
this might come as incredibly cynic for some, but illustrates an important point - languages/frameworks/whole marketed stacks like ELK are merely tools for you to accomplish the task, which in the end is either to reduce costs or increase revenue

so naturally it doesn't matter (in long term) what you should learn to get a first job, change jobs, change domains - prioritize ROI the tool would give you in future, a job market, and your sanity :)

Re:The Stupid Programmer Manifesto by smilliken on Thursday June 15, 2023 @02:25PM (#36344598)
It's unprofessional to do this in conflict with your company's interests. Use your own hobby projects to learn instead of leaving a maintenance project for your coworkers.

It also creates an invisible bias towards worse companies in your next position, because smart companies are wary about this kind of behavior, and will be savvy to filter out candidates that have displayed it.

Re:The Stupid Programmer Manifesto by 908B64B197 on Thursday June 15, 2023 @04:08PM (#36345807)
> It's unprofessional to do this in conflict with your company's interests.

Great work happens at the intersection of employee's and company's interests!

Why not simply align the two? Compare the Xerox Alto with the Macintosh...

Re:The Stupid Programmer Manifesto by hbrn on Thursday June 15, 2023 @01:50PM (#36344160)
Unfortunately it's not a popular belief anymore, but [asynchronous] central event bus is a terrible idea on it's own, and it goes against what [micro]services are about.

If you want microservices to work you shouldn't have anything central in them, and you should avoid async as much as possible.

Re:The Stupid Programmer Manifesto by karmakaze on Thursday June 15, 2023 @06:07PM (#36347315)
That's not at all what I learned from working with microservices. The worst thing you can do is make sync calls between services, then you end up with high aggregate failure rates, and/or large request latency from retries as well as low uptime due to dependency couplings.

One-way async dataflows work much better. That way each microservice is up with all the (potentially delayed) data it needs to respond to requests.

Re:The Stupid Programmer Manifesto by hbrn on Friday June 16, 2023 @12:39PM (#36359575)
If you have services with lots of dependencies on other services, then you probably ended up the worst of two worlds - distributed monolith.

The "potentially delayed" approach is very tempting for engineers, but it should be exception rather than the rule.

It

- dilutes responsibilities between services (who is responsible for delays? is service A producing too many messages or is service B too slow to process them?)

- makes your SLA vague (message was processed 3 days later, do we treat it as downtime or not?)

- requires more infrastructure & processes (every service has a queue, dead-letter queue, and a process to deal with dead letters)

- requires a ton monitoring overhead (what delay is acceptable? how do we even measure delay? what if you have different SLA for different messages?)

- introduces a lot of unnecessary complexity and rules (how do you deal with TOCTOU, e.g. admin deactivates a user, but at the time the message gets processed he's no longer an admin)

- ruins user experience (we received your payment information, but we won't immediately tell you that it's wrong).

Potentially delayed approach can be a fine tradeoff when it saves you 7-8 digits per year. Most companies never reach this phase.

Re:The Stupid Programmer Manifesto by karmakaze on Saturday June 17, 2023 @01:03PM (#36372064)
A lot of this depends on implementation and infrastructure which is of course an additional detail. In an example I'm recalling it was for a communications app that had services for content, users, groups, sending, and receiving. Sending a message would save content with an id, include user/group recipient ids and write to the send service with them. Each service if it accepts the request completes it unless the service is actually down. The user/group service seems like it could be a sync service, but actually the client caches a list of users/contacts or can search for them.

By abstracting content the only thing that needed to change for new types of content was the content service and clients. Abstracting recipients which can be users/groups, meant that the only service that needed to care about this detail was the one that replicates sent to inboxes in the receiving service. Because of the use of content ids and user/group ids, this is all small idempotent/immutable metadata. The system was complex (yet became manageable over time) and onboarding onto each service was immediate.

I think few have seen well-bounded microservices' contexts leading to the idea that it's a bad distributed monolith. Also worth remembering that advantages of microservices 'done right' is large scaling of developers and isolate failures.