How is a java program which has a Server communicating with a Client implemented in practice?
Do people rent dedicated servers then run the Server class components of the java application?
Java and Servers
Page 1 of 113 Replies - 448 Views - Last Post: 24 May 2012 - 08:20 PM
Replies To: Java and Servers
#2
Re: Java and Servers
Posted 24 May 2012 - 03:29 PM
Quote
Do people rent dedicated servers then run the Server class components of the java application?
If they don't own the server then, yes, it would normally have to be a dedicated server, as a shared server, or some sort of budget configuration doesn't normally permit running Java apps
#3
Re: Java and Servers
Posted 24 May 2012 - 03:44 PM
I see, thank you.
I don't think I understand real servers because I've only ever been able to use a second computer as a 'server' for java programs.
Do most dedicated servers run java apps? I'm not sure what you mean about the budget configuration. You just have to make sure the server supports running a java program all the time?
I don't think I understand real servers because I've only ever been able to use a second computer as a 'server' for java programs.
Do most dedicated servers run java apps? I'm not sure what you mean about the budget configuration. You just have to make sure the server supports running a java program all the time?
#4
Re: Java and Servers
Posted 24 May 2012 - 03:52 PM
Quote
Do most dedicated servers run java apps?
That's a slightly different question. They mostly run web pages. Some will be web apps. Some of those will be java-powered. Running TCP/IP client server apps (which is i think what you're talking about) is rare
#5
Re: Java and Servers
Posted 24 May 2012 - 04:33 PM
Ah sorry - I meant to say are most dedicated servers ABLE run java apps.
Yes, TCP/IP client server apps is exactly what I'm talking about. So you could buy/rent a server and run the server-side-java-program? Then you could connect to the server with the client java program. I would imagine this is how something like Minecraft servers would be set up?
Yes, TCP/IP client server apps is exactly what I'm talking about. So you could buy/rent a server and run the server-side-java-program? Then you could connect to the server with the client java program. I would imagine this is how something like Minecraft servers would be set up?
#6
Re: Java and Servers
Posted 24 May 2012 - 06:12 PM
Don't restrict your scope to Java. The Client can be written in Java and the Server in C/C++ or vice-versa or any other language.
#7
Re: Java and Servers
Posted 24 May 2012 - 06:55 PM
pbl: I think I will restrict my scope to Java because I know it best
But yes I realize it could be done in other languages as well.
I'm struggling with what the server is and how it is configured. If I have a really basic TCP client/socket program like in the java tutorials (simple text client/server communication, http://docs.oracle.c...entServer.html), is it as simple as just uploading the server-java-program to a rented/bought server? Do I need a certain 'type' of server?
I'm struggling with what the server is and how it is configured. If I have a really basic TCP client/socket program like in the java tutorials (simple text client/server communication, http://docs.oracle.c...entServer.html), is it as simple as just uploading the server-java-program to a rented/bought server? Do I need a certain 'type' of server?
#8
Re: Java and Servers
Posted 24 May 2012 - 07:04 PM
"type of server" ? The principle stays the same:
- the Server loop witing for connection
- when it get one it starts a thread to engage dialog witht that client
A very very simple one
http://www.dreaminco...snippet1917.htm
A complete, but simple, chat room
http://www.dreaminco...r-gui-optional/
- the Server loop witing for connection
- when it get one it starts a thread to engage dialog witht that client
A very very simple one
http://www.dreaminco...snippet1917.htm
A complete, but simple, chat room
http://www.dreaminco...r-gui-optional/
#9
Re: Java and Servers
Posted 24 May 2012 - 07:18 PM
Ah sorry I don't think I explained it properly - I understand the code.
I was wondering what kind of hardware would be used for a server that could run that java-server-program (like what you've linked). Its not the same as a HTTP server...?
I was wondering what kind of hardware would be used for a server that could run that java-server-program (like what you've linked). Its not the same as a HTTP server...?
#10
Re: Java and Servers
Posted 24 May 2012 - 07:31 PM
Depends what your server is doing. If it is linked to a hugue database and perform complex queries or not.
If you take my chat program, accept a few hundred connections, a simple low end Linux PC should be able to do the job.
If you take my chat program, accept a few hundred connections, a simple low end Linux PC should be able to do the job.
#11
Re: Java and Servers
Posted 24 May 2012 - 07:57 PM
Ah I see, of course. I was hoping to gain some insight into what options exist for bigger programs. What would something like a Minecraft server use?
For the "depends what your server is doing" - I guess that's exactly what I want to know. What options are there for different applications? That seems like a big question haha...if its too big do you know what search terms I should start with?
For the "depends what your server is doing" - I guess that's exactly what I want to know. What options are there for different applications? That seems like a big question haha...if its too big do you know what search terms I should start with?
#12
Re: Java and Servers
Posted 24 May 2012 - 08:08 PM
You will have to run benchmarks on your application.
The world of Server (talking about hardware here) is endless from simple PowerPC to Sun (now Oracle) and HP high end servers.
I have seen HP Alpha server performing 935 transactions per second a transaction being:
- receiving a frame from the client
- querying or updating the DB
- replying to the client
these servers can be configured with 1 to 8 CPUs.
In brief, sky is the limit
The world of Server (talking about hardware here) is endless from simple PowerPC to Sun (now Oracle) and HP high end servers.
I have seen HP Alpha server performing 935 transactions per second a transaction being:
- receiving a frame from the client
- querying or updating the DB
- replying to the client
these servers can be configured with 1 to 8 CPUs.
In brief, sky is the limit
#13
Re: Java and Servers
Posted 24 May 2012 - 08:15 PM
Hmm very interesting, that's helpful! Thanks!
Do they all have more or less the same ground layer for adding software? I've been getting some results for Apache Tomcat and some others and I'm not sure how they fit into all this. Is this all ignored if I was using something like the java-server-program mentioned before?
Do they all have more or less the same ground layer for adding software? I've been getting some results for Apache Tomcat and some others and I'm not sure how they fit into all this. Is this all ignored if I was using something like the java-server-program mentioned before?
#14
Re: Java and Servers
Posted 24 May 2012 - 08:20 PM
Never configured an HTTP server in my life but for my own PC at home.
No idea on how those grab resources compared to a simple Java server
No idea on how those grab resources compared to a simple Java server
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|