Is a primitive object field stored in the heap or in the stack?
Java
There is a backend and a UI. The stack is standard: Java, Spring, React, Postgres. Task: Design a REST endpoint that needs to fetch data from 3 sources and deliver it to the UI, while ensuring maximum possible throughput and minimal response time (max/min criteria based on our specific conditions, since essentially, there is no silver bullet here and we need to find a compromise). It is known that the expected peak RPS for this REST endpoint will be 200. Details about the sources: 1st source - our database, query takes about 3 seconds. 2nd source - a related REST service, degrades to 2 minutes under 100 RPS, in normal mode responds in 5 seconds. We cannot change the behavior of this source on their side. 3rd source - a related REST service, randomly (no discernible pattern) returns 503, in normal mode response takes 10 seconds. We cannot change the behavior of this source on their side.
If we make a positive decision, when will you be able to join us?
How to ensure reliable invoice delivery if an external service might fail?
Tell me about equals and hashCode: the contract, why hashCode is needed
Tell us about transaction isolation levels and the anomalies they address.
If there is data cache, how can you determine that the cause of OOM is specifically due to it?
How do NoSQL databases differ from relational ones?
If there were no such infrastructure (like Prometheus), and there were only Kafka and a database, would the database be able to record all these messages under a load of one hundred thousand messages per second?
What was the last book or article related to your work that you read?
What was the domain of the application: fintech or something else?
Tell us about Stream API — what it is and how you use it.
What is the purpose of ClassLoader?
Who orchestrated the entire process — who understood what message needed to be sent to Kafka and to initiate the calculation?
For what tasks have you used agents according to your experience?
How to organize a common TestContainer for multiple test classes without stopping between them?
//Given an array of numbers where all numbers except one have a pair, //find the number that appears only once // <= [1, 0, 3, -2, 9, 9, 1, -2, 0] // => 3 int find(int[] arr){ //TODO }
What is a singleton as a design pattern?
Briefly tell about your work experience.
How to replace large if-else / switch-case structures with patterns (e.g., Strategy)?