[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Minimal local configuration



Robert Leftwich wrote:
I'm embedding XmlBlaster into a framework and would like to setup an absolutely minimal configuration. Is there some documentation or a sample setup that meets the criteria of a local-only protocol, persistent messages and durable subscribers (I'm using administrative get) using hsqldb?

Also, I'm using the following args to startup the embedded server:

// start-up an embedded XmlBlaster instance
String[] serverArgs = { "-bootstrapPort",
// For all protocol we may use set an alternate server port
"" + myServerPort, "-plugin/socket/port",
"" + (myServerPort - 1), "-plugin/rmi/registryPort",
"" + (myServerPort - 2), "-plugin/xmlrpc/port",
"" + (myServerPort - 3), "-ClientProtocolPlugin[LOCAL][1.0]",
"org.xmlBlaster.client.protocol.local.LocalConnection",
"-ClientCbServerProtocolPlugin[LOCAL][1.0]",
"org.xmlBlaster.client.protocol.local.LocalCallbackImpl",
"-CbProtocolPlugin[LOCAL][1.0]",
"org.xmlBlaster.protocol.local.CallbackLocalDriver",
"-protocol", "LOCAL", "-admin.remoteconsole.port", "0" };


which were copied from the XmlBlaster tests. Can this be reduced at all?

Ideally I would have 2 configurations, one for production with maximum reliability/stability and one for running unit/acceptance tests where XmlBlaster startup/shutdown speed is the critical factor.

Robert

Hi Robert,

we have no summarization for this.
Probably it is time to add a wiki page for such topics.

The first step is porbably to throw out everything you don't need
from xmlBlasterPlugins.xml, here we keep only the SOCKET protocol:

=======================
<xmlBlaster>
   <plugin id='SOCKET' className='org.xmlBlaster.protocol.socket.SocketDriver'>
      <action do='LOAD' onStartupRunlevel='3' sequence='2'
              onFail='resource.configuration.pluginFailed'/>
      <action do='STOP' onShutdownRunlevel='2' sequence='5'/>
   </plugin>
</xmlBlaster>
=======================

Then it would edit xmlBlaster.properties and throw out the login/logout events,
switching off cluster support and disable telnet access
and disable our bootstrap http server on 3412:

=======================
loginEvent=false
logoutEvent=false
userListEvent=false
cluster=false
admin.remoteconsole.port=0
bootstrapPort=-1
=======================

disable all mime plugins be removing those entries,
switch everything to RAM based operation etc. are further
steps to go.

Now the server starts up in ~ 170 milliseconds
and changing runlevel to 0 and back to 9 again
takes about 40 millis (which is a restart in the same JVM),
consumes about 500 kbytes but is still fully operational, try it with:

java HelloWorld3 -protocol SOCKET


enjoy

Marcel

--
http://www.xmlBlaster.org