I have some trouble finding a solution for the XML data binding for my project.
Here a little of context.
I have some XSDs given by an external company which cannot be modified.
I already have a domain model, which have a lot of concept in common with the xsd's but it is not structured the same way. Some attributes are not located in the type for example. I am not allowed to change the model.
Due to performance issue, I want to plug directly my own model to the XSDs model during XML generation using a mapping file for example.
moxy from eclipselink could answer the problem but it is not working properly on the current architecture. (still working on it)
JaxB is not powerful enough.
(I'm afraid my english got a little rusty, I hope it is clear enough)
Thanks for your reply, hum, actually the application I work on will have to handle dozens of thousands of requests per second and some data have a time to live lower than 1 second, so every byte / millisecond is good to take.
In this case I will have 2 models and a bindings layer, it might be too heavy.
But yes this is a valid option, I have considered it but if I can find a faster solution I'll take it .
Would you care to elaborate further on the scenario?
Here is an article about an architecture that claims to be able to handle millions of orders per second: http://martinfowler.com/articles/lmax.html If your current architecture is not right, the best XML data binding tool available will not help you - are you sure that the transferring of XML data to the domain model is the bottleneck in the current system?
The project is not deployed. So I don't have a answer if it is a bottleneck or not. But if I have to try a guess I'll say no.
But keeping 2 distinct models in the application means that I will have the double of objects in memory, I want to avoid that.
Joined: Oct 04, 2006
If the project is not deployed or haven't been load-tested yet, then it feels to me like premature optimization.
Experience tells me that this is seldom the most beneficial way to go.
If you suspect that XML marshaling and/or unmarshaling will become a bottleneck, then I suggest that you design the system as to make it easy to exchange this part and then use the XML databinding framework you are most comfortable with.
As soon as your system can be run, you load-test it to determine any bottlenecks. Only after load-testing, you start any optimizations.