Sobes.tech

How to create a transaction manually without the @Transactional annotation?

187

If memory consumption increases in production, where should the investigation start?

187

What is the purpose of TreeMap?

Middle+
187

Design task: The Like service writes likes to Kafka, and the Dashboard service should calculate the post ratings. How to establish interaction?

187

Have you ever used window functions in PostgreSQL?

Middle+
187

What stages of software development and implementation were in your team?

Senior
187

Is a primitive object field stored in the heap or in the stack?

Senior
187

Why was reporting built on PostgreSQL under a load of ~2000 RPS? Why not use OLAP instead of OLTP for reporting?

Senior
187

What is the main problem with the chosen solution structure? - Hard initialization of final fields - The structure does not guarantee the uniqueness of services in the cache - Service search complicates testing - No usage template. Strategy of flexibility. - Service locator complicates debugging Code: public class CarMaintenanceReminder { private final ServiceLocator serviceLocator; private final ReminderCache reminderCache; public CarMaintenanceReminder() { this.serviceLocator = new ServiceLocator(); this.reminderCache = new ReminderCache(); } public Reminder getOilChangeReminder(String carId) { Reminder reminder = reminderCache.getReminder(carId); if (reminder == null) { reminder = serviceLocator.getService(ReminderService.class).createOilChangeReminder(carId); reminderCache.addReminder(reminder); } return reminder; } } class ServiceLocator { public <T> T getService(Class<T> serviceClass) { return serviceClass.cast(generateService(serviceClass)); } private Object generateService(Class<?> serviceClass) { if (serviceClass == ReminderService.class) { return new ReminderService(); } return null; } } class Reminder { private final String carId; public Reminder(String carId) { this.carId = carId; } } class ReminderService { public Reminder createOilChangeReminder(String carId) { return new Reminder(carId); } } class ReminderCache { private final Map<String, Reminder> cache; public ReminderCache() { this.cache = new HashMap<>(); } public Reminder getReminder(String carId) { return cache.get(carId); } public void addReminder(Reminder reminder) { cache.put(reminder.getCarId(), reminder); } }

187

In which case does a write to disk occur in the database?

Senior
187

What types of sharding exist? Describe the main approaches.

187

Tell us about yourself and your experience.

187

Have you had experience working with the Aerospike database?

Junior — Middle
187

How can interaction between classes be represented using abstraction?

Junior — Middle
187

Does Kafka topic have FIFO property?

Senior
186
/743