RESTful API with either Tomcat or Node.js? [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am at a decision fork where i have to pick whether to use Tomcat or Node.js in my project and need advice from experts on this.
Some questions that i have here are:
Is Tomcat (Java) or Node.js with Typescript better suited to write a RESTful API which gets values form a Database and has to interact with a another java component?
Does Node.js have unit-testing support?
Is it possible to use websockets with Tomcat for another component of the API which pushes Data to the client?
Is the type system of Java better than the system of Typescript (not all dependencies are available in Typescript (or?) and therefore don’t have types?)?

Tomcat and Node.js are really totally different from each other, so there is no one to one comparison.
While Tomcat is a web server, Node.js is a server side runtime environment - and therein lies all the difference. Java - and consequently the web and application servers supporting it - give an architectural foundation to your application which arguably no other technology can offer. On the other hand, the speed, flexibility and simplicity of JavaScript (and therefore Node.js) is a winner.
So the real question you should be asking is - do you want a robust application with solid foundation or a speedy, flexible solution?
There are also a slew of other factors to consider such as memory, performance, maintainability, and the likes.
Here are some links that might help:
Performance comparison
Java vs. Node.js:

Yes Tomcat Support websocket in tomcat. If you have already some written component in java you should use java.
You can use jersey , spring boot to implement your rest webservices.
If you are working with nosql kind of databases then nodejs could be better bet

Related

Creating a server side for android application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm currently making an android application that will be used by a certain number of clients. Each client will have an account and will access information from the server. This information is stored in a DB.
My question is what is the best way to create a server side that will, later on, be compatible with other platforms (iOS, Windows, etc.)?
Can I use sockets on different platforms? Or should I create a Web Service?
I found a certain tutorial that I think is explaining a similar thing, but I think it demands a certain amount of knowledge, and I'm totally new to this, and haven't learned this at faculty (I'm good with sockets but I never had much confidence in them, and the idea of sending HTTP requests to the server looks much better).
Can someone divert me to a tutorial or lectures of how this is supposed to be done?
Connection between Android and a server would most easily be done with http requests.
There are several libraries available who make this easy like Retrofit.
For server-side applications you can take a look at Jersey in combination with a tomcat server.
There are of course many applications who can do these... so it comes down to a matter of preference.
There are many web development frameworks that works on many platforms such as spring, vertx, play and many others to name. You can you create rest like api for this purpose. Give all the low level works to the framework. You should not worry about low level details as most off them are handled by frameworks today.

Dynamic website framework suggestions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
What are the open source java based frameworks that can be used to build a dynamic websites?
The dynamic website should allow users to change content in the site. I am not looking for a portal solution, but something lightweight and customizable.
I would recommend Play! Framework. I have worked with it before and it is pretty easy to learn. Extensive tutorials and documentation are on their website.
Because of Play's extensibility, there are many modules for it, one of which is a lightweight CMS module. I have not used this module, but it sounds like what you might be looking for.
Search about Spring MVC or JSF.
Really every Java web framework can be used to create dynamic sites. That's pretty much the entire point of using Java and such frameworks.
If you only needed to serve static content just Apache would be all you need,
There is a bewildering choice of web frameworks in Java. Everyone will tell you theirs is best and all others are bad.
My 2 cents; JSF is one of the most popular choices, rather easy and has lots of support and resources available for it. It's already part of the standard Java EE library, so in most cases you don't have to download or install anything to get started. Any Java EE implementation (JBoss, Glassfish, Resin, Geronimo, etc etc) will do. The only exception is Tomcat.
While there are other choices that also work, it's hard to go wrong with JSF.

Which is the prefered CGI technology? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to develop a CGI application that has to run under Windows and Linux (IIS and Apache)
What is the best technology to do that?
I would prefer Java, but I am not sure if there is a problem with Java in an IIS.
Any experiences?
Completely depends on your application what
What load are you expecting
How complex will it be.
Where will you store the data
How secure does it need to be
How skilled are you or your developers.
What languages are you familiar with.
For a simple web app its hard to beat Vanilla php, using the LAMP stack with sqlite. As php will let you do almost anthing almost anywhere you need to be disciplined about how you structure your code -- but otherwise its a good solid working environment.
At the other end of the scale are the J2EE behemoths Weblogic and Websphere. These are monsters in terms of complexity and learning curve but if you are planning on 100s of transactions per second, in a secure environment with bullet proof reliability -- and you have deep pockets -- nothing will beat it.
The only sure answer form you post is IIS, ActiveScript .NET is out of the picture if you want to deploy under *nix or anything other than windows.
For plain CGI, Java's startup time is going to be a killer when the process forks. It'll be frustrating even for the low loads you're expecting.
I would, honestly, recommend you use Python for this instead as it will have the right balance of startup / execution speed and "batteries included" features for CGI development.
Here's a link if you're intersted: http://docs.python.org/library/cgi.html
java and CGI is not a good match! If I really had to do a CGI then I would go wit Perl CGI module. Perl should work with IIS too, but I cannot confirm this.

How to scale Java app in the cloud automagically?, or, is there a Heroku for Java? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I recently came across Heroku, which looks extremely cool. You just upload your app and you're done; it scales without further intervention. Unfortunately, Heroku is for Ruby and our app is in Java.
It's a webapp, implemented as a .war file. We want it to scale automatically across clusters of servers maintained entirely by other people.
We've spoke to Rackspace. They have "Rackspace Cloudsites" which does this for Wordpress. They have no intention of supporting Java app servers in this way.
What else is out there?
The key to scalability is not the infrastructure (only). You can use various cloud offers:
Google App Engine
Amazon EC2
Heroku
CloudFoundry
VMForce (upcoming)
etc..
But if your application is not inherently scalable, the cloud won't help you.
In fact, strictly speaking, scalability is a property of the application, and it means that the application starts supporting higher load by simply adding hardware. The cloud offers you the "adding hardware" part. The rest is your responsibility.
Now, how to achieve scalability of your application is a huge topic. High scalability is a good resource for such articles.
Now Heroku supports Java. Great value for service/price :)
Take a look at Google App Engine. In your case, the App Engine Java Overview will be helpful. You can also build App Engine applications using Python.
Google App Engine does this. It's all Java and Javascript (converted from Java when needed) too.

Which SOA architecture is most appropriate for a Java application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am currently working on a pretty large Java 6 application where we are looking to split some of our functionality out into a service oriented architecture.
It seems that the primary SOA framework for the application space is OSGi and I have been looking into Felix and Knopplerfish but I wanted to make sure that this isn't my only option.
Does it make sense to use an actual web service protocol for our application like SOAP, even though we are not building a web app? Is this even acceptable?
Have any of you used an implementation of OSGi (Felix, etc.) with your desktop application? if so, how did it go? Do you know of anything better?
We're all pretty new to SOA here so any help would be greatly appreciated.
My company uses OSGi extensively, and it works well for us, in that we can version various components and have greater control over what gets exposed from each component.
If you envision ever wanting to run different components on separate hardware, then writing using web services (REST/SOAP/etc) makes sense. But there's a performance penalty in both sending bits from one process or network to another,and serializing/marshalling that data so it can be sent, and doing the opposite on the other side. If you don't ever think that will happen, then don't use web services.
We use Eclipse RCP as our application platform, which is OSGi based (Equinox). Our application makes usage of both the Eclipse plugins as well as pure OSGi bundles. In our case we have services that are both local to the application as well as remote (via Spring Remoting) to Java EE servers.
In your case, OSGi may make sense for your app, but remote service protocols don't.
Also, a desktop application on its own is not considered SOA. You are simply componentizing your application, which is a good thing.

Categories