Update system in Java Web

Asked

Viewed 250 times

-3

Good afternoon, everyone,

I have the idea of making a system with Java Web, but I’m starting to learn java now. A friend told me about doing with Java Web and told me to do in Python. The arguments against Java:

1 - Generates 1 file only where everyone accesses it, which contains all the information of the whole system.

2 - To do an update on it (no chance of error) would need to do this at a time of no access as the same delay to climb to the server and would have to restart the server service.

3 - It would take 3-7 hours for DNS to update with new information.

4 - Companies using Java Web are migrating because it is harder to maintain.

This problem of taking too long to update and the client being without the system can be circumvented?

  • Marcelo, I find it very difficult to answer any kind of question like "What is better than what" in the format of Stack Overflow. Point 1 is false, point 2 is the result of a bad architecture, point 3 has nothing to do with the programming language (if you update a DNS input from a Python application you will also need to wait the propagation time) and point 4 is part of life (there are companies changing from X to Y language and others changing from Y language to X, and finally there are companies that are not doing either of the two things).

  • I know I’m not supposed to ask something based on achism. I put the points on the question of updating, if really would have problems and what would be the solution to the question of a possible software update and how much the customer would be harmed.

1 answer

11


There is much that could be argued against Java, but NONE of these four arguments is true. They are not even distorted or biased versions of reality, they are absolutely and completely false. They are hairy lies.

In the meantime, let’s go anyway:

1 - Generates 1 file only where everyone accesses it, which contains all the information of the whole system.

Take a look at the packages java.sql and java.io, which contains classes that allow you to write and read data from SQL databases and files. Any OS file can be accessed. Any SQL provider can be used. So this statement 1 is false.

If however the problem is that a web application is bundled all within a single file .War or .Ear to be deployed on the server, so I don’t see why that would be a problem. In fact, I consider it an advantage! This way it is easier to ensure that all the resources needed for the application are together and that nothing is missing, since everything will be in the same file that can then be distributed or deployed much easier than it would be in the case of multiple files. The same also applies to libraries or programs standalone in Java that comes packaged as .jar.

The file formats .jar, .War or .Ear are nothing more than a file .zip with a different extension and a certain internal organization (so much so that you can easily rename the extension of any of them to .zip and then open it to see your content). This way, all the resources you want to put inside the .jar, .War or .Ear could be added to it in the same way you would with a file .zip (only that usually this is done by the compiler, IDE or some other support tool, only very rarely would this be done manually).

If your program that is bundled in one ,jar, .War or .Ear need to access some resource that has not been bundled together, so just use the IO provided by the package classes java.io as I explained above, and you will be able to access the operating system files as you want and as you want.

Finally, the approach of putting together multiple resources, in particular compiled code, to assemble an executable file (in this case the executable is the .jar, .War or .Ear) is not much different than what other languages do to mount their executables (for example, .exe on Windows).

2 - To do an update on it (no chance of error) would need to do this at a time of no access as the same delay to climb to the server and would have to restart the server service.

Today’s major Java servers, such as Tomcat, Glassfish, Jetty and Wildfly, have features of hot deploy and replication to prevent downtime. They all have the feature to allow deployment on servers without needing to restart them.

As for the "no chance of error" issue, for any server in any programming language, if you upload a wrong version and it messes with your system, this is not the fault of the programming language, It’s the wrong package that you’ve climbed or the developer that developed it or the deployer that made it available. Thus, this would be a problem that happens equally with all programming languages and with all types of servers.

3 - It would take 3-7 hours for DNS to update with new information.

The process that updates the DNS (often a manual process) has no relation to the programming language or to the server type or even to the application deployed on the server. In fact, these two parts of the infrastructure don’t even communicate directly with each other, and this happens with all the programming languages and all the servers. The DNS update is a completely independent and decoupled process from this.

4 - Companies using Java Web are migrating because it is harder to maintain.

There are always those who migrate out as those who migrate in. There are many companies out there that use it heavily. To give concrete examples and not just talk, I can mention UOL, all cellular operators in Brazil, several banking institutions, pharmacy networks (such as Drogaraia and Drogafarma), universities, etc.

Note that I do not say that Java is the best thing in the world and surely there are a lot of problems that could be criticized. However, the criticisms made here are simply false.

  • Thanks for the answers.

  • @Marcelo De Nada. :)

  • I think the first question is talking about files. War.

  • @Piovezan Edited. :D

Browser other questions tagged

You are not signed in. Login or sign up in order to post.