Posted by arungupta
on November 20, 2007 at 3:12 AM PST
I presented on Metro and
jMaki in a invitation-only
gathering on Nov
15. The audience in both the sessions was pretty interactive. Even
though the sessions were invitation-only, I'm posting some of the
questions asked during the sessions along with their answers.
- How to build support for jMaki in other languages such as Perl ?
The best option is to check out
and look at
The basics are relatively easy but not always obvious. There
is no runtime spec so it's hard to get all the little details
right: Theming, API keys, and the Proxy behavior are pretty specific. Please
feel free to ask a question on
jMaki Forums . It would be
helpful if you can help us create such a document while adding
support for Perl.
- Is it possible to point a DataTable widget to a Database
table, introspect the database table and auto-generate the
Java Persistence API (in Java) and
ActiveRecord (in Rails)
already serve this purpose. There are detailed instructions for
jMaki/ActiveRecord . At this time
there are no plans to tie closely to the database. Please file an
RFE if you like this feature.
- Do we have any comparisons between jMaki and Open Laszlo ?
We need to understand Open Laszlo better to prepare a
comparison. At this time
no comparison is available.
- How are topics implemented ? What is the data structure that
implements them ?
The topic name is a
String / Regular expression Object.
The topic names can also include wildcards (start, include, end with
a *). The payload must be an object (strings are objects).
provides some more details.
- Do we have any performance data on large data sets - e.g. 15,000
rows in a Data Table widget ?
Carla has a
that explains how pagination can be achieved for large data sets. The real question is "how much can
you realistically cache on the client?". There are lots of
algorithms and that can be more application logic.
If you are going to deal with sets like this then the Dojo Grid is supposed to be
good as it handles client-side caching and paging.
We'll be adding it as a widget for the dojo 1.0 push.
- Are there any widgets that support streaming video ?
Not yet but it would be very easy to wrap a widget like that. For
example, please look at Sound extension that is available as wrapper
- How to prevent scripting attack on jMaki-wrapped widgets ?
jMaki wrappers are very trivial. The data from
an external domain is not processed in any manner and instead passed
on to the underlying toolkits. We make sure the wrappers are well
tested and rely on the underlying toolkits to test their widgets.
And now for the Metro session:
- How more recent Metro jars be installed on GlassFish ?
A stand-alone build of Metro can be downloaded from
metro.dev.java.net . This
build comes with
wsit-on-glassfish.xml script and can
be used to override the jars in an existing
- Why Reliable Messaging is required if TCP/IP already provides reliability ?
TCP/IP provides reliability at the network level. The Reliable
Messaging support in Metro implements a transport-independent messaging
protocol (defined by the WS-Reliable Messaging spec) with a SOAP
Binding. This allows the SOAP message to be used in alternate
transports such as JMS or SMTP. It also enables Reliability between
a Client and Endpoint with multiple intermediaries in-between which
is not possible with TCP/IP.
- Is the "Test Web service" feature available outside NetBeans ?
The "Test Web service" feature in NetBeans makes use of Tester
application in GlassFish. It is a web application that dynamically
generates the JSP pages by introspecting the WSDL. Currently it only
works only for methods that have primitive types in the signature.
- What would it take to run Metro on Embedded Jetty ?
Servlet-based endpoints can be easily deployed on Jetty as explained
The different variants of
Endpoint.publish () currently runs only on Light-weight HTTP
server bundled along with Java
SE 6 . An RFE has already been filed for this functionality and
it will be fixed in a future release of Metro.
- Does Metro Security integrate with Active Directory ?
Even though Metro Security cannot be directly integrated with
ActiveDirectory, Authentication can be plugged through the integration
of Metro with OpenSSO.
- What specific performance improvements have we made in Metro ?
Here are some of the key performance improvements:
- Revisited some of the key abstractions. The physical data
representation was hidden from the user and yet backed by
different implementations such as InputStream, JAXB objects, DOM
node, Source, etc.
- Faster, type-safe read access to commonly used properties
such as Target Endpoint Address and SOAPAction. Also lazy
- Headers are made randomly accessible.
- Filtering of data was enabled by creating an additional
wrapper instead and delaying the actual filtering
- Mostly JAXB is used to write the JAX-WS payload. There were
numerous improvements made in JAXB such as:
- Collapsing the layers and write directly to OutputStream
instead of using StAX.
- Pre-encode tag names to UTF-8
- Numbers are converted straight to byte stream
- Namespace prefixes encoded just once and reused
- Lazy reading and writing of attachments (for example
image is encoded in to JPEG byte stream)
Metro team also presented a
these improvements at
JavaOne 2006 .
- How much traffic is bloated because of enabling Reliability or Security ?
There is a definite bloating of messages that happen when either
Reliability or Security or Transactions are enabled. I'll provide
the exact numbers in a later blog but all the messages are clearly
defined by the
Feel free to ask any other questions in
Metro Forum and
jMaki Forum .