Are there any drawabacks using JAVA over http protocol to the regular web(http/html) protocol? As in more Resource usage when running from controller as i.e. is the case with TruClient? I understand that using JAVA over http involves to import .jar files into the script location, thus at least demanding these .jar files to be on the Controller during a loadtest?
I guess you could say that JAVA over http offers a better/more control over the AUT if the person develping/enhancing the script is a JAVA developer and not a C developer as is the case with standard http/html vuser script? Any other pros or cons of using JAVA over HTTP/HTML? I am curious because I want some (JAVA) developers enhancing a script for me and http/html scripts is not favourable as it requires C programming skills.
Java vs HTTP for web virtual users?
HTTP virtual uses weigh less
The inclusion of Java adds a lot of complexity to the setup
Versions of LoadRunner support specific versions of Java. As soon as you get a mismatched setup a lot of the dark magic gremlins appear and you have lots of issues with the execution of your tests
JAVA over HTTP
see http://www.youtube.com/watch?v=cr4RUlIOVOw
Related
I have a .NET Core (console) app that I would like for a Java app to depend on. Essentially I would like to be able for the Java app to invoke a multi variable method in the .NET Core app and then pass the result back to the Java app. It would be nice if the .NET Core app could be embedded in the Java app. I have previously seen .NET Framework specific solutions to this problem, but since this would only be relevant on Windows, I would like a solution that also works on Linux.
In the past there were some technologies such as IKVM.NET and COM Interop wrappers but the former is defunct and the latter probably wouldn't work on Linux.
Since you own the .net core code, I would take a more modern microservice approach. I would design the .net core app to be a REST API running as a console app listening on a port. I'd have the Java application spin up the console app, invoke the methods passing JSON back and forth and then spit it down when complete.
From my actual knowledge this nuget package JCOBridge is able to do what you are asking for.
Until now it supports linux for x64 architecture.
I tried the templates available on Templates and them works on my Ubuntu 18.04. The same templates works on Windows.
I'm on a student research team currently working on a Java project in which we want to be able to gather some info about specific external programs in CentOS 7. Some potential examples of data we might want to gather would be the URL from firefox, or the coordinates from Google Earth. Thus far, looking into how to implement this has mostly led me to using JNA and ptrace.
Is this a good route to take to tackle this problem? And if so, what can I use to find the location of specific information about the programs in memory?
JNA and ptrace are quite low level things. To run system applications you should use:
exec method of Runtime class
Apache Common Exec
Last one is more useful.
But it seems you don't need to run any application at all. To get information from Google Earth you can just use special web API - Google Maps APIs Web Services. If you want to send HTTP request you should try Apache Http Client. It's very powerful library and i'm pretty sure it's all for you need.
PS. More convenient client Java Client for Google Maps Services
PS1. I think java is the worst choice to work with OS and native applications. I see 2 ways to use it:
write agent on C/C++ which will be gather this information for java manager. It's a hard way
use hacks and tricks like here is there a way to get the url from current tab in google-chrome or here Possible to catch URLs in linux?. It's more easy but you will have restricted amount these hacks. And it will work not for all applications and cases.
I am new to java web development.
Currently I'm learning technologies such as Servlets, Jsp, and Java Frameworks like Spring etc.
I was wondering that as an end user say for a java web-site without applets, would the user of the website be required to install java in his/her machine?
Because it seems that in the case of Servlet and Jsp all execution is done at the servers end and only the result is sent back to the user in html format.
Please correct me if I'm wrong.
As you suspect, Java is only run on the servers. It is the language that accepts an HTTP Request and processes it, issuing out an HTTP Response. As with most good coding practices, this means that the server program is returning a response that is, essentially, text. The implication here is that you can write the server in any sort of programming language, or set of languages, without the browser needing to know what or why.
Thus, the browser is agnostic to the languages you use on the server.
Java Applets are different; they are compiled Java code that is downloaded by the client and run inside a local JVM. For this to work, the client requires Java to be installed. Applets can be quite small - invisible even - and thus malicious sites can use them on unsuspecting browsers to do wonky things. For this reason people are concerned about Java security holes that would allow applets to do more than they should.
You are correct. The java is executing on the server. The user would only have to install java if the application served applets, which as you say, is not the case here.
No need to install java at end user(client).
Because HTML renderkit return html format.
But if his or her need to developed , java is need.
hi you need to install jdk if you want to develope any java project,the jdk itself contains jre( java runtime environment),,
you can prefer below link
http://www.journaldev.com/546/difference-between-jdk-jre-and-jvm-in-java
You do not need your client systems to have Java installed.
The news about disabling java in web browser was due to some security vulerabilities in the current release (which Oracle said they will fix in October release). But you do not have to worry about it since you do not have applets in your web site. The clients would need java jre installation if you have such plugins as applets
Http is a stateless and text based protocol. That means Http protocol is not able to remember its previous state and this can not hold any state of execution.Its a text based protocol so medium of exchange of information or data over this protocol is text.
Main issue with this protocol is that it can handle only one request at a time and send response to user in same manner. But in current time user requirements have changed dramatically. So Http can not handle so much requests at a time as well as cant managed to send multiple response. So Here Java EE and web servers comes into effects
Web-servers provide an environments where a web-applications(servlet,jsp,Java EE) can run,executes and send responses to the client. Web- servers perform task such as:
1: Handle a Http-requests and in the same way send the responses to that requests.
2: Since, Http protocol only understand text so , Web-server parse the request as a text,then process it and then transform that response again into a text and send it to the client server.
3: Provide an environment where web-applications ,request-response and other services can run flawlessly,dynamically and with strong security undergo.
4: And last but not the least, these web-servers are designed and developed in pure java and run it thread-model so you trust your application is in safe hand.
And applets runs in different way, client side at least need JRE to provide an environment to executes an applets. Applets are differs from web-technology.
I have long background in enterprise engineering, abut as circumstance has it have have found my role changing. I have been tasked to lead a quantitative finance group, performing time series evaluation of proprietary data.
Our application stack (on the engineering side, which I have no influence on, but yet need to interface with) is JAVA (or SCALA) to Hibernate 3.x (annotations and xml) running on tomcat. Tons of experienced software guys...
I need data from them for two functions
research (i imagine pulling straight from the DB)
as parameters to any algorithms developed (described below)
My team is mostly folks with math and computational finance degrees, a couple w/ limited java experience (I have considerable .NET experience as well).
We are tasked to:
developed (multiple) algorithms that generate discreet trading signals (events) out of our underlying data
apply those algorithms to events coming from our web applications in real time
raise any trading signals (events) back to the application stack as they occur
a. display events visually in the application
b. send events to clients over the internet (somehow)
The best case is that any tool (MATLAB) used for the purpose of algorithm research and development, will also be used in the production environment - and be completely integrated to our production systems (as a listener to events, and then again as a source of events feeding back in).
The worst case is that any algorithm we develop needs to be reimplemented in the JAVA/SCALA space for integration.
My questions are
is matlab integration with java sufficient for this? They are not using an application server (like JBOSS), so i guess each tomcat machine is logically and physically its own JVM instance. So I don't see any JVM constraints (as in MATLAB owning its own instance) as a major obstacle
has anybody interfaced matlab to a database over Hibernate?
does .NET a better choice for interfacing with matlab? If so which features does it offer that java integration does not?
what capabilities are there in Matlab to "compile" your work into modules, and add to standard unit testing and automated build processes (ie HUDSON)?
Thanks
MATLAB's Java integration is sufficient for your aims. There is no issue in using
Java classes from the MATLAB JVM interacting with JBOSS as well.
Yes through JBOSS.
Never touched .NET, but you won't get the seamless support as seen for Java. Using Java you may use MATLAB as Java scripting engine, similar to projects like Groovy, or use instances of proxy classes using api calls.
Use MATLAB Builder JA in order to generate Java classes from your MATLAB code. The compiled code may be tested with any black box testing tool.
Regarding #4: For testing inside the MATLAB environment, I recommend Steve Eddins' test framework: http://www.mathworks.com/matlabcentral/fileexchange/22846
We are occasionally in a position to take over PHP based projects, but as we are a Java-house we are searching for ways to turn a PHP-project (or codebase) into a Java-project.
The approaches we came up to work in a mixed Java/PHP context are :
PHP in frontend and Java in backend with separate front (PHP+JavaScript) and back (Java+SQL) teams
using both technologies in a Java webapp, for example via Quercus with one or multiple teams
migrating everything to Java
We haven't tried any of these approaches as we've been lucky enough to have enough Java-only projects to work on.
Do you see other approaches, or have you tried any of the described approaches?
I've used Quercus. I think that if it supports something like Drupal then it's probably fairly mature. If your PHP app works out of the box, then it offers you a very gradual upgrade path to Java since you can write your own plugins in Java and expose them to the PHP layer, such as using a JDBC back-end.
How easy it is all depends on how well separated the layers are in the PHP application. For example, if the view layer is well separated, you might be able to replace both controller and model logic with a Spring MVC application that uses a 'QuercusView' for the view - you may be able to re-use a lot of the PHP view logic.
You should also consider how you can make a survey of the PHP code - maybe a script that extracts all the function calls, imports etc. so you can quickly test the Quercus support for them.
Sorry, I haven't used the PHP-Java bridge, but I think the Quercus library is pretty mature these days, so that would be my first choice for a staged migration.
My experiences with Querces are not so good. Maybe it has improved, but when I tried it something like two years ago (a long time, I know) it was far from complete and did not support all functions yet. Also, if your application is using some extensions (e.g. from PECL) you will experience difficulties getting this up and running under Querces.
We're currently in the process of migrating a web application from PHP to Java. We're designing a SOA and we'll probably replace some data access objects in the PHP application with a version that talks to internal webservices. Currently we're using Thrift as protocol for our internal webservices, a framework that also has a client available for PHP. We expect this to increase flexibility during migration (allowing us to do step-by-step migration, rather than all-at-once)
PHP/Java Bridge may be of your interest:
The PHP/Java Bridge is an
implementation of a streaming,
XML-based network protocol, which can
be used to connect a native script
engine, for example PHP, Scheme or
Python, with a Java virtual machine.
It is up to 50 times faster than local
RPC via SOAP, requires less resources
on the web-server side. It is faster
and more reliable than direct
communication via the Java Native
Interface, and it requires no
additional components to invoke Java
procedures from PHP or PHP procedures
from Java.
NUMITON may be useful for you:
http://java.dzone.com/announcements/automated-translations-php-jav
The shortest route from PHP to Java
Numiton offers an automated alternative to migrating PHP codebase. This way,
established applications can benefit from the advantages offered by Java in its
enterprise-level capacity.
Some of the risks inherent to any software migration are avoided by using an automated
translation tool. Our PHPtoJava product performs variable type inference,
objectualization and other operations in a uniform manner, the resulting appearance and
behavior being identical to what the users already know.
Of course, the human factor still plays an important role in the post-translation
phases: application fine-tuning and functional testing. The speed and accuracy of the
entire process surpass however those of a manual translation.
One of the applications we have migrated this way is the well-known forum engine
phpBB. The translation result, nBB2, powers our own forum and was recently donated to the
open-source community as a SourceForge project.
PHP in frontend and Java in backend
with separate front (PHP+JavaScript)
and back (Java+SQL) teams
This is technically feasible using SOAP.
using both technologies in a Java
webapp, for example via Quercus with
one or multiple teams
I have no idea about this
migrating everything to Java
This is better option, but it will take time depending on the size & complexity of your project.
I do not have any experience running PHP inside a JVM, but I am betting that IBM does. :)
You might consider Project Zero.
http://www.projectzero.org/php/
Seems similar to Querces or that other thing someone linked. The only other thing that you didn't mention that I can think of is to refactor the PHP code because I'm assuming that its an older codebase written in a PHP 4 manner.
I know this is 2 years old question but i still want to contribute. We are migrating from full java portal to php+java. We have 14 million users. This design doesn't need web services because we use java as json provider for php and js. We will see the result soon...
PHP in frontend and Java in backend with separate front
(PHP+JavaScript) and back (Java+SQL) teams