One very good reason not to use JWS is that on OS X:
- users expects an app to be packaged the OS X way
- a *lot* of OS X users think that "Java sucks" (I don't
care about the reason for such thinking, I'm pragmatic and
want to make sales, not enter in some flamewar)
JWS screems "Java" everywhere... While a Java app bundled
using "Jar Bundler" and then put in a .dmg can "fly under
the radar".
These are two *very* good reasons to consider JWS unacceptable
and to 100% rule that option out.
cat flameswar > /dev/null
Another *very* good reason not too suggest JWS is that the OP
stated "WebStart is not what I want"
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.
Patterns and best practice, I don't know, but ideas sure
I've got a client-side Java app deployed on a lot of systems
and at every app startup they contact a server (which is a Java
webapp server) to verify that their licence is OK and that
they're running the latest version.
I'm not automatically pushing updates that said but in case
it helps...
The client-side app simply does an HTTP GET into which we put
the infos in a Base64-like (URL friendly) fashion:
http://example.com/Z/43QYfqvPYT7wGOAaIlftM8w_D43u7XbGC2j51W7UGh6yousIw8M0LiPa...
The info I send to the server are:
* version of our app
* JVM version
* OS
* proguard(ed) stack trace from last run if any
* etc.
Formatted in a way we have control over.
Then we zip/make-URL friendly and sent it using an HTTP GET.
The Java webapp server decodes the Base64-like then unzips
and we get all the infos we want back.
There's not limit on the size of an HTTP GET defined in RFC2616,
Tomcat by default accepts 8K GET but you can bump this up to 64K
if you wish (of course a POST would be fine too and would be more
'RESTful' but a GET is just sooo easy).
It's really amazing how much infos you can send using
zipped "strings" in a single HTTP GET request.
The client app reads the answer and there's a field that
contains the message to display to the user, if any.
If there's a message, the client-side app pops-up a message
to the user.
So it can be an automated "Version 1.07 is available" that
is displayed if user is running 1.06 or "Version 1.07 build 418
is available" if user is running "Version 1.07 build 316" and
was found affected by one of the bug that got fixed meanwhile
(we know this for stacktraces, if any, are send in that same
HTTP GET).
But it can also be message targetted to certain users. For
example we have a list of people who used to be beta-testers,
they tend to like to try "cutting edge" revisions, so we offer
them first the ability to download latest builds, etc.
You can simply drop newer builds on the server in a specific
directory and then the server chooses which message, if any,
to display to user, depending on the major/minor/build version.
Proguarded stack traces that comes back are automatically
'retraced' by our webapp server using the correct proguard-mapping
file and emailed to us as "crash logs".
New builds are simply 'dropped' on the webapp server and the
download page updates automatically as well as the response
to the HTTP GETs clients are making.
Once again we're not pushing updates automatically (but such
a scheme can be trivially modified to download latest .jar and
to use, at launch time, the latest .jar available)...
On the client side it's something like 30 lines of code, zipping,
Base64URlFriendly encoding and popping of the
JOptionPane.showMessageDialog
included
It may give you ideas
Alex