Page 1 of 2

Java ( was: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 9:26 am
by oren
SmoothOper wrote:Also it seems to be fairly high centered on Java as a technology, which is also a limiting technology in many ways. IE the authors of the software are unwilling to go that extra mile to make the best possible product, and it shows in the basic usefulness or functionality of their product.


As opposed to what? The truly popular go servers for desktop only provide a Windows only client which seems to be much more limiting.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 9:51 am
by SmoothOper
oren wrote:
SmoothOper wrote:Also it seems to be fairly high centered on Java as a technology, which is also a limiting technology in many ways. IE the authors of the software are unwilling to go that extra mile to make the best possible product, and it shows in the basic usefulness or functionality of their product.


As opposed to what? The truly popular go servers for desktop only provide a Windows only client which seems to be much more limiting.



Not true, I have an IGS client on my iPad and on my windows machine. The problem is that writing one client that works everywhere will always limit the application to the functionality that is universal across platforms, so for example it won't be using touch technology on the iPad since it isn't implemented on a windows platform, and the windows platform will start noticeably slower and use more memory that is necessary due to the JVM being convenient for the programmer but inconvenient for the users. This is what I am talking about when I say Java programmers are not committed :blackeye: to going the extra mile.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 10:02 am
by ProtoJazz
I really dont know what you mean about limitations in java. Even the new GoPanda client is in Java, And it looks pretty cool. Everything seems to be moving
more towards cross platform (Something like java) Or web based (Like Kaya)
The only real drawbacks to something like Java in a programming sence is that it is dificult to micro manage your resorces. Something a game would need
to be able to run on a mid range pc, while still running the latest DirectX. Go doesnt really need that, It has more then enough resources to run great
without the need for such heavy optimization. C++ is not as common as it used to be, and outside of very specific stuff C isnt really used for programs,

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 10:04 am
by Mef
SmoothOper wrote:Not true, I have an IGS client on my iPad and on my windows machine. The problem is that writing one client that works everywhere will always limit the application to the functionality that is universal across platforms, so for example it won't be using touch technology on the iPad since it isn't implemented on a windows platform, and the windows platform will start noticeably slower and use more memory that is necessary due to the JVM being convenient for the programmer but inconvenient for the users. This is what I am talking about when I say Java programmers are not committed :blackeye: to going the extra mile.


Just thought I'd mention, there is an android application for KGS that works rather well on tablets and phones.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 10:19 am
by SmoothOper
ProtoJazz wrote:I really dont know what you mean about limitations in java. Even the new GoPanda client is in Java, And it looks pretty cool. Everything seems to be moving
more towards cross platform (Something like java) Or web based (Like Kaya)
The only real drawbacks to something like Java in a programming sence is that it is dificult to micro manage your resorces. Something a game would need
to be able to run on a mid range pc, while still running the latest DirectX. Go doesnt really need that, It has more then enough resources to run great
without the need for such heavy optimization. C++ is not as common as it used to be, and outside of very specific stuff C isnt really used for programs,


Who is going to buy a high end computer just to have java make it behave like a mid range machine. I don't care for waiting for my clients to start the JVM, and I prefer to be able to do other things while I play go, or at least have them running in the background. Browse the internet, listen to music. Check my email etc. The lack of sophistication for managing resources means there are many programmers out there who can do it without thinking so much, and quite frankly we wished they would quit shipping borky products :roll: that consume so much resources and make the multitasking machines run so slow.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 10:23 am
by oren
SmoothOper wrote:Not true, I have an IGS client on my iPad and on my windows machine.


This is why I wrote "for desktop" in my message. Some provide special clients for iOS and Android.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 10:25 am
by Uberdude
SmoothOper wrote: I prefer to be able to do other things while I play go, or at least have them running in the background. Browse the internet, listen to music. Check my email etc.


I play (or chat/kibitz/idle) on KGS whilst listening to music, browsing the internet, watching videos, checking email etc. I have an 8-year-old bog standard PC.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 10:28 am
by SmoothOper
Uberdude wrote:
SmoothOper wrote: I prefer to be able to do other things while I play go, or at least have them running in the background. Browse the internet, listen to music. Check my email etc.


I play (or chat/kibitz/idle) on KGS whilst listening to music, browsing the internet, watching videos, checking email etc. I have an 8-year-old bog standard PC.



And of the tasks you mentioned how many were in java? Have you ever tried to run multiple java programs at once?

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 12:42 pm
by Phelan
SmoothOper, I never had any problems leaving KGS open in the background while using other Java apps.

I was going to ask if you had any data on java slowing down a high-range machine to mid-range, but this is already becoming a Java discussion thread instead of what it started as. If you want to continue the discussion, we can move it elsewhere.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 1:01 pm
by SmoothOper
Phelan wrote:SmoothOper, I never had any problems leaving KGS open in the background while using other Java apps.

I was going to ask if you had any data on java slowing down a high-range machine to mid-range, but this is already becoming a Java discussion thread instead of what it started as. If you want to continue the discussion, we can move it elsewhere.


I have had trouble running multiple java programs. You either have to run multiple JVM's or run multiple programs in the same JVM, in the former case each invocation requires a standard gigabyte of data in overhead. If you are lucky enough that your Java programs can run on the same version of JVM, 1.5, 1.6, 1.7 ... then they can run in the same invocation, however the JVM doesn't implement kernel threads so if a program uses threads it can starve the other Java programs, and we all know Java programmers have mouths to feed too.

My assertion is Java programs are written in Java for the convenience of the programmer not the convenience of the user, if KGS developers had taken the effort to write an application with users in mind it may be more popular and require fewer hardware resources on the server side so that there would be more profit. Amongst other problems that KGS may have turning a buck.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 1:45 pm
by quantumf
SmoothOper wrote:I have had trouble running multiple java programs. You either have to run multiple JVM's or run multiple programs in the same JVM, in the former case each invocation requires a standard gigabyte of data in overhead. If you are lucky enough that your Java programs can run on the same version of JVM, 1.5, 1.6, 1.7 ... then they can run in the same invocation, however the JVM doesn't implement kernel threads so if a program uses threads it can starve the other Java programs, and we all know Java programmers have mouths to feed too.


Just to address a couple of the falsities above

In general, you cannot run multiple java applications in the same JVM. One notable exception are application servers like Tomcat, which host multiple concurrent applications, but these are not standalone applications, and have to engineered in a very specific way. I'm aware of no widely used equivalent that will do the same for arbitrary desktop applications.

Java applications, regardless of the version they were compiled with, will usually run in a more recent version of java (i.e. something compiled in 1.5 will run in a 1.7 JVM). Write once, run anywhere.

There is no "standard gigabyte" overhead. Java applications can consume a lot of memory, true, but there's no gigabyte minimum. KGS right now is running 110 megs for me ("Working Set Memory") in Windows 7 64 bit. A lot, to be sure, but hardly a gigabyte.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 1:57 pm
by SmoothOper
quantumf wrote:
SmoothOper wrote:I have had trouble running multiple java programs. You either have to run multiple JVM's or run multiple programs in the same JVM, in the former case each invocation requires a standard gigabyte of data in overhead. If you are lucky enough that your Java programs can run on the same version of JVM, 1.5, 1.6, 1.7 ... then they can run in the same invocation, however the JVM doesn't implement kernel threads so if a program uses threads it can starve the other Java programs, and we all know Java programmers have mouths to feed too.


Just to address a couple of the falsities above

In general, you cannot run multiple java applications in the same JVM. One notable exception are application servers like Tomcat, which host multiple concurrent applications, but these are not standalone applications, and have to engineered in a very specific way. I'm aware of no widely used equivalent that will do the same for arbitrary desktop applications.

Java applications, regardless of the version they were compiled with, will usually run in a more recent version of java (i.e. something compiled in 1.5 will run in a 1.7 JVM). Write once, run anywhere.

There is no "standard gigabyte" overhead. Java applications can consume a lot of memory, true, but there's no gigabyte minimum. KGS right now is running 110 megs for me ("Working Set Memory") in Windows 7 64 bit. A lot, to be sure, but hardly a gigabyte.



There is a default setting, which may be interpreted as standard. http://stackoverflow.com/questions/4667 ... determined 2GB WOW! that is as much memory as my machine has. I wouldn't trust anything a Java programmer says, because I was being nice and giving them the benefit of the doubt, but gee whiz two gigabytes that is like twice as many as one gigabyte. Even a Go player can do that math ;-)

They also used to ship Java in high priority mode, so that they could fake Java being comparable to C programs in speed, by starving the OS and the other programs of CPU cycles. MS fixed that, but man is that not nice(where nice is a technical term for a program that insists on running in high priority mode when it doesn't need to). Please set the record straight by all means.

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 2:43 pm
by hyperpape
Let's just say that you're about to get called on a very creative reading of that post.

*grabs popcorn*

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 3:24 pm
by Mef
hyperpape wrote:Let's just say that you're about to get called on a very creative reading of that post.

*grabs popcorn*


Well, while your popcorn is still warm....

SmoothOper wrote:
There is a default setting, which may be interpreted as standard. http://stackoverflow.com/questions/4667 ... determined


The exact quote from your own link:

In the J2SE platform version 1.4.2 by default the following selections were made

initial heap size of 4 Mbyte
maximum heap size of 64 Mbyte

For Java 5 if you have greater than or equal to 2GB:

"maximum heap size: Smaller of 1/4th of the physical memory or 1GB"

Re: How does a go server like KGS/Kaya keep running?

Posted: Fri Sep 28, 2012 7:01 pm
by SmoothOper
Mef wrote:
"maximum heap size: Smaller of 1/4th of the physical memory or 1GB"


Lets see how many of those JVM's you can get running on a 2gig box hehe...

Sure I may be wrong on the specifics, but anyhow if you look at it java programmers don't look very good.