Smartclient bootstrapper (alternative downloader)

Servoy announcements

Smartclient bootstrapper (alternative downloader)

Postby jcompagner » Mon Feb 15, 2016 5:15 pm

To speed up (especially under windows) the smart clients startup, we created a bootstrapper for webstart

This by passes for the most part webstart, webstart only downloads and verifies the bootstrap.jar that is attached (and referenced in the attached jnlp file)

The downloads will go into [user-home]\.servoy\libCache\[hostname]

if 1 file changes on the server it will delete the cache and downloads it again.

The jnlp file can be fully configured what ever you like (or should be filled in correctly)

{{YOUR_FULL_HOSTNAME_AND_CONTEXT_IF_DEPLOYED_THROUGH_WAR}} : That needs to be filled based what the users sees in the browser (so host name with port and with context if the servoy app server is not deployed at the ROOT)

The rest between the <information> tag can be filled in to what ever you want.

between the <resources> tag you can specify any java version (default is only 1.8 added you can add another line that says 1.7)
and this only has a reference to the bootstrap.jar

If you sign your self then you can change anything in that jar (so including the application-name manifest property)
also if you have adjusted the bootstrap.jnlp file (can be renamed also to what ever you like) exactly how you want
Then you can add that jnlp file to the jar file under:

JNLP-INF/APPLICATION_TEMPLATE.JNLP

see: http://docs.oracle.com/javase/7/docs/te ... dJNLP.html

and then sign the jar again, this makes the jnlp file also signed so it doesn't matter at all what kind of things you use/set in it

What should also go between the <resources> tag are all the native resources of your beans/plugin.
So you you have a plugin or bean that has in its jnlp file one or more native resource like the browser suite:
https://www.servoyforge.net/projects/br ... e.jar.jnlp

Then you need to copy those over so the <resources> tags with "os" and/or "arch" needs to be in the bootstrap.jnlp file

The last thing are the arguments:

<argument>{{SOLUTION_NAME}}</argument>

the first argument should always be the solution name that you want to load (so if you want to load directly a specific solution)

You can also not specific it then the select solution dialog is shown.

You can also make profiles (that is what servoy profiles basically is, pushing arguments to the client)
Then you can add multiply arguments to the client by adding more, like adding:

<argument>system.property.SocketFactory.tunnelConnectionMode:http</argument>

as the second argument (the first should then always be a soluton or just "servoy_client")

If you add that argument then the tunnel will be forced in http mode (if the server is configured in "http&Socket)


This wya you can push any system.property to servoy that you want.
(You can also add those through the java-vm-args as -Dxxxx=y)

bootstrap.jar and bootstrap.jnlp should be copied into the ROOT of the context
So that is in a default servoy installation: \application_server\server\webapps\ROOT
in a war file it should be in the root of the war file

Then you can access it through:

http://hostname:port/bootstrap.jnlp

(and the above code base should be then http://hostname:port)
You do not have the required permissions to view the files attached to this post.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Smartclient bootstrapper (alternative downloader)

Postby mboegem » Tue Feb 16, 2016 10:01 am

As I was able to test this in an early stage, I can confirm Johan did a great job here.

A big thank you for all his patience during testing and debugging, as he had to work with us 'non Java' developers :-)
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1384
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: Smartclient bootstrapper (alternative downloader)

Postby Bernd.N » Tue Feb 16, 2016 1:24 pm

May I ask how much faster it is compared to webstart?
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 477
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Smartclient bootstrapper (alternative downloader)

Postby mboegem » Tue Feb 16, 2016 2:57 pm

Bernd.N wrote:May I ask how much faster it is compared to webstart?


It is still using webstart, but the thing that is making webstart perform poorly is checking each jar-file.
In this case it will only handle the bootstrap.jar (and maybe native resources as Johan mentioned).
The remainder of the jar-files is handled by the bootstrap.jar and will create its own cache in the .servoy folder.

So it's hard to say what the exact win will be.
But just try it, it won't hurt existing installs and current users won't know about it (and use it) unless you make them start the solution via bootstrap.
In like 15 minutes you should have finished the setup and you can see for yourself what the win will be.
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1384
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: Smartclient bootstrapper (alternative downloader)

Postby ngervasi » Wed Feb 17, 2016 5:05 pm

Does this work also in older Servoy versions?
ngervasi
 
Posts: 1475
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Smartclient bootstrapper (alternative downloader)

Postby mboegem » Fri Feb 19, 2016 6:20 pm

Hi Nicola,

I think this should work, but give it a try.
It's just 2 files and changing the codebase url in the jnlp file...
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1384
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: Smartclient bootstrapper (alternative downloader)

Postby ngervasi » Fri Feb 19, 2016 6:25 pm

Tnx Marc, I'll try
ngervasi
 
Posts: 1475
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Smartclient bootstrapper (alternative downloader)

Postby rafig » Tue Feb 23, 2016 2:07 pm

Wow!
Just tried this on a solution I was trying to clear lots of security warnings from and it works great!
Does seem faster after first launch.
I think this has helped me a great deal, thanks!
[Solution in version 7, using Java 8]
Servoy Certified Developer
Image
rafig
 
Posts: 481
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Smartclient bootstrapper (alternative downloader)

Postby jcompagner » Wed Feb 24, 2016 10:48 am

it should work on most old releases (i think even 3.5, but didn't test it)
it is quite a generic solution, i could even make it more generic and use it on all java webstart applications (but now it knows servoy)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Smartclient bootstrapper (alternative downloader)

Postby goldcougar » Mon Apr 04, 2016 5:41 pm

This seems to speed up the launch significantly (using Servoy 6.1). However, the warning dialog shows on every launch, and there is no option to check a box to always accept. Server and Client both on Java 8. Maybe missing this in the manifest?
Application-Library-Allowable-Codebase: *

Capture.PNG
You do not have the required permissions to view the files attached to this post.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Free Training Videos
Servoy Guy- Free Plugins, Tips & Resources
ServoyForge- Open Source Servoy Components
User avatar
goldcougar
Servoy Expert
 
Posts: 657
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Smartclient bootstrapper (alternative downloader)

Postby goldcougar » Mon Apr 04, 2016 8:54 pm

Update: I can confirm that adding the below to the manifest file fixes the permission issue and the user only gets the warning dialog 1 time on first launch, instead of every launch.
Code: Select all
Application-Library-Allowable-Codebase: *


Also, for Mac users, below is an example adjustment to the JNLP so it uses the standard Mac menubar instead of the menubar in the java window.

Code: Select all
<application-desc main-class="com.servoy.bootstrapper.Bootstrap">
   <argument>servoy_client</argument>
   <argument>system.property.apple.laf.useScreenMenuBar:true</argument>
</application-desc>
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Free Training Videos
Servoy Guy- Free Plugins, Tips & Resources
ServoyForge- Open Source Servoy Components
User avatar
goldcougar
Servoy Expert
 
Posts: 657
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Smartclient bootstrapper (alternative downloader)

Postby jcompagner » Tue Apr 05, 2016 1:38 pm

i will add but that is very weird

http://docs.oracle.com/javase/7/docs/te ... ifest.html

"The Application-Library-Allowable-Codebase attribute identifies the locations where your signed RIA is expected to be found. This attribute is used to determine what is listed in the Location field for the security prompt that is shown to users when the JAR file for your RIA is in a different location than the JNLP file or HTML page that starts your RIA"

and

"This attribute is not needed if the JAR file for the RIA is in the same location as the JNLP file or HTML page that starts the RIA."

and that is the case for us, the jar and jnp file all have the same location...
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Smartclient bootstrapper (alternative downloader)

Postby jcompagner » Wed Apr 06, 2016 10:24 am

I updated the zip file attached to the first post to have a bit better manifest
(so including the option talked above, i also changed the name to be a bit nicer)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Smartclient bootstrapper (alternative downloader)

Postby jcompagner » Fri Apr 29, 2016 4:39 pm

i updated the zip file again, there was a bug in the change detection when javafx was enabled
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Smartclient bootstrapper (alternative downloader)

Postby lwjwillemsen » Fri Apr 29, 2016 6:06 pm

The files in the zip file are still dated 2016-05-04 ?
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 571
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Next

Return to Announcements

Who is online

Users browsing this forum: No registered users and 1 guest

cron