Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

On java Coding guidelines: What does program reliability entail?

 
charlsy chuks
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi dear authors,

Everyone seems to be discussing security and I am seeing some terms that I probably have not come across in my java career.
However, I would like to know what reliability is. Does it have to do with how robust a say web application is in how it handles multiple requests without failing to serve jsp
pages?
Does it have to do with how many times a recursive function can call itself without the program running out of memory?
Please brief me on this guys. Thank you.
 
Dhruv Mohindra
Author
Greenhorn
Posts: 11
5
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Charlsy,

I would like to know what reliability is.


Reliability deals with the expectation from a system to operate according to its functional specification under some stated conditions for a specified time duration. Sometimes it is also referred to as the probability that software will not cause the system to fail under stated conditions for a specified time duration. The introduction to the "Reliability" chapter in our JCG book elaborates the software reliability aspect.

For a Java based web application, reliability could entail ensuring that webpages are served despite underlying coding bugs, runtime errors and most importantly issues caused by a deficient design / architecture. The first step towards meeting reliability requirements is to follow a coding standard and avoid writing sloppy code. The next step is to follow the principle of least astonishment - do not produce code that is complex, ambiguous, inconsistent or unpredictable. Code must also be written to avoid / address known failure scenarios in a fail-safe manner.

Does it have to do with how robust a say web application is in how it handles multiple requests without failing to serve jsp
pages?


For a web server, handling multiple requests without failing falls under "availability" (part of the security - CIA triad) as well as "reliability". An application server that runs without errors for X amount of time may be considered reliable. Also, note that reliable code will promote availability but a highly available system may not imply that the constituting code is reliable.

Does it have to do with how many times a recursive function can call itself without the program running out of memory?


A program that always runs out of memory because of recursion falls under "security" (denial of service). A program that occasionally runs out of memory (say every other hour) because of memory leaks or faulty concurrency is certainly not "reliable".




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic