Sobes.tech

The database is large, indexes are built, the plan has been reviewed — what else can be done for optimization?

Senior
111

What caches are available in Hibernate?

Senior
111

Why did you increase the connection pool size under high load and how is this different from increasing the total number of requests?

Senior
108

import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class badCounter { public static Map<String, Integer> mapOfBadNames = new HashMap<>(); protected void doProcessing(String filePath) throws IOException { try { FileInputStream fis = new FileInputStream(filePath); BufferedReader br = new BufferedReader(new InputStreamReader(fis)); while((br.readLine())!=null){ processWords(br.readLine()); } br.close(); fis.close(); } catch (IOException | NullPointerException ex) { System.out.println(ex.getMessage()); } } private void processWords(String line) { Arrays.stream(line.split(" ")) .map(String::trim) .forEach(word -> { if(mapOfBadNames.containsKey(word)){ mapOfBadNames.put(word, mapOfBadNames.get(word)+1); } else{ mapOfBadNames.put(word, 1); } }); } public void writeResultToFile(String path) throws IOException { try { PrintWriter out = new PrintWriter(path); out.println("word,frequency"); for(Map.Entry<String, Integer> entry : mapOfBadNames.entrySet()){ out.println(entry.getKey() + "," + entry.getValue()); } out.close(); } catch (NullPointerException | IOException ex) { throw new RuntimeException("Error writing to file", ex); } } public boolean isEverythingFine() { return true; } public static void main(String[] args) { badCounter bcn = new badCounter(); try { bcn.doProcessing("bad_input.txt"); bcn.writeResultToFile("result.csv"); bcn.doProcessing("bad_input1.txt"); bcn.writeResultToFile("result1.csv"); } catch (IOException ex) { System.out.println("Something went wrong"); } } }

Senior
108

Tell us about the principles of SOLID

Middle
107

Why is the Repeatable Read isolation level needed in this context and is it necessary?

Senior
106

How are consumers distributed across partitions: does each consumer connect to each partition or not?

Senior
106

Did the application connect directly to PostgreSQL or through an intermediate component?

Senior
105

What is RAG from the document perspective — what kind of documents are they and how are they prepared?

Senior
104

The product came with a request to develop a Loyalty service, which based on the number of delivered orders (master system for orders OMS) will give the order processing service (cashier) a discount amount. The Loyalty service will not have a front-end part for now, only in the database, a mapping of how much discount corresponds to the number of delivered and not canceled orders should be stored. Something like Orders Discount [phone]% [phone]% [phone]% [phone]% It is necessary to design the service, propose integration mechanisms with the Order Processing Service and the Order Management Service. Design the architecture of the service that can be handed over to the development and deployment team.

Senior
101

How to protect a controller by roles in Spring Security?

Senior
100

Tell us about the projects, technologies, and technical challenges you have worked on.

Senior
98

If you increase the number of partitions from one to ten, how to evenly distribute messages among them?

Senior
89

Why couldn't you just scale the synchronous API, add application instances, or database capacity instead of Kafka?

Senior
85

What is your overall experience in IT?

Senior
81

You mentioned that you accelerated operations from 600 to 100–150 ms. What technologies and solutions made this possible?

Senior
81

How does HashMap place objects in tree bin if the key does not implement Comparable?

Senior
81

Are you familiar with the outstaffing model?

Senior
74

In what cases would you use @Async?

Senior
65

How to implement two integration implementations: a real one for production and a mock for testing?

Senior
58
/93