Author |
Message
|
bprasana |
Posted: Fri Feb 26, 2010 11:55 am Post subject: Using MRM or XMLNSC |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
I am bit confused with MRM and XMLNSC parsers that come with WMB 6.1.
here's my situation:
I have a XML msg(ns aware), which needs to be validated in "WMB layer".
Q1.
Will the usage of message set depend on size of message? Say if i have only about 10 fields to validate in a request and about 30-35 fields to for response. Should I go for msgset validation of validate in the code?
Q2. Will the usage of msg set brings down the performance considerably? as we need quick response for searches.
Q3. Can I use XMLNSC parser instead of MRM to validate msg using msgset? Will it make sense to use XMLNSC instead of MRM for validating bigger messages?
Thanks
bprasana |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 26, 2010 12:04 pm Post subject: Re: Using MRM or XMLNSC |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I'm sure kimbert will be along in a minute to correct me but:
bprasana wrote: |
Q1.
Will the usage of message set depend on size of message? Say if i have only about 10 fields to validate in a request and about 30-35 fields to for response. Should I go for msgset validation of validate in the code? |
Obviously there's an impact with validating large messages. The sizes you describe are not large. AFAIK the XMLNSC is a more efficient parser than the MRM one.
bprasana wrote: |
Q2. Will the usage of msg set brings down the performance considerably? as we need quick response for searches. |
Search what? Are you talking about overall flow performance or searching the XML in WMB? See above.
bprasana wrote: |
Q3. Can I use XMLNSC parser instead of MRM to validate msg using msgset? Will it make sense to use XMLNSC instead of MRM for validating bigger messages? |
AFAIK using XMLNSC is the recommeded method for all XML in WMBv6.1. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bprasana |
Posted: Fri Feb 26, 2010 12:23 pm Post subject: @vitor |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
- Search as in business requirement, WMB is used by many front ends to search , say customer details based on the name. so WMB would return anywhere between 1-100 results at a time. This needs a near realtime responses.
When you say XMLNSC is better that MRM, does that mean 'no use of message sets'. thats the real confusion actually? Can I still have a message set to validate a incoming message but 'make WMB use' XMLNSC parser instead of MRM?? |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Feb 26, 2010 12:26 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
A good general rule of thumb is as follows:-
Use XMLNSC/XMLNS unless you are transforming the message into a CWF or TDS format.
There is also a case where using the MRM-XML instead of XMLNSC if you want to strip every bit of namespace into from the incoming data. This is the exception though. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 26, 2010 12:26 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
In 6.1 and 7.0, the *xsd's* that define your xml documents get deployed directly, and not any compiled message set files. The XMLNSC parser uses these to do any validation you like, and will use them also to build the message tree with native data types (binary, integer, decimal, boolean, etc) instead of character values. Likewise it will turn native datatypes into properly formatted characters in output messages.
This is if you create your message set to use the XMLNSC parser.
XMLNSC is roughly 400% faster than MRM-XML.
Learn it, use it, love it. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Feb 26, 2010 1:36 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Short answers:
Q1 : Yes
Q2 : Do some tests with your own data - that's the only reliable way to answer that question
Q3 : Yes
Just to repeat what mqjeff and smdavies99 said, but with a little more detail:
- XMLNSC is just about *always* a better choice than MRM XML.
- For parsing scenarios, XMLNSC is almost as fast when validating as it is when not validating.
- XMLNS is ( very rarely ) a valid choice. But not for your requirements.
Performance statistics are available online - I expect somebody will be able to provide the link if you can't find the performance report. |
|
Back to top |
|
 |
bprasana |
Posted: Fri Feb 26, 2010 4:50 pm Post subject: |
|
|
 Disciple
Joined: 18 Apr 2005 Posts: 179
|
Hey Guys,
Thank You all. that exactly what I needed.
I am going to go for XMLNSC.
Cheers
bprasana |
|
Back to top |
|
 |
|