![]() |
Practical Applications of NetBasic Web ProIntroductionOne of the least publicised features of NetWare 4.11 is the high-level scripting language NetBasic, which allows end-users to produce their own NLMs without resorting to C or assembler programming. Despite the fact that it is one of the most powerful and useful additions to NetWare 4.11, it is all too easily overlooked. Although the interpretative shell and language elements within 4.11 are fully functional, there are additional products available which extend the functionality of NetBasic even further. NSS Network Testing Laboratories has carried out a detailed evaluation of the NetBasic product family, and this article is taken from a White Paper which was produced to provide background information on NetBasic Web Pro and the technologies behind it, as well as some ideas for practical applications. Client-Server Vs Client-NetworkNetworks have taken off in a big way over the last few years. Applications which once ran on large mini-computers or even mainframes are now running on PC-based corporate networks, which offer a much more attractive price-performance ratio. Alongside this, the development of client-server technology to run on these networks has meant that large corporates can transfer even their biggest applications to the humble micro. NetWare is a viable host for such applications, since its basic "building block" approach of using NLMs to add functionality to the core server product is an ideal vehicle for third-party developers. As work practices changed over the years, the need to share resources and information - the spreadsheets we had created on our stand alone PCs, for instance - became increasingly important. This need was satisfied by the introduction of the Local Area Network (LAN), which ushered in the client-server era. In addition to simple resource sharing, the data sharing capabilities of our networks were enhanced by the development of true client-server applications. Thereafter we saw much of the data processing load transferred from the client to the more powerful server, thus providing a more efficient and cost-effective means of servicing the complex data requirements of a large number of users. This, in turn, brought about the need for more flexibility in the location of the presentation logic, business logic and the actual data, in order to provide the best combination of performance and fault tolerance under any given situation. The result was the development of the three-tier client-server architecture, which has introduced an additional layer of servers into the traditional client-server paradigm in order to provide the necessary distributed computing architecture. With each evolutionary step, we are increasing the flexibility of the network model by adding more servers. But that model is still somewhat server-centric, and until recently, we have gained access to our centralised resources by logging on to a specific server or group of servers. Client-network computing is actually a logical evolution of the way we currently approach our computing, allowing us to move away from a server-centric model to a network-centric one - the client is now attached to the network rather then a specific server. This, of course, is a move begun with NDS (Novell Directory Services), which allows a client to access numerous network resources without having to be concerned where they are physically located. No matter how many servers are involved around the world, the client sees only a single set of services. Practical ApplicationsIn the August 96 issue of Connections, we wrote about Net2000 and the NetBasic Web Pro product. In this section of the article, we examine a number of possible real-life applications of that technology in a client-server environment, presented as a series of fictitious "case studies". Case Study 1 : The Network ManagerProblem : Joan is the network manager of a large corporate network. There are several branch offices situated around the country each with at least one, and often several, NetWare 4.x servers. Joan is the only experienced network administrator in the organisation, and is faced with the task of regularly commuting between branch offices in order to fix relatively minor problems. Because she has to travel regularly with her job (the organisation has locations around the globe), some problems can rapidly get out of hand as she finds herself unable to gain immediate access to servers from remote locations. At the moment, she has to liase with non-technical users on each site in order to try to ascertain the problem, after which she has to talk them through complicated (for them) procedures to try and rectify things. Often, the simplest solution is yet another trip to the site in question with all the costs that entails, including Joans time and travelling costs. Solution : By installing NetBasic Web Pro (with included Web server software) on each NetWare server, Joan immediately gains access to those servers over the Internet. Even when she is away from the office in her hotel room, using any standard Web browser - such as Netscape or Internet Explorer - she can now dial into a local Internet Point Of Presence (POP) anywhere in the world, and enter the Web address of the server she requires access to. NetWares own powerful security and authentication mechanism takes over at this point to query Joan for her NDS or Bindery login ID and password. After authenticating her, NetWare allows access to the Web server where she is presented with a comprehensive list of options. First she elects to view the system console to check on any error messages which may have appeared. Noticing that one particular NLM has generated an error, she selects that NLM and views the console screen. The error is one that appears infrequently and causes no real damage to the system, and the cure is simply to reload the offending NLM. So, using NetBasic via her browser she selects the NLM, unloads it, and reloads it - the problem is fixed within two minutes of attaching to the Internet. She then logs onto another server located across the Atlantic, yet still she only pays for a local call into the nearest Internet POP. The new server shows signs of problems with one of the disks, so using NetBasic utilities Joan checks for any open files on the volume, sends a message asking those users to log off, and then fires up a simple monitoring utility so that she can see when all the open files are closed. Next, she disables logins so that no more users will try to access the faulty drive, dismounts the volume, and runs Novells VREPAIR utility to fix the problem. Once the drive has been remounted, she uses NetBasic to browse the volume and notices that that there are a large number of .BAK files in several directories. In order to create some extra space, she schedules a job (NetBasic Pro includes a job scheduling utility) to run at 3am which will search for and remove all .BAK files on the system which are greater than one week old. Another site has reported a problem with a user account, so Joan flips into the NDS browser utility and scans the appropriate container and object records via her Web browser. Having spotted the source of the problem, she now runs the NetBasic version of the NetAdmin utility which is supplied as part of the package, amends the object data, and saves it back to the NDS database. Finally, someone has reported a possible fault with the APC Uninterruptible Power Supply (UPS) on their server. Joan switches to that server using her Web browser and, via the NetBasic UPS module she can view the UPS statistics, determine the state of the battery and run some diagnostic self-test routines to ensure that everything is OK before retiring to the hotel bar for the evening. Case Study 2 : Software Distribution/Config ControlProblem 1 :
Peter is a network administrator with a common dilemma. He works for a company which
operates a two-shift system from 6am to midnight, and he has a network-based application
which is in constant use throughout that period. Solution 1 : Peter designates an off-line copy of the file set as a "master" and makes all the necessary changes to those files. He then uses the NetBasic task scheduler to run a NetBasic script at 3am when the system is sure to be unused. The script first checks that the files are no longer open, and clears the connection of any users still logged on. It then copies the files from the master set to the correct location on each of the 50 servers. The application, complete with new configuration files, is then ready for use by the 6am shift that morning. Problem 2 : Peter also needs to upgrade one of the Windows-based applications on each of the 500 workstations in the company. Having performed a couple of trial installations already he has identified a core set of program files which need to be copied to various directories on each workstation. However, certain elements of the installation differ depending on the workstation configuration - including the copying of hardware-specific program files and changes to one or two lines of the Windows configuration files on the local hard disk of each machine. The only way around the problem is to install the upgrade manually on each of the workstations. Solution 2 : Once again a NetBasic script is scheduled to run at 3am which tidies up the old installation and copies the new server-based files to every server in the organisation. A change is also made to the login script of all servers which forces a NetBasic script to be run when each user next logs into the network. The script runs through the Windows configuration files line by line and, depending on what it finds there, makes the appropriate changes. The correct files are then copied to the users local hard drive, and an attribute is set against that user in the NDS database to indicate that the upgrade has been completed successfully. Case Study 3 : The Sales ExecutiveProblem 1 :
Mike is a sales executive who is out on the road most of the time, rarely returning to the
office. In order to function efficiently, he obviously requires access to the latest
product details and prices. His company believed they were using computers effectively
when they replaced the old paper-based price lists with a system which allows each sales
executive to dial-in to Head Office and download a product catalogue and up-to-date
pricing information directly to his or her laptop. He uses Netscape quite a lot to browse the Internet and is familiar with it. He has already asked the head of the MIS department if it would be possible to set up a Web site containing all the product information, but the reply was somewhat negative. The MIS department feel that they do not have the resources to support a full-blown Web server which is open to the outside world. They also feel that it would be a duplication of effort, since the pricing and product information is already maintained in a central Oracle database on one of the NetWare servers. Solution 1 : By installing NetBasic Web Pro on the NetWare server, it is possible to extract data directly from the Oracle database and build Web pages on the fly. Thus, it is not necessary to maintain the same data both in the Oracle system and on the Web site, and because the Web server is used purely in an Intranet environment, the general maintenance overhead is minimal. Naturally, the content can be developed further as and when required, and the Web server can even be opened to the general Internet community at a later date. For the sales executives, however, the benefits are immediate. Mike no longer has to perform lengthy downloads using unfriendly software. Now when he arrives at a customer site he connects his laptop to his cellular phone and using familiar Web browser software, he can gain direct access to the latest product and pricing information straight from the Oracle database on the Head Office server. Because the Internet is geared towards graphical presentations, the on-screen catalogue can even include pictures of the products. Problem 2 : As each order is taken, Mike is expected to complete a substantial amount of paperwork in order that the order details can be entered into the computerised order entry system from standardised input forms. Once a week, the order forms are packaged up and shipped to head office for data entry personnel to key in the order details to the Oracle-based Sales Order Processing System. Most of the sales executives dislike the form-filling, and the delay in submitting orders to head office can often result in delays on time-critical orders. Reports providing cumulative sales figures and comparing them against last years sales and current years targets are vital to Mike, yet these too must be produced in hard copy form at head office, and either collected in person or mailed to Mikes home. Solution 2 : As Mike discusses order details with the customer, the relevant information is captured directly into an on-screen form via his Netscape browser. Once the order is confirmed, it can be transmitted securely (fully encrypted and protected) across the Internet to the head office server. A NetBasic script takes the order details and writes them directly to the Oracle database, thus ensuring that sales order entry is performed in a timely manner, eliminating delays and reducing the need for dedicated data entry personnel. A similar script can extract sales data from Oracle and present the cumulative sales reports and comparisons directly to Mikes Web browser, thus providing the most accurate and timely information possible. Case Study 4 : The Financial DirectorProblem : Carol is the Financial Director of a large manufacturing concern. She is keen to keep on top of the financial situation at all times, yet remains unfamiliar with the detailed workings of the main computerised accounts systems. She does have a laptop computer, but the only software she uses regularly - and is thus most comfortable with - is Netscape, which she uses both at home and at the office for e-mail and for browsing the Internet. In order to receive regular updates of the accounts figures, she is therefore forced to assign one of her staff the task of running selected reports, summarising the information and e-mailing it to her. Solution : After installing NetBasic Web Pro, the MIS department write a few simple scripts to extract key data directly from the Btrieve files used by the accounts system, and present it in both a textual and graphical format in an HTML document. Now, whenever Carol requires an up-to-the-minute appraisal of the accounts position, she simply accesses the appropriate page on the corporate Web site, the script is activated and the accounts data is retrieved and presented via Carols Web browser dynamically. Carol can now run her reports whenever and wherever she likes, and the information presented to her is always completely accurate and up-to-date. She is also pleased that she is able to use exactly the same interface for accessing information - in her case Microsofts Internet Explorer - at home as she does at work. Case Study 5 : The CustomerProblem : Bob is a loyal and long-standing customer to Acme Inc., but as the company has become more successful, Bob has noticed that the quality of customer service is not what it used to be. Although the customer service department has expanded, so has the customer base, so that Bob often encounters the busy signal when trying to check on the progress of his order. He also resents waiting on hold for twenty minutes or more simply to find the latest price of an item. Solution : Acme install NetBasic Web Pro which allows the latest product and pricing information to be made available on the Web without having to dedicate staff to maintaining the Web site. Now Bob can peruse the Acme product catalogue and price list using his favourite Web browser, and can find all the information he needs without ever having to contact the sales department. The system can provide even more sophistication if required. By entering details of all the products he wishes to order, the system can provide Bob with an accurate quotation automatically. When he is ready to place an order, Bob can browse selected fields from the Acme NDS database in order to find the direct-dial telephone number of the appropriate sales executive. Case Study 6 : Placing an OrderProblem : Despite the fact that Bob has saved so much time in researching his order details, he is still subjected to a lengthy wait on hold before being allowed to place his order. Acme is faced with either expanding its sales department or losing valued customers. Solution : By installing the secure version of the NetBasic Web server, Acme is equipped to take orders over the Internet. New customers are asked to register their details which are stored directly in the Oracle database back at Acme head office. They are then presented with a unique account number which can be used the next time they wish to place an order. Existing customers simply quote their account number together with a password, and their details are immediately retrieved from the Oracle database and presented on a dynamically-created Web page for confirmation. Any information captured can be passed from page to page, allowing Acme to "personalise" its Web pages and retrieve key information when the customer is ready to place an order. The customer then browses the catalogue adding the required items to the order. Once an authorisation code, purchase order number or credit card details have been entered, the order is submitted directly to the sales order system for processing. All details submitted over the Internet are protected by a powerful encryption mechanism to ensure absolute privacy. Case Study 7 : Customer InformationProblem : Acme has several extremely important customers who regularly place large orders which are called off and delivered in small batches. These customers need constant progress information on their orders, yet find it inconvenient to have to keep making telephone calls to the customer service department. Solution : Selected customers may be provided with a password which provides access to a secure part of the system. Here, they can enter an order number or a range of order numbers and have the NetBasic script query the Oracle database and present them with the latest progress details of their orders. Customers can now have instant information without tying up valuable sales staff. Case Study 8 : The Backup DilemmaProblem : Alex is a network administrator facing a common problem with his backups. His backup software is only capable of scheduling jobs for a specific time, yet he can never guarantee that all applications have finished their overnight processing runs and closed their files at the time the backup commences. The result is a high frequency of incomplete backup jobs, which leaves his company exposed to severe data - and financial - loss in the event of disaster. Solution : Using NetBasic Pro with one of the available backup modules allows Alex to create a backup regime which is "application driven" rather than "time driven". Now, whenever a particular application finishes processing, it can activate a NetBasic script which will ensure that all users are logged off and the appropriate files are closed before it schedules an immediate backup job which is designed to protect the files which are specific to that particular application. Backup jobs can be scheduled using a single NetBasic call, passing simple information such as the user name, password, server, volume, directory and file information. It is also possible to initiate backup jobs remotely over the Internet and completely automate backup and restore processes via simple NetBasic scripts. Case Study 9 : Reducing Fax CostsProblem : A large organisation with branch offices around the world uses Cheyennes FAXserve to provide most of its external communication as well as a means to deliver marketing messages to its customers. Since the marketing effort is co-ordinated from a single country, fax mail-shots entail a large number of international calls, and fax costs are rising to an unacceptable level. Solution : Using NetBasic Pro with the FAXserve module, it is possible to control all of Cheyennes fax services via a single call from a NetBasic script. The fax is now prepared for sending and then submitted across the Internet to each of the offices - this entails only a local call to the Internet Service Provider (ISP). Once the fax has been transmitted to the servers in each country, those servers then uses FAXserve to transmit the fax to its intended destinations within that country. Once again, instead of a number of costly international calls, we are now only making a number of local or national calls within each country, thus benefiting from a huge cost saving. Cost savings can also be realised for single fax transmissions by front-ending the fax server in each country with a NetBasic script which performs fully-automatic least-cost routing, transmitting faxes across the Internet wherever possible instead of incurring international call charges. Case Study 10 : Making Sure Everyone is Up-To-DateProblem : A company has a number of Web servers throughout the organisation. For historical reasons, each is hosted by a different operating system, including NT Server, Unix and NetWare. Most of the top level pages of each Web site should be identical across all Web servers, but keeping the files synchronised correctly following changes is proving a nightmare. Solution : Since Point-to-Point Protocol (PPP) and File Transfer Protocol (FTP) are platform independent, the NetBasic FTP module provides the means to synchronise files on each of these diverse platforms. A NetBasic script is created for the NetWare server which is scheduled to run at a set time each night. This script checks for any changes to the HTML files on the Web site, and transfers all modified files automatically to each of the other platforms. The FTP module with NetBasic Web Pro can be used to provide all manner of fully automated software distribution, file copying, migration and replication tasks across multiple platforms and servers. |
Security Testing |
Send mail to webmaster
with questions or
|