Question
Which design pattern is most suitable for controlling
access to a resource by limiting the number of clients that can use it concurrently?Solution
The Proxy Pattern is a structural design pattern used to control access to resources by acting as an intermediary or placeholder. It can implement restrictions like access control, caching, or logging. In the context of concurrency, the proxy ensures that only a limited number of clients access a resource at a time. For example, a proxy server can manage a pool of database connections, granting access to clients based on availability. This pattern reduces resource contention and improves system scalability and security. By isolating the resource, the Proxy Pattern adds flexibility and control over its usage. Why Other Options Are Incorrect :
- Singleton Pattern : Ensures a single instance of a class but does not control concurrent access.
- Factory Pattern : Focuses on object creation, unrelated to access control.
- Decorator Pattern : Enhances object functionality dynamically but does not manage access.
- Flyweight Pattern : Shares objects to save memory, not for controlling resource access.
Which of the following statements is/are correct about Unified District Information System for Education+ (UDISE+)?
I. UDISE+ is one of the large...
A famous book ‘We the People’ is being penned down by which of the following writers?
Consumer behavior can be explained with which of the following?
I. Cardinal utility analysis
II. Ordinal utility analysis
At what elevation above sea level will the world's highest fighter airfield at Nyoma in Ladakh, constructed by BRO India, be located?
Which portal has been launched by the Government of India for its complete fauna checklist?
In which country the Prime Minister Shri Narendra Modi has received the 'World Peace Award'?Â
India’s first indigenous thrombectomy device, launched in May 2025, is used for treating which condition?
Consider the following statements about Twin Engine Deck Based Fighter (TEDBF):
1. It is a multirole combat aircraft currently under developmen...
Who was honored with the prestigious K.P.P. Nambiar Award by the IEEE Kerala Section?
Which state government recently signed an MoU with the National Forensic Science University (NFSU), Gandhinagar, to establish a center of excellence in ...