Servlets vs. Applets

We currently use applets to allow users to access a database,but are looking for ways to improve performance. Is a servlet-basedsolution faster than an applet-based solution?

This will depend on the application, the number of concurrentclients, the average network latency and bandwidth between a client andthe server, and other factors. In general, if you want yourapplication to scale to large numbers of users, you will want toforego the applet-centric solution. If each client applet has tocreate a separate connection to the database, transfer data, andprocess it locally, you face several potential bottlenecks.

First, youcould overload your database with too many connections. Second,you may have to transfer a lot of data over the network, which may takea long time. Third, the client may not have enough processingpower or memory to process all of the data in a timely manner, if atall. Other problems also exist, such as the inability to centralizebusiness logic, leading to software maintenance difficulties.

The preferred design for such a system is a three-tier architecture.A three-tier system consists of a client, a middle layer that performstransaction processing, and a back-end server. The client is usuallylightweight, only able to issue queries and receive final results. Anexample of this would be a simple HTML form. The middle layer’s jobis to mediate access to server resources and possibly perform processingon the client’s behalf. The server, of course, stores the database orother service that the client ultimately wants to access. Additionaldata processing can happen on the server and extra tiers can be added ifmultiple resources need to be accessed.

Multi-tier architectures offer several advantages. The primary advantageis the ability to scale to larger numbers of clients. The transactionprocessing layer makes this possible. It can keep a pool of open connectionsto the server, using them as appropriate to serve client requests, savingthe overhead of opening a new connection for every client. Rather thanoverloading the server with queries, the transaction processor can throttleback the load on the server by serializing requests. Data processing canalso be removed from the client and pushed closer to the data. The secondmajor advantage is the ability to cleanly subdivide software development.Each layer performs a well-specified task that can be developed withoutoverly impacting the other layers.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may