Sunday, March 1, 2020

Unveiling the Enigmatic World of Proxies: Gatekeepers of Access and Control

In the intricate dance of software architecture, there arises a need for gatekeepers—entities that control access to coveted objects. Imagine a scenario where only specific methods of hefty, resource-intensive objects are required. Here, proxies step into the limelight, donning the role of light objects that mimic the heavyweights until the precise moment when their grand entrance is required.

The Dance of Proxies:

Proxies, in this digital ballet, serve as the intermediaries between the user and the resource. They masquerade as the real deal, exposing the same interface as the heavyweight objects but biding their time until the curtain call. The magic happens when, at the opportune moment, proxies summon the actual resource, sparing us the cost and resources until absolutely necessary.

The Tapestry of Control:

Why do we yearn for this control over object access? Picture this—sometimes, the instantiation and initialization of a resource-intensive object are akin to raising the curtains on a grand performance. We desire the ability to dictate when that performance commences, and proxies grant us that control. Moreover, access rights become a nuanced dance, with proxies choreographing who gets to waltz in and partake in the spectacle.

The Symphony of Proxy Servers:

Extend this concept to the vast landscape of computer networks, and you encounter the maestros of access control—the proxy servers. These servers waltz between clients and servers, intercepting requests and orchestrating a seamless exchange of resources. It's a ballet of efficiency, ensuring that clients receive what they seek while maintaining a delicate balance of control.

Examples Unveiled:

Let's bring this concept to life with tangible examples. In the clandestine realm of internet privacy, proxies play the role of concealers. Consider Tor, where the client's IP address is veiled, hidden behind the graceful movements of a proxy. It's a dance of anonymity, a tango of hidden identities.

Now, imagine a bustling internet landscape where speed is of the essence. Proxies emerge as accelerators, speeding up the ballet of internet surfing. They cache resources, minimize latency, and ensure a swift performance, akin to a well-practiced routine that leaves the audience (users) in awe.

Conclusion:

As the curtains draw to a close on our exploration of proxies, we unveil a world where control, access, and anonymity intertwine in a mesmerizing dance. Proxies, whether orchestrating the instantiation of objects or gracefully pirouetting through the digital realm, are the unsung heroes of software choreography. They embody the essence of control, offering a symphony of solutions to the multifaceted challenges in the realm of software architecture.



Remote Procedure Call (RPC)

Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call.

RPC uses the client-server model. The requesting program is a client and the service-providing program is the server. Like a regular or local procedure call, an RPC is a synchronous operation requiring the requesting program to be suspended until the results of the remote procedure are returned. However, the use of lightweight processes or threads that share the same address space allows multiple RPCs to be performed concurrently.

When program statements that use the RPC framework are compiled into an executable program, a stub is included in the compiled code that acts as the representative of the remote procedure code. When the program is run and the procedure call is issued, the stub receives the request and forwards it to a client runtime program on the local computer.



Elegance of Vanilla JavaScript

     In the bustling metropolis of the web, where complex frameworks and libraries crisscross like the intricate networks of its vast infras...