New-age Transactional Systems - Not Your Grandpa's OLTP
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Dave West on Jun 01, 2009
Gilad Bracha reopens an old debate about language design, specifically can a language be OO and enforce a primitive type system? In his Room 101 blog post he makes the assertion: "I’ve often said that Java’s original sin was not being a pure object oriented language - a language where everything is an object." The main issue addressed in the post is not on the value of being a pure object oriented language; rather, it addresses the question of whether it would be possible for Java to be as efficient as it is without primitive types. The answer is yes."
Gilad begins his argument with a simple example of how typing create problems. The Java char type was initially represented with 16 bits (in accordance with the Unicode standard at the time) but when the standard changed, "people dealing with unicode in Java have to deal with encoding code points themselves." Turning to the issue of performance, he provides several examples of how to get objects without impairing efficiency. One example
So how would we go about getting rid of primitive types without incurring a significant performance penalty?
Java has a mandatory static type system; it is compiled into a statically typed assembly language (Java byte codes, aka JVML). It supports final classes. I do not favor any of these features, but we will take them as a given. The only changes we will propose are those necessary to eradicate primitive types.
Assume that the we have a final class Int representing 32 bit integers. The compiler can translate occurrences of this type into type int. Hence, we can generate the same code for scalars as Java does today with no penalty whatsoever.
More interesting examples follow, including: methods whose names are operators, forcing Ints to behave as values, the == operato, instance locking, and array covariance.
The conclusion:
All in all - Java could have been purely object oriented with no significant performance hit. But it wasn’t, isn’t and likely won’t. Sic Transit Gloria Mundi.
The responses to this post are mostly in agreement with Gilad's points.
Some selected responses:
The discussion also includes some technical examples that serve mostly to illustrate the divide between the two sides.
Perhaps the most interesting aspects of this specific instance of the "Great OO Debate" are the issues that are not raised. Some examples:
It would be really interesting to see the pure OO / efficiency debate based on why languages are the way they are and if objects really do provide a way to create designs where absolute machine execution efficiency is not an issue.
18 agile and lean practices for effective software development governance
Monitor your Production Java App - includes JMX! Low Overhead - Free download
Using Drools? See what you're missing! Get the Power of Drools with the Assurance of Red Hat
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
No comments
Watch Thread Reply