Java's popularity in Internet Algorithmics (Search, Big Data etc.) [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have been writing C/C++ code for years. Recently started doing lot of Java too because some of the very fine products that I am using to solve my computing problems are all written in Java (Example: Lucene/Solr, Hadoop, Neo4j, OpenNLP etc.).
I am seeing this chage since last 3-4 years that Java has really got very popular atleast in Internet Algorithms (Clustering, Search, Big Data & so on). Though their are counterparts of the products that I have mentioned above in C++ (like for Search Sphinx written in C++ is a great option, Google has its Map Reduce written in C++ etc.)
I am just curious to know what are the factors & strength's that are making Java very popular these days specially in the Information Retrieval & Big data domain.
I just wanted to know the strengths of Java which is making it very popular in Internet Algorithms space? Is it just because of platform independence thing?

I would argue that Java and C++ perform at a similar level outside of the arbitrary, contrived situations which are so often used to prove that X is faster than Y.
Once you factor in network round-trip times and other, real world delays, I can't see a C++ application offering a measurable advantage over a Java application simply due to being C++ as opposed to Java. You will, however, see a measurable difference between a well-written application and a poorly-written application.

plattform independance is a nice feature, but doesn't always work in java. depending on what you do
java gets its popularity for the fact, that it's more safe than c++
you can not use pointer arithmetics and you can not manage memory allocation on your own
if something wents terribly wrong, you get an exception or an error, or the program just crashes but in java you are relatively sure not to continue doing things you definitely don't want to do
yes you can do all that in c++, but that's not the question, isn't it?

Related

Is node.js ready for replacing server tasks? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am watching node.js and its apps for a year now and I would love to replace bigger parts of my good old Java code with node.js.
The problem I noticed with node.js is that
it looks like a chaos, from version to version things don't work anymore
bad documentation, really bad
no idea what libraries have been ported or will be ported any time soon
multi core managment, does it ?
uses 100% of the CPU power regardless of what it actually does (ie : pauses in loops). Thats not green and this is important to us.
Regarding security concerns I would put it behind a reverse proxy and only my old and real Java server would be able to use it.
update : funny this question gets closed because its not constructive. how can the question be constructive when I don't have any glue? Thats why also I am aksing here ! You moderators here really suck sometimes.
However, would you rather suggest to wait before moving to node ? Or do you think its time to move over ?
I'm writing loads of Java server side code and I would start building my own base framework and then port piece by piece!?
Even if the questions gets closed:
Actually, it works pretty stable and backwards compatible so far
Are you for real ? --> http://nodejs.org/api/
Again: http://www.nodejs.org
Node didn't scale with CPU or core numbers, you should let the OS scale node processes by just launching multiple instances
That is just wrong.
Even if Node still is "young" in comparison to other "server-side considered languages", it already found its place in a lot of spots. It can deal easily with huge amounts of users, it's an excellent web-socket server counterpart, its lightning fast when it comes to dispatching network traffic to a lot active connections and its ECMAscript, the most sweet sugar language ever made (the last statement is personal opinion).
There are probably hundreds of valid use cases for Node.js, obviously there is no specific task were it is a "must use", but thats the same rule for any language most likely. Its fun, its fast, dig into it.

Possible/Plausible to build a program with multiple languages? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is it plausible(and/or practiced) to build a large piece of software, for example Altera Quartus II, using multiple programming languages? Meaning, the menus for the software are coded in c++ and maybe the core functional interface that the user interacts with most is built using java. Is this even possible? If so, what are the drawbacks/benefits of doing so with large pieces of software?
It is possible and practiced, however it is advisable that the core of your application is build in a mid-level programming language like c++ for performance, while the front end part and any utilities and interfaces to the core can be built using some other language like javascript.
Take a look at the Mozilla browser which is an example of c++ core with javascript UI.
Your question is about whether it is possible: the answer is it is. However I will try to extend a little bit by saying that your challenge in building an application with c++ and java would be the communication between the two parts of your application. You would need some kind of an intermediate like xml in order to do that.
It is possible to build applications from multiple languages, for instance, you could have your front end coded in C++, the back end written in Java and you use JNI for communication.
Although such an application allows you to exploit the features of each language, it requires developers to have expertise in multiple areas or have multiple developers, each of which can increase the cost of the solution being delivered.
Also, nowadays most compilers tend to optimize the code during compilation, so developers do not try and find micro optimizations which allows them to tweak every aspect of their code, unless they are writing something along the lines of AutoCad or Photoshop, each of which require a relatively high amount of system resources.
Another problem with solutions having multiple languages would be how to make them communicate together (sockets, shared memory segments, pipes, etc) so that would be another layer of complexity.

why java number one? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Why is Java the most used programming language ? Why are the most programmers jobs for Java ?
Don't get me wrong here ? I like Java and I work in Java ? I don't have anything against it ?
Also, I'm trying to learn some other stuff out of the OOP box, like Clojure with its functional programming.
But, I'm wondering, why is Java number one ? I mean, dynamic languages (Ruby, Python, Php, JavaScript) people says that static types languages (Java, C/C++, C#) people envy them for their productivity ? They say they get the job done faster...
Ok then, if dynamic languages are more productive, how come Java stands where it stands ?
It was backed by a major commercial company Sun -- which other business value when decided on adopting such things.
It continued in the syntactic tradition of C++ -- already a widely used language at the time. In many ways, it was sold as a far improved C++.
It came with batteries included -- the framework.
Superb marketing effort of write once / run everywhere (platform independence).
The fear of Microsoft's dominance at the time forced a lot of companies to collaborate in the Java endeavor, notably IBM.
I don't think other languages on your list had these qualities (even if I fall into the dynamic/productivity camp). Arguably Python filled some of those niches at the time.
Typically it's easier for people to conceptualize in imperative languages with garbage collection (C#, Java)
Spolsky considers Java to be an easy language, he has a famous post on it.
Java is well-defined and thus easier for formal analysis efforts
Java runs on most modern platforms without massive grief
Java is "enterprisey", by which I mean it seems to be heavily adopted and developed by large corporations, which, due to sort of a best-practice risk-minimization approach, means other large corporations will also use it.
Java is taught in many universities.
Just off the top of my head...
Huge potential user base.
Large set of libraries.
Established community.
Fast VM.
Platform independent.
It's free.
It's been around for ages.
Some of the factors that have given Java its popularity are:
Its Maturity
Easiness to learn
Great API
Also, due to its philosophy of "Write Once Run Everywhere", Java programs are extremely portable and the Java platform itself is quite mature, in terms of the kind of applications that can be developed with it; not to mention the plethora of new languages that are being developed to run on the JVM.
Remember, most used, doesn't mean better; for many purposes you'll find that Java simple falls short of a viable solution.

Future of Java and JavaFx [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I just want to know if there are any future for Java and JavaFx. Reason i ask cos' so many programming language keeps popping up. Please advise.
Here is the TIOBE Programming Community Index for July 2010:
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
You can see, Java is still the best followed by C which some folks out there say it is such a dinosaur these days.
Agree with Rafe Kettler, languages don't die.
About JavaFX, have no idea now since I haven't use an application written in it yet but I am curious to know about its future, please let me know also.
I think Java's chances are as good as those of FORTRAN, COBOL, and LISP.
I can't predict Java's future any better than I can tell whether or not I'll get hit by a bus tomorrow. Can you?
I think that Java has a pretty good chance of continuing to exist. Java has always been great for web applications, so on and so forth. And like previous posters have mentioned, languages don't die: look at C, Fortran, etc. which have continued to exist for many decades in their fields of "core competency."
I think that Java will see consistent use as Javascript is as possible as ever, especially since Google has built the Android and AJAX APIs around Java or derivative languages.
That said, Java may need a reboot (much like C needed objects, so they made C++). So we may be seeing a J++ soon (not the stupid MS version, but a good, open source one)
There are still plenty of jobs in COBOL:
http://www.itjobswatch.co.uk/jobs/uk/cobol.do
And COBOL has been around since 1959.
But some languages and platforms do die out e.g. G-code, DBase IV and CP/M - those were the days! :)
You're kidding right? I wouldn't bet on JavaFX but Java? There is so much software written with Java of course there is a future. And which programming languages are you referring to that 'keep popping up'? Languages that run on the Java VM? Ruby? Python? (Ruby and Python have been around as long or longer (in the case of Python) than Java).

Java vs. PHP Speed Comparison [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Which language is faster for web, Java or PHP?
It is a difficult one to answer as in theory Java should be faster:
it's precompiled, any trivial algorithim will run faster in Java than PHP and there has been a vast amount of work done to optimise Java from improving the code, standard libraries, to JIT compilers, etc.
PHP is loaded and interpreted every time if you're not using the Zend optimiser, objects are intialised on every execution, even the most trivial string varaible is actually a complex object with many methods to support.
The problem is that in practice PHP sites seem to run faster using fewer resources.
I think this is because PHP developers take a more straightforward approach to design and don't get lost trying to implement exotic design patterns and implementing endless pointless abstractions.
Speed doesn't matter
in most cases.
Processing is cheap. Code in what you're comfortable with. Writing proper code goes much further for speed then choosing a language. Solid coding conventions and design plan will also help more.
Best answer I could find
"stuff to consider:
Java web applications are compiled
to bytecode. Even JSPs, which are
compiled at runtime. This is an
advantage over most uses of PHP,
where the Zend Optimizer is not in
use.
Data can be cached in a live servlet
instance - no direct/easy way of
doing this in PHP to my knowledge
(there is only ever a single
instance of a servlet/JSP in memory)
If anybody knows how to cache data in PHP without resorting to ugly
hacks, please enlighten me!
Java applications tend to be
n-tiered, which generally results in
a more maintainable application at a
slight performance penalty. This
probably sounds trollish, but
honestly: even within Java itself
direct use of JDBC will always be
faster than going through three
layers of objects to the database.
But is an n-tiered Java application able to hit the database sooner than an uncompiled, hacked-up monolithic PHP script? I don't think there's an answer to that question.
All that said, I'm working on an n-tiered MVC framework for php 5 (it's called Pure (http://www.sf.net/projects/php-pure)), so my PHP applications are generally n-tiered too. I'll worry about speed when and if it becomes an issue. For now, it's definitely not an issue."
courtesy of krumms
Speed aside, I believe the performance of Java is better than PHP. But developing a project in PHP is faster.
Can't answer this question with one or the other unless you define what you want to measure the speed of.
Some things are much faster in PHP (in a native function for example), other things are much faster in Java.
The intent of each language is substantially different from the other, so if you're debating over which to use for a particular task, you should generally based the decision on that task (and how well suited each language is to it) rather than performance.
For raw performance of code written in the language (as opposed to simply calling code in the standard library), Java will probably run faster than PHP as an extremely general rule. If that matters, chances are that PHP just isn't very well suited to the task at hand.

Categories

Resources