Rethinkdb and Hbase Top Performance Fails
Total Page:16
File Type:pdf, Size:1020Kb
Issue April 2015 | presented by www.jaxenter.com #44 The digital magazine for enterprise developers Polyglots do it better Speak ALL the languages! Shutterstock’s polyglot enterprise and Komodo’s polyglot IDE RethinkDB and HBase A closer look at two database alternatives Top performance fails Five challenges in performance management ©iStockphoto.com/epic11 Editorial E pluribus unum It’s an old and rather out-of-fashion motto of the United to the success of the company’s technology, and how out of States. E pluribus unum, one out of many. Early twentieth- one language became many specialist development areas, in century ideals of the cultural melting pot may have failed in turn all unifi ed by the enterprise. Meanwhile for web develop- western society. But they may still work in IT. Developers will ers looking for one tool to rule all their front-end languages, forever dream of one Holy Grail language that will rule them we’ve got a helpful guide to the polyglot IDE Komodo, which all. As nice as it sounds to be a full-stack developer, know- just unveiled its ninth release. ing your entire enterprise’s technology inside out, from the We’ve also got some useful introductions to HBase and ListView failure modes to the various components’ linguistic RethinkDB (both big salary-earners according the recent syntaxes – that’s a near superhuman talent. As much as all de- Dice. com survey), as well as Vaadin web applications. And velopers would love to be fl uently multilingual, in practice it’s fi nally for anyone concerned with the speed of their website diffi cult to keep up. But instead it’s the unity of the enterprise during high traffi c, we have a couple of valuable lessons about itself that can create one whole out of many languages, not how to avoid performance failures. the individual developer. In this issue, Chris Becker explains how Shutterstock’s Coman Hamilton, gradual evolution from one to many languages was central Editor Polyglot enterprises do it better 5 Shutterstock’s multilingual stack Index Chris Becker An introduction to polyglot IDE Komodo 7 One IDE to rule all languages Nathan Rijksen HBase, the “Hadoop database” 12 A look under the hood Ghislain Mazars An introduction to building realtime apps with RethinkDB 16 First steps Ryan Paul Performance fails and how to avoid them 20 The fi ve biggest challenges in application performance management Klaus Enzenhofer Separating UI structure and logic 22 Architectural differences in Vaadin web applications Matti Tahvonen Model View ViewModel with JavaFX 24 A look at mvvmFX Alexander Casall www.JAXenter.com | April 2015 2 featuring October 12 – 14th, 2015 Business Design Centre, London MARK YOUR CALENDAR! www.jaxlondon.com Presented by Organized by Hot or Not HTML6 If you’re a web developer that doesn’t check the news that often, make sure you’re sitting before reading this. The web community is furiously debating a radical new proposal for HTML6. The general idea is that the next version of HTML will be developed in a way that allows it to dynamically run single-page apps without Java- Script. Yes, a HTML that wants to compete with JavaScript. The community is torn, but proposal author Bobby Mozumder makes an interesting case, claiming that HTML needs to follow the “standard design pattern emerging via all the front-end JavaScript frameworks where content is loaded dynamically via JSON APIs.” He’s won over quite a few members of the community, but there’s no telling if the W3C will ever lower its eyebrows to this request. Cassandra salaries It’s often considered impolite to ask another programmer how much they earn. But that doesn’t mean colleagues, recruiters and employers aren’t picturing an estimated annual salary hovering over your head while they pretend to listen to you. It turns out that right now, Cassandra, PaaS and MapReduce pros are the ones with the biggest dollar signs above their heads (according to the latest Dice.com survey). Anyone lucky enough to be an expert in this area (and living in the US) will be making an average of at least $127k per year. America’s Java developers will be lucky to scrape anything above $100k, while poor JavaScript experts earn as little as $94k a year. We’d like to invite you to join us in performing the world’s smallest violin concerto for the JS com- munity – because seriously that’s still a mighty shedload of cash to the kinds of people that write the texts you’re reading [long sigh]. How banks treat Publishing a book technology in IT In a recent series of interviews on JAX- At some stage in their career, most enter, developers in finance have told developers will ponder the idea of us about the pros and cons of develop- publishing a book. And the appeal is ing for banks. And while the salary understandable. It’s a great milestone is very definitely a major pro (banks on your CV, developers in the pay 33 percent to 50 percent more, community may look up to you and says HFT developer Peter Lawrey), the you’ll be sure to make your parents management-level attitude to technol- proud (even if they don’t have a clue ogy is less than favourable. “Many what you’re writing about). But financial companies see their develop- don’t expect to make big money (like ment units as a necessary evil,” says those Cassandra developers, above) former NYSE programmer Dr. Jamie when you self-publish on Leanpub. Allsop. Not only does technology come Meanwhile you’ll need to be dedicating across as being second-class, but it’s much of your spare time to promoting often impossible to drive innovation the book. Before your eyes go lighting when working on oldschool banking up with dollar signs at the thought systems. “If it’s new then it must be of becoming a wealthy international risky,” dictates the typical financial ops superstar IT author, give yourself a attitude according to finance techno- quick reality check with a couple of logy consultant Mashooq Badar. Google searches on IT publishing. www.JAXenter.com | April 2015 4 Languages iStockphoto.com/jamtoons iStockphoto.com/jamtoons © Shutterstock’s multilingual stack Polyglot enterprises do it better Being a multilingual, multicultural company doesn’t just bring benefits on a level of corporate culture. Shutterstock search engineer Chris Becker explains why enterprises need to stop speaking just one language. by Chris Becker But in recent years, Shutterstock has grown more “multilin- gual.” Today, we have services written in Node.js, Ruby, and A technology company must consider the technology stack Java; data processing tools written in Python; a few of our and programming language that it’s built on. Everything else sites written in PHP; and apps written in Objective-C. flows from those decisions. It will define the kinds of engi- Developers specialize in each language, but we communi- neers who are hired and how they will fare. cate across different languages on a regular basis to debug, During Shutterstock’s early days, a team of Perl develop- write new features, or build new apps and services. Getting ers built the framework for the site. They chose Perl for the from there to here was no easy task. Here are a few strate- benefits of CPAN and flexibility that language would bring. gic decisions and technology choices that have facilitated our However, it opened up a new problem – we could only hire evolution: those familiar with Perl. We hired some excellent and skilled engineers, but many others were left behind because of their Service-oriented Architectures inexperience with and lack of exposure to Perl. In a way, it First, we built out all our core functionality into services. limited our ability to grow as a company. Each service could be written in any language while provid- www.JAXenter.com | April 2015 5 Languages Developer Meetups We also want our developers to learn and evolve their skill- “The biggest obstacle blocking sets. We host internal meetups for Shutterstock’s Node de- velopers, PHP Developers, and Ruby developers where they new developers is often the can get fresh looks and feedback on code in progress. These meetups are a great way for them to continue professional technical bureaucracy needed development and also to meet others who are tackling similar projects. There’s no technology to replace face-to-face com- to manage each runtime.” munication, and what great ideas and methods can come from it. ing a language-agnostic interface through REST frameworks. Openness It has allowed us to write separate pieces of functionality in We post all the code for every Shutterstock site and service the language most suited to it. For example, search makes use on our internal GitHub. Everyone can find what we’ve been of Lucene and Solr, so Java made sense there. For our trans- working on. If you have an idea for a feature, you can fork lation services, Unicode support is highly important, so Perl off a branch and submit a pull request to the shepherd of was the strongest option. that service. This openness goes beyond transparency; it en- courages people to try new things and to see what others are Common Frameworks implementing. Between languages there are numerous frameworks and Our strategies and tools echo our mission. We want engi- standards that have been inspired or replicated by one anoth- neers to think with a language-agnostic approach to better er. When possible, we try to use one of those common tech- work across multiple languages.