1,581 karma · joined Oct 22, 2022 (4y ago) · 796 submissions
comment 3y ago · link · parent
I also have sandbox deployments in place that individual developers can take over and deploy the services they're working on to be able to test them in an environment that is very similar to the prod environment.
I also have in place a few Docker compose scripts for specific services that deploy a combination of dependencies, either the service itself or stubbed services.
For function-as-a-service code, I have special local-only, pre-beta deployment stages that fake clients.
512.
Ask HN: How do you test your microservices?
9 points · by simplotek · 3y ago · 6 comments
comment 3y ago · link · parent
They are often, and by far, the best solution though, specially taking into account the tradeoffs of whatever alternative you come up with.
Specially massive monoliths in a monorepo.
It makes no sense to mindlessly crap on operating services, specially when compared with alternatives. I get that some people feel the need to vent their personal frustrations, but this does not mean they have a point.
comment 3y ago · link · parent
Except it is. It's bad form to go down the "everyone else sucks and I'm flawless" path that plagues software development circles. You work on the project, and it's on you to get it in working order. Setting up a basic local software dev environment is step #0. Just because your predecessors failed to set one up that does not mean you're not to blame for failing exactly like your predecessors failed, except your predecessors didn't tried to throw you under the bus.
Also, it is a collosal red herring to talk about dozens of services. You can and should fake services you consume to isolate the services you actually work on. It's also bullshit to pretend that nowadays there is no way to launch and shutdown dozen of services in one go. It's trivial to launch them locally with multiple technologies to choose from and trivial to setup cloud environments for development purposes. These are all lame excuses, and one that illustrates problems caused by the developer's inability to go through the very basics.
comment 3y ago · link · parent
That's far from my experience. In all the projects I worked with that involved services, the very first thing that was setup was a working local test environment and at least a non-prod stage. With tools like Docker compose and any of the myriad local kubernetes clusters this is outright trivial.
If your team failed to setup a dev environment, that problem is on you, not on a type of software architecture.
Once I worked on a legacy desktop application project that didn't even had debug builds. Would it be fair to pin this failing on how awful desktop apps are?
comment 3y ago · link · parent
This is simply not true. Microservices are a solution primarily to an organizational problem and secondarily to the problem of allocating and managing computational resources. The organizational problem is solved by the hard boundaries and loose coupling imposed by operating and consuming independent services. Allowing a team to own and operate their services allows them to have more control over all aspects of a their life cycle, reducing the scope of other stakeholders to what contract their interfaces need to comply with.
Those who naively shit on microservices seem to be totally oblivious to what it would be like if all we had were monoliths. We tried that already. It's awful, and we learned from that mistake. Well, some of us did.
comment 3y ago · link · parent
It's not even an American bubble. Some sources show that the iPhine market share in the US is only slightly above 50%.
https://gs.statcounter.com/os-market-share/mobile/north-amer...
comment 3y ago · link · parent
It wasn't supposed to. It was suppose to point out a concrete example of how stronger worker protection leads to being paid fairly for the work you do, while US workers are not.
Meanwhile, feel free to check how any FANG salary for software engineers in places like Seattle compares with the cost of living, and how the salaries for equivalent positions in European cities like Amsterdam, which also has a notoriously high real estate, lead to higher disposable income.
comment 3y ago · link · parent
I feel there is no rational basis for this belief, and it's mostly guided by wishful thinking to fool yourself into believing that all this penance leads to some kind of salvation.
It doesn't.
There are highly paid professionals in other countries who benefit from higher worke protection laws and even public services like working national health services and free education. Virtually all European countries ensure greater workers protection and half have a higher human development index than the US, and FANG salaries in Europe often lead to far greater disposable income. Heck, I personally know a FANG who was forced to pay overtime for oncalls in europe while US workers only get the pager app and the shaft.
Also, being subjected to abuse is not a requirement for mobility. Mobility only requires that you can quit your job and apply for other positions. There is no piece in the equation that requires abusive revolving door hiring practices.
People should shed their victim mentality and stop fooling themselves on how the path to riches is through suffering. It isn't. Basic human decency doesn't need to be thrown out of the window. That's only a requirement to screw over workers out of their rights and livelihood.
comment 3y ago · link · parent
I understand that HN is a US-centric forum, where neoliberalism dictates the baseline and the interpretation of all things in life is reduced to a simplistic transaction in a theoretical free market.
However, society is comprised of people with family and a personal life and hopes and dreams and aspirations. Hiring someone has a profound impact on their life, and firing them moreso. There's the income aspect, but also the impact it has on where a person can live and consequently all roots their family have in a community. Hiring a person entails a tremendous social responsibility, and moreso firing them. Microsoft has a hefty amount of immigrants from all corners of the world, and some who have visas that limit the odds they can stay even in the country, let alone their community.
It's deplorable how a company can toy with someone's life like that just because some exec feels like it.
comment 3y ago · link · parent
How would that work? You whine on an online forum over how bloated a software is, and in the process opt to be deprived of it's usage? Or would you continue to complain about bloated software while using it? Because none of those scenarios offer a compelling reason for the software maintainers to rearchitect their whole application.
Meanwhile, a 8GB stick of RAM can be bought for what? 40€?
comment 3y ago · link · parent
Again, this take is outright wrong and totally clueless. I mean, the summary of each change introduced by any of the C++ standards is freely available. C++20's most compelling features beyond concepts and modules were small improvements over existing features like lambda captures and template resolutions, or new atributes.
What compells you to make such nonsensical claims?
comment 3y ago · link · parent
I believe that if you never were in a position where your job was a soul-crushig source of misery and despair, you've been lucky to live a sheltered life.
Most people don't have the privilege of picking and choosing outstanding jobs with decent work/life balance, nice colleagues, reasonable deadlines and considerate stakeholders. Most people have rent/mortgage to pay, kids to feed, and unfavourable odds of improving their life with low risk and impact on your life. I'm sure they gained a lot of life experience too.
comment 3y ago · link · parent
I don't believe this take is fair or correct. FANG-like jobs are designed to depersonalize workers, compell them to work extremely long hours, force them to be constantly on and available, and basically live for the company, only to be pushed out of the company by design and get fired as disposable canon fodder at the slightest bump on the calendar.
The pay might be good, but it resembles a deal with the devil.
Have you ever wondered why the average tenure at some top tech companies is measured in months, and reaching a milestone like 4 or 5 years is lauded as a major achievement? I seriously doubt that so many people is just "externalizing their happiness". Sometimes it's really the job that kills you inside and does so by design, don't you think?
comment 3y ago · link · parent
Your comment doesn't bear any resemblance with reality. C++ started with a spartan standard library and only recently did it standardized it's file system API.
Compare that with what, say, POCO already offers. Or Boost. Or java/C#/Python/etc.
What exactly led you to believe that absurdity?
comment 3y ago · link · parent
I want you to either substantiate your extraordinary claims regarding C's supposedly security issues along with your personal assertions regarding Linux supposedly being riddled with security vulnerabilities. So far you either desperately tried to avoid the questions or put up strawmen. Either you support your claims and present your rationale or your claims are proven to be nonsense.
Nonsense links to 20 years worth of CVEs that boil down to an average of a few dozen random issues in a codebase of over 12M lines of code is complete nonsense, and showcases the exact opposite of your original claims, not to mention that most have zero to do with C at all.
So exactly where do you base your personal assertion that C is somehow riddled with security issues? Nowhere?
People like you need to either open your eyes and think through your baseless beliefs or stop being disingenuous. The world is very different than the bullshit claims that pops up in your Twitter feed.
comment 3y ago · link · parent
You're failing to understand that granting access to the raw pointer managed by a std::unique_ptr violates the precondition that the object owned by that smart pointer is managed exclusively by the smart pointer itself.
It's very strange how you fail to get this point when you're trying to complain about C++'s supposedly memory management issues in general, and in this particular case an error sparking from violating these invariants.
Failing to use a smart pointer, to the extent you even have to explicitly ignore errors from static code analyzers to make them, is not a language issue. It's a "pay attention to the big red error messages" issue.
You can't have your cake and eat it too. It makes absolutely no sense to spend so much time and energy mindlessly criticising a programming language to then try to argue that making one of the most basic errors was somehow an acceptable practice when it clearly isn't.
comment 3y ago · link · parent
I'm not sure you're being serious. Do you understand your list is comprised of CVEs that date way back in time as far as 2003?
You're talking about an unfiltered, uncategorized list of reports that were published in last two decades.
At least a couple of entries from a decade ago referred to fixing kernel warnings.
And that's what you chose as the single best smoking gun to support your personal assertions on C?
comment 3y ago · link · parent
No, it isn't. That's flagged by default settings of most static code analysis tools, and it requires explicitly going against the whole point of explicitly assigning ownership of an object.
comment 3y ago · link · parent
Please stop trying to avoid the question.
Either you based your personal assertions on concrete data, or you're just a clueless troll spewing baseless nonsense.
You've repeatedly tried to dance your way out if substantiating your extraordinary claims.
Either you're able to come up with any semblance of support for your claims, or you can't. What is it?
comment 3y ago · link · parent
I'm sorry, this means nothing.
As you made extraordinary claims regarding the security of Linux, did you based your personal assertion on any real world comparison between OSes? Because so far you failed to provide any support for your claim, beyond pointing out a mailing list thread on a single memory error in a RC1 within a 12M loc codebase.
comment 3y ago · link · parent
It's literally a single memory error in over 12 million lines of code.
What exactly was the point you were trying to make?
> We've somehow as a community just come to accept that linux will be riddled with security vulns.
I'm sorry, your claim is pure nonsense detached from reality. What exactly led you to believe it's reasonable to jump from finding a single memory error among over 12M loc to "riddled with security vulnerabilities"? Linux quite literally dominates the list of most secure OSs. Where exactly do you base your personal assertion?
comment 3y ago · link · parent
I'm sorry, isn't your link about how a user found a memory error in the Linux codebase? It seems way farfetched to jump to your conclusion from that starting point. I mean, doesn't Linux have over 12 million lines of code right now?
comment 3y ago · link · parent
I agree. The article reads like it started with w conclusion and cherry-picked data to fit that.
comment 3y ago · link · parent
Having to maintain legacy C++ applications is all the justification you need to have to understand that staring greenfield projects in C++ is quite frequently and by far the best option on the table
It makes absolutely no sense at all to multiply the tech stacks that a team needs to work on, let alone master, just because naive platitudes have been said about any novel tech stack. You do not make any application better or more secure if you get clueless developers onboarding onto new technologies and forcing them to maintain N+1 code bases and 2*n bindings.
This irrational dislike of C++ ignores the fact that adopting the latest C++ release and toggling static code analysis in your project, which nowadays comes for free, already gets any project way ahead of where naive retractors believe C++ is.
comment 3y ago · link · parent
No. The problem is not whether X has a job or not. The problem is why X was forced to lose their home. In this day and age you can still lose your home even if you are juggling multiple jobs.