![]() |
|
|
|
#11 |
|
On Wed, 28 Oct 2009 14:13:41 +0100, Simon <>
wrote, quoted or indirectly quoted someone who said : >Dear all, > >I am looking for ideas, patterns, practices to develop a client/server >architecture that can be used to update clients when a new release is >uploaded to the server. Does anyone know any web resources considering >this topic? (WebStart is not what I want.) > >(Yes, I know Google, but "update sever java" is not a good query string > >Cheers, >Simon See my student project outlines: http://mindprod.com/project/deltacreator.html http://mindprod.com/project/prebrand...arerental.html http://mindprod.com/project/autoupdate.html -- Roedy Green Canadian Mind Products http://mindprod.com When your language is nowhere near Turing-complete, syntactic sugar can be your friend. ~ Eric S. Raymond (born: 1957-12-04 age: 51) The Cathedral and the Bazaar Roedy Green |
|
|
|
|
#12 |
|
Posts: n/a
|
> Why must you bundle the JRE?
> > Why can't the user use their own? Because people don't know what a JRE actually is? Telling the user to go to Sun's web page and try to find the suitable download for their system will loose half the people on the way. (Of course those who do know can download an unbundled version.) I wasn't aware of the deployJava.js script Andrew mentions. That may solve the problem. Cheers, Simon Simon |
|
|
|
#13 |
|
Posts: n/a
|
Andrew Thompson wrote:
[some good examples and links] I wasn't aware of these things, thanks Andrew. I may change my mind about, can't guarantee the rest of us will, however Simon |
|
|
|
#14 |
|
Posts: n/a
|
Thanks all for your answers. Mabe I'll change my opinion on JWS.
Some more things: - I know that you can specify heap size with JWS. But is it possible to set the heap size to some percentage of the free memory (at the time it is launched)? - Is it possible to let the user define a heap size from inside the application? (Not inside some JWS configuration tool?) - The application consists of two parts, one with a GUI and one command line version. The latter will often be scheduled by cron or some other tool on machines that may not even have a display. Will the user have to enter "javaws -something" as the command to be executed by its scheduler or can I provide some less confusable executable? At best this executable would not be placed somewhere deeply hidden in a JWS directory. - In the task manager on Windows, what do you see when you launch a JWS application? "javaws" or the application name? Best, Simon Simon |
|
|
|
#15 |
|
Posts: n/a
|
Lew wrote:
> Simon wrote: >> - I know that you can specify heap size with JWS. But is it possible >> to set the heap size to some percentage of the free memory (at the >> time it is launched)? > > It isn't necessary or useful. On many OSes, such as some Linuces, there > isn't any "free" memory. The OS fills it all with program pages and > caches, swapping out as demanded. You might see 50 KiB of "free" memory > yet safely can allocate 1 GiB of heap. > This. A swap file is used on any modern OS. I can (and have) run multiple JVM instances set for 1.2 Gigs on my 2 Gig machine. Even with 10 of them running, they all work just fine. So set your heap limit to what you know works for your app, and let the OS figure it out. There may be some corner-cases where this doesn't work (netbooks? Micro edition?) but if you're running desktop apps then I'm sure that this will work for more than 99.999% of your users. markspace |
|
|
|
#16 |
|
Posts: n/a
|
>> It isn't necessary or useful.
As is any fixed number defined at deploy time. >> On many OSes, such as some Linuces, >> there isn't any "free" memory. The OS fills it all with program pages >> and caches, swapping out as demanded. On Windows, building a native launcher, this works well. > A swap file is used on any modern OS. I can (and have) run multiple JVM > instances set for 1.2 Gigs on my 2 Gig machine. Even with 10 of them > running, they all work just fine. So set your heap limit to what you > know works for your app, and let the OS figure it out. There is no such number. It is a data analysis tool. If the user decides to process an 8GB gene data file, then you need 8GB. Still, setting the heap size to 8GB in general is not a good idea since Java will simply not start if the machine does not have 8GB. More importantly, if the heap size is too large and the OS starts to swap, this is worse than getting an OutOfMemoryError. Swapping will almost freeze the app with no chance of telling the user what the actual problem is. Best, Simon Simon |
|
|
|
#17 |
|
Posts: n/a
|
Simon wrote:
> There is no such number. It is a data analysis tool. If the user decides > to process an 8GB gene data file, then you need 8GB. Still, setting the Well, you can't set an 8Gb heap size on a 32 bit JVM period. It's limited to about 1.2G to 1.4G, depending on other parameters. > heap size to 8GB in general is not a good idea since Java will simply > not start if the machine does not have 8GB. More importantly, if the Have you actually tried this? Because I don't think it works the way you say. On a 64 bit JVM, you can set 8Gb regardless of physical memory. The OS just uses the swap file for any "extra" memory that it needs. That's what virtual memory does. It effectively converts disc memory into RAM. So you can most definitely set an 8Gb heap size on a machine with less physical memory. > heap size is too large and the OS starts to swap, this is worse than > getting an OutOfMemoryError. Swapping will almost freeze the app with no > chance of telling the user what the actual problem is. Have you actually seen this kind of swapping (what most folks call "thrashing") on your app? I doubt it, because I don't think you're actually testing with a 64 bit JVM. However, if you have seen this behavior, there's garbage collector tweaks you can use to alleviate it. I'd have to dig through the docs to find them, but they're there. It might be worth checking in to if you really think you need high amounts of JVM memory. markspace |
|
|
|
#18 |
|
Posts: n/a
|
Peter Duniho wrote:
> For what it's worth, the previous poster didn't actually write "physical > memory". It might have been what he meant, but he also might have > simply meant "does not have 8GB of memory". That may be true. However, in my test, I made 10 JVM's with 1.2 Gig each as the heap limit. My swap file has about 2x my physical memory, for about 6 Gigs total. Yet I had 1.2G x 10 = 12 Gigs "allocated". The heap limit is just that -- a limit. The JVM does not go out and Bogart 8 Gig of memory as soon as you start it up, it just does not ever allocate more than 8 Gigs. So I believe that a JVM with a 8 Gig heap limit could be started on a machine with less than 8 Gigs total available. You'd just never get to the 8 Gig limit, the OS would stop allocating memory for you first. Although I admit I have not tried this. The confusion comes in, I think, when one tries to allocate 1.8 Gigs or more on a 32 bit JVM, like most desktop JREs. The 32 bit JVM cannot physically handle that much memory, period, so it issues an error message immediately. > > And when running in a VM environment, "memory" really means "disk > space". The physical memory is really just a cache of sorts; the disk The disc cache on a VM system is usually referred to as the "backing store." That's an old name, but I still see it used. The "swap file" is an implementation of the backing store. "A cache of sorts" is... not often used in the technical literature. markspace |
|
|
|
#19 |
|
Posts: n/a
|
Peter Duniho wrote:
> What OS? Windows Vista. > I admit, I don't know the exact implementation of the JVM. But I doubt > it's as you say. If it were, there would be no need to specify a limit > at all, and the default would just be the theoretical maximum size for Consider the other case: plenty of RAM, (let's say 16 Gigs RAM and 32 Gigs in the backing store) and one wants to limit JVM usage to some fraction of that. It's pretty common to allocate memory usage on large servers manually. Say, 2G for the OS, 6G for the JVM, 8Gs for the database, etc. Memory limits enforce that, without having the OS terminate a process for exceeding its limit. There was a big commotion in the MySQL users group meeting I attended when someone brought up the fact that MySQL memory limit parameters weren't accurate. You'd often get a little more or a little less memory used than you asked for. This is a big deal for the bleeding-edge database admin types, I gather. It kinda shied me alway from using MySQL too, if they can't control the memory they allocate. > That directly contradicts your claim that Java doesn't pre-allocate the > heap. In particular, the only hard limit on 32-bit Windows is the 2GB No, it just means that the JVM has compiled-in limits, and checks its parameters first to make sure they're sane. If it finds an illegal combination, it issue an error message and halts. markspace |
|
|
|
#20 |
|
Posts: n/a
|
Peter Duniho wrote:
> In other words, if you get a failure starting the 32-bit JVM under > Windows at some heap size smaller than 2GB, that's a very strong > indication that Java is in fact pre-allocating the heap. No, it has to do with address space in a 32-bit pointer. The JVM "knows" that it needs some memory for itself, so it only allows what's left over for the "-Xmx" parameter. GIYF: <http://java.sun.com/docs/hotspot/HotSpotFAQ.html#gc_heap_32bit> <http://publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp?topic=/com.ibm.java.doc.igaa/_1vg00014884d287-11c3fb28dae-7ff6_1001.html> -- Lew Lew |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PC-cillin Update Server Failure | SirOsisOfThuliver | Computer Support | 6 | 01-03-2004 04:14 AM |
| 64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! | TEL | Computer Support | 1 | 01-01-2004 02:39 PM |
| windows updates--how to tell which you need? | Viewasku1977 | Computer Support | 41 | 11-14-2003 03:34 AM |
| Win2K SP4 - what's the verdict? | Max Quordlepleen | Computer Support | 6 | 09-16-2003 11:23 AM |
| Re: windows 2000 sp4 is a must | PhilGreg | Computer Support | 0 | 07-17-2003 04:38 AM |