this post was submitted on 26 Feb 2025
125 points (95.0% liked)

Programmer Humor

23419 readers
1442 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

I didn't see this coming and I think it's funny, so I decided to post it here.

(page 2) 16 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 2 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 13 points 2 months ago

We already have nanoservices, they're called functions. If you want a function run on another box, that's called RPC.

[–] [email protected] 27 points 2 months ago (1 children)

quantum services

take your source code and put each character in its own docker container

this gives you the absolute peak of scalability and agility as every quantum of your application is decoupled from the others and can be deployed or scaled independently

implementing, operating and debugging this architecture is left as an exercise for the reader

that will be $250,000 kthx

[–] [email protected] 11 points 2 months ago

implementing, operating and debugging this architecture is left as an exercise for the reader

Challenge accepted by a reader using AI, what could go wrong? xD

[–] [email protected] 45 points 2 months ago (1 children)

Nano services are microservices after your company realizes monoliths are much easier to maintain and relabels their monoliths as microservices.

Unironically. I'd put a significant wager down on that being the source of this term.

load more comments (1 replies)
[–] [email protected] 19 points 2 months ago (1 children)
[–] [email protected] 5 points 2 months ago (1 children)

My services are so small that it is impossible to know just how fast they are running!

load more comments (1 replies)
[–] [email protected] 5 points 2 months ago (2 children)

we've been using nano-services for the past 6 months or so. Two different reasons. A codebase we absorbed when a different team was dissolved had a bunch of them, all part of AWS AppSync functions. I hate it. It's incredibly hard to parse and understand what is going on because every single thing is a single function and they all call each other in different ways. Very confusing.

But the second way we implemented ourselves and it's going very well. We started using AWS Step Functions and it allows building very decoupled systems by piecing together much larger pieces. It's honestly a joy to use and incredibly easy to debug. Hardest part is testing, but once it's working it seems very stable. But sometimes you need to do something to transform data to piece together these larger systems. That's where 'nano-services' come in. Essentially they're just small ruby, python, js lambdas that are stuck into the middle of a step function flow in order to do more complex data transformation to pass it to the next node in the flow. When I say small I mean one of the functions we have is just this

def handler(event:, context:)
  if event['errorType']
    clazz = Object.const_set event['errorType'], Class.new(StandardError)
    raise clazz.new.exception, event['errorMessage']
  end
  event
end

to map a service that doesn't fail with a 4xx http code to one that does fail with a 4xx http code.

You could argue this is a complete waste of resources, but it allows us to keep using that other service without any modifications. All the other services that depend on that service that maps its own error types can keep working the way they want. And if we ever do update that service and all its dependencies, now 'fixing' the workflow is literally as simple as just deleting the node and the 'nano-service' to go along with it.

I should note that the article is about the first thing I discussed, the terrible codebase. Please don't use nano-services like that, it's literally one of the worst codebases I've ever touched and no joke, it's less than 2 years old.

[–] [email protected] 3 points 2 months ago

Sounds like a distributed monad

[–] [email protected] 4 points 2 months ago (9 children)

This looks like hell.

I'm a C/C++ developer though.

[–] [email protected] 2 points 2 months ago (1 children)

I’m a C/C++ developer though.

Ya feel good about yourself, slugger? /s

load more comments (1 replies)
load more comments (8 replies)
[–] [email protected] 6 points 2 months ago

I think it’s just serverless, right?

[–] [email protected] 5 points 2 months ago (1 children)

Soooooo... Linux with extra steps.

[–] [email protected] 4 points 2 months ago (2 children)

brb deploying each bin from coreutils as a separate aws lambda function

load more comments (2 replies)
[–] [email protected] 30 points 2 months ago (3 children)

This "article" was written by AI, wasn't it? This is just throwing vague buzzwords around

load more comments (3 replies)
[–] [email protected] 15 points 2 months ago* (last edited 2 months ago) (2 children)

You know what they say: micro services, macro outages.

load more comments (2 replies)
load more comments
view more: ‹ prev next ›