On which transport layer protocol does HTTP operate?
Java
—SEPARATOR—
Is it possible to use a try-catch construct without specifying a catch block, and in which cases is this permissible?
How to accept a POST request with JSON on the Spring side? When does JSON convert to DTO?
Which command helps optimize queries in PostgreSQL?
How does valueOf differ from fromString?
What methods of thread synchronization do you know in Java?
How would you build the process of onboarding a junior into a large monolith?
What methods can be used to prevent the use of pessimistic locking in Java applications?
What do you know about the Saga pattern? When to apply orchestration and when choreography?
Tell about your experience using try, catch, and finally constructs in programming practice.
What are the disadvantages of the current approach of sorting the entire list each time getTop is called?
Why can't we just use a single max variable instead of a second stack?
What contributes to the speed of data transfer in gRPC?
Is it possible to optimize the stack for memory so that there is no x2 consumption?
How did you manage to move abroad and work in Cyprus? What motivated you during relocation?
How to run this code in multiple threads? Why can parallelStream() be dangerous?
/* The company provides a mass notification sending service for other businesses. A product owner has approached you with a task to create a notification filtering system considering user preferences. ## Definitions Notification: - notification id - notification type (EMAIL, SMS, PUSH) - recipient (user id) - message text Recipient may have preference settings: - allowed notification channels (list of types) - blocked senders (list of sender ids) Notification sending history: - list of notifications sent to the user ## Important User settings and notification history are provided by other system components. You need to design contracts to obtain this data. Storage implementation is not required. ## Task Write a notification filtering system that: - takes a list of notifications for filtering and a sender id as input - excludes notifications that do not match user preferences - implements duplicate message protection, including messages sent in the last 24 hours. Duplicates are considered messages with the same id addressed to the same user - returns a filtered list of notifications ready to be sent. Sending notifications is not part of your task - another team will handle sending the filtered list. Your task is only filtering. */ class NotificationFilter { UserSettingsService userSettingsService; NotificationHistoryService notificationHistoryService; public ??? filter(??? senderId, List<???> msgs) { // TODO implement } } interface UserSettingsService { // TODO any functions } interface NotificationHistoryService { // TODO any functions }
Tell us about a complex authorization task when transitioning from monolith to microservices.
What is MCP and how does it work?