Which technology to chose for massive IO operation server
I need to build simple server that
- reads (potentially large) xml files
- processes them in memory(eg transform them to a different xml structure)
- writes them back to disk.
Some important aspects of the program:
- speed
- ability to distribute the server. That means placing (what does that mean) several such servers and each s开发者_如何学JAVAerver will handle different volume of xml files.
- cross platform
- built in a very tight dead line
Basically my question is :
In what programming language should I do it ?Java ?
- speed of development
- cross platform
- IO operation are high with the right configuration (add a web link here).
C++ ?
- execution speed
- cross platform (with the right libraries).
- however development is slower.
Rather than coding this in a low-level language, you might want to look into an ETL or XSLT engine. They are optimized for performance beyond what you would generally be able to produce on your own, and are generalized enough to accommodate user changes (not sure if your XML transformation is a one-time thing, or if it may change over time).
I'm still a little foggy on your requirements BUT.
You are asking the wrong question. If language really isn't an issue, you should be looking for 3rd party libraries that can handle large amounts of disk io, an libraries that perform XSLT. See which libraries exist for both languages then pick.
Further, if the performance is a key requirement, you'll need to determine whether the process will be IO bound or CPU bound. That will dictate with libraries need to be used as well as general architecture. Are the xml transformations cpu intensive? or can the easily be done with a one or two pass parse?
Tight deadline? The need for parallel operation a given? Then speed is not a problem. Just throw more servers at it, until your throughput matches the demand.
If you're faster in Java, sure, go ahead with that. You might need twice the number of servers, but those can be built in days not weeks.
Portability is never a requirement under tight deadlines. Just ask whoever set those deadlines whether he has made any non-reversible choices. If so, stick with those; if not, pick something and stick with that. You don't have the time to test it on different platforms, so any portability you would have would be theoretical anyway.
精彩评论