Fidelity Investments
10+ Scientific Security Management Services Interview Questions and Answers
Q1. how authentication and authorization works - oauth2 way of handling them
OAuth2 is a protocol for authentication and authorization that allows third-party applications to access user data without sharing passwords.
OAuth2 provides a secure and standardized way for users to grant access to their resources to third-party applications.
It involves the exchange of tokens between the user, the third-party application, and the resource server.
Authentication is handled by the authorization server, which verifies the user's identity and issues an access tok...read more
Q2. Design patterns java when and what to use
Design patterns in Java are reusable solutions to common software design problems.
Design patterns should be used when there is a recurring problem in software design.
Design patterns can improve code readability, maintainability, and scalability.
Examples of design patterns include Singleton, Factory, Observer, and Decorator.
It's important to choose the right design pattern for the specific problem at hand.
Design patterns should not be overused and should be balanced with simpl...read more
Q3. difference between jwt and oauth2, how to secure rest endpoints
JWT is a token format while OAuth2 is a protocol. Both can be used to secure REST endpoints.
JWT is a self-contained token that contains user information and can be used for authentication and authorization.
OAuth2 is a protocol that allows third-party applications to access user data without sharing passwords.
To secure REST endpoints, both JWT and OAuth2 can be used depending on the use case.
For example, JWT can be used for stateless authentication while OAuth2 can be used for...read more
Q4. Java 8 streams - how they function internally
Java 8 streams are functional programming constructs that allow for efficient processing of large data sets.
Streams are composed of a source, intermediate operations, and a terminal operation.
Intermediate operations include filter, map, and sorted, and are lazily evaluated.
Terminal operations trigger the evaluation of the stream and include forEach, reduce, and collect.
Streams can be parallelized for even greater performance.
Streams are designed to work with lambdas and funct...read more
Q5. how to use async in spring boot - advantages
Async in Spring Boot allows non-blocking I/O operations, improving application performance.
Async enables parallel processing of requests, improving throughput.
It allows the application to handle more requests with the same resources.
It reduces the response time for long-running operations.
Use @Async annotation to mark methods as asynchronous.
Use CompletableFuture to handle async results.
Example: @Async public CompletableFuture
asyncMethod() Example: CompletableFuture
result = ...read more
Q6. Difference between fixed thread pool and cached thread pool
Fixed thread pool has a fixed number of threads while cached thread pool creates new threads as needed.
Fixed thread pool is suitable for tasks with a known number of threads
Cached thread pool is suitable for tasks with unknown number of threads
Fixed thread pool can cause resource wastage if the number of threads is too high
Cached thread pool can cause performance issues if the number of threads is too high
Example: Fixed thread pool can be used for a web server with a fixed nu...read more
Q7. how to use cache with spring boot
Using cache with Spring Boot
Add @EnableCaching annotation to main class
Add @Cacheable annotation to methods that need caching
Configure cache properties in application.properties file
Use CacheManager to manage caches
Example: @Cacheable(value = "users", key = "#id")
Q8. what is filter and why it is required
Filter is a method used to extract specific data from a larger set based on certain criteria.
Filter is required to extract specific data from a larger set.
It is used to reduce the amount of data that needs to be processed.
Filter can be applied to arrays, objects, and even strings.
Examples include filtering out all even numbers from an array or all emails from a list that contain a specific keyword.
Q9. how to handle spring app config
Spring app config can be handled using various methods such as XML configuration, Java configuration, and annotation-based configuration.
XML configuration involves creating an XML file and defining beans and their dependencies.
Java configuration involves creating a Java class and using annotations to define beans and their dependencies.
Annotation-based configuration involves using annotations to define beans and their dependencies.
Spring Boot provides a convenient way to hand...read more
Q10. how mvc pattern works in spring mvc
Spring MVC follows the Model-View-Controller (MVC) pattern for building web applications.
Model represents the data and business logic
View renders the model data and provides user interface
Controller handles user requests, updates model and selects view
Spring MVC provides DispatcherServlet as front controller
RequestMapping annotation maps URL to controller method
ModelAndView object returns model data and view name
Q11. how to improve application performance
Improving application performance requires optimizing code, database queries, and server resources.
Identify and fix slow database queries
Use caching to reduce server load
Optimize code by reducing unnecessary loops and improving algorithms
Use a content delivery network (CDN) to reduce server load
Upgrade server hardware or use cloud-based resources
Minimize HTTP requests and reduce file sizes for faster page load times
Q12. microservices communication patterns
Microservices use various communication patterns like synchronous, asynchronous, event-driven, and message-based.
Synchronous communication involves direct request-response interactions between services.
Asynchronous communication uses messaging systems like RabbitMQ or Kafka to decouple services.
Event-driven communication involves services publishing events to a message broker, which other services can subscribe to.
Message-based communication uses a shared message broker to se...read more
More about working at Fidelity Investments
Reviews
Interviews
Salaries
Users/Month