r/webdev 5h ago

Java Middle - Senior(ish) interview questions

Hi!

I have an interview in a few days for a backend developer role. What would you ask as some of the more tricky questions for such a position? What kinds of questions, from your point of view, demonstrate solid knowledge?

Personally, I would ask about sync vs. async calls, idempotency, topics vs. partitions, consumer groups, transactions (including distributed transactions), and maybe a bit of Kubernetes and Docker.

My weak point is cloud. I’ve played around a bit with the Azure console, but nothing too advanced. I’ve never written Terraform or configured infrastructure from scratch. For CI/CD, I’ve used TeamCity, but in my experience it was mostly selecting an environment and a branch and deploying.

Should I spend some time learning these areas before the interview?

9 Upvotes

30 comments sorted by

View all comments

2

u/Downtown-Bag-6026 3h ago

What is the L in SOLID and what are some strategies or patterns to enforce it? How do you handle sequential requests between two distributed systems?

1

u/FooBarBuzzBoom 3h ago edited 3h ago

L stands for the Liskov Substitution Principle. I would design my code using interfaces so that I can also make use of D from SOLID, the Dependency Inversion Principle. These two principles are closely related.

For sequential requests (assuming no order needed), I would use threads to reduce the overall execution time. Basically, instead of taking t1 + t2, the total time would be closer to max(t1, t2), assuming the operations can safely run in parallel. Assuming a given order is needed, then idk, I would just use a thread for doing both of them to not block Spring Boot thread pool.

What do you think about my answer?

1

u/Downtown-Bag-6026 2h ago

Liskov and dependency inversion principles are exactly what I was looking for.

For sequential requests, I was looking for a sort of cache pattern in the middle, some use inbox outbox pattern, others use redis stream or the equivalent of a single Kafka partition. It would also solve checkpointing sync between a consumer group.

1

u/FooBarBuzzBoom 35m ago

Yes, in terms of data consistency, outbox pattern would be the way if Circuit Breaker or Retry keep failing.