![]() | ![]() |
|
Most web developers already use client-side JavaScript to create dynamic HTML pages. Resin leverages that knowledge to create server-side JavaScript pages. With power over the server, designers can weave all the web's threads to create their site's tapestry. Resin's capacity can grow as the site grows. Sites can change web servers or operating systems to meet increased demand. Resin allows this interchange of servers by following web standards such as Sun's servlet API and Java Database Connectivity (JDBC). The most obvious example of server-side scripting is using Resin to access a database. For example, a bank could use Resin to retrieve a customer's account information. Here are some other examples of using Resin
With Resin, businesses can easily upgrade to more powerful hardware, operating systems and application servers as their site traffic explodes. Resin uses standard interfaces, including the servlet API and the Java database API (JDBC) using its Java wrapper compiler. The script application never needs to see the Java underside. Because Resin uses Java standards to join to application servers, businesses can protect their investments as they upgrade to more powerful application servers. If the traffic on a site suddenly grows beyond its capacity, the business has flexibility to meet the increased demand. Because the Apache and Resin programs are separate, they might be on different hardware or even different operating systems to handle more traffic. The programs can be duplicated, allowing several Resin processes on different machines to share the load. A high traffic site could have 3 machines running Resin behind the Apache server. Like Legos, Resin can detach at the servlet interface and upgrade. Apache and JServ are only an example deployment. Without changing the Resin application, the business could upgrade to IBM's WebSphere or the Zeus web server. Or it could upgrade from Windows NT to Linux or Solaris. Resin can speed its response further for quasi-static pages. The quasi-static pages use JavaScript to create the page. Once created, the page does not change. For example, as in our navigation examples, a site may dynamically generate the navigation column from an XML file describing the site's table of contents. As long as the page doesn't change and the table of contents remains constant, Resin can cache the generated HTML. As another example, the Open Directory Project has a search directory like Yahoo. The directory is generated from an XML index. Since the directory changes rarely, its HTML pages could be cached. At the first JSP request, Resin converts the JSP into JavaScript. Since JSP is just a mixture of HTML and JavaScript, conversion is straightforward. Resin compiles the JavaScript code with other JavaScript libraries to create a Java program. Resin then executes the program to generate the page. For a subsequent request, Resin simply executes the Java program, saving a good deal of time. The compiled code still may take some time, it might perform some complex database queries, but Resin can avoid the time converting JavaScript to Java. Developers can still get quick feedback when they change pages. Resin will detect the changed page and recompile it. The developer just saves the new page; Resin does the rest. Resin will even detect when developers modify any JavaScript libraries and automatically regenerate the new page. This rapid feedback lets developers explore new ideas and debug quickly. Resin keeps response times low while keeping JavaScript's flexibility. Fast response times are vital, even for lightly loaded sites. Fast web pages encourage customers to look at more pages. The more pages viewers look at, the more valuable your site becomes. And when your site traffic explodes, Resin lets the site easily upgrade application server, hardware, and operating system. So you can develop your site secure in the knowledge that its capacity will grow with your site's traffic. Of course, you need to try Resin to see how it can power your site. Reading online documentation and white papers can only give a glimpse of Resin. So download Resin and evaluate it.
Copyright (c) 1998-2009 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc. |