Translate
середа, 4 грудня 2013 р.
понеділок, 2 грудня 2013 р.
Node.js at PayPal
There’s been a lot of talk on PayPal moving to node.js for an application platform. As a continuation from part 1 of Set My UI Free, I’m happy to say that the rumors are true and our web applications are moving away from Java and onto JavaScript and node.js.
Historically, our engineering teams have been segmented into those who code for the browser (using HTML, CSS and JavaScript) and those who code for the application layer (using Java). Imagine an HTML developer who has to ask a Java developer to link together page “A” and “B”. That’s where we were. This model has fallen behind with the introduction of full-stack engineers, those capable of creating an awesome user interface and then building the application backing it. Call them unicorns, but that’s what we want and the primary blocker at PayPal has always been the artificial boundary we established between the browser and server.
Node.js helps us solve this by enabling both the browser and server applications to be written in JavaScript. It unifies our engineering specialties into one team which allows us to understand and react to our users’ needs at any level in the technology stack.
Early adoption
Like many others, we slipped node.js in the door as a prototyping platform. Also like many others, it proved extremely proficient and we decided to give it a go on production.
Our initial attempts used express for routing, nconf for configuration, and grunt for build tasks. We especially liked the ubiquity of express, but found it didn’t scale well in multiple development teams. Express is non-prescriptive and allows you to set up a server in whatever way you see fit. This is great for flexibility, but bad for consistency in large teams. Over time we saw patterns emerge as more teams picked up node.js and turned those into Kraken.js; it’s not a framework in itself, but a convention layer on top of express that allows it to scale to larger development organizations. We wanted our engineers to focus on building their applications and not just focus on setting up their environments.
We’ve been using kraken.js internally for many months now (we’ll be open sourcing it soon!) and our engineering teams are eager to finally bring the internal node.js applications we’ve built live.
Bringing node.js to production
Our first adopter of node.js in production wasn’t a minor application; it was our account overview page and one of the most trafficked apps on the website. We decided to go big, but we also mitigated that risk by building the equivalent Java application in parallel. We knew how to deploy and scale Java applications, so if anything went wrong with the node.js app, we could fall back to the Java one. This provided the setting for some interesting data.
Development
We started in January and it took us a few months to get the necessary infrastructure in place for node.js to work in PayPal, e.g. sessions, centralized logging, keystores. During this time we had five engineers working on the Java application. Two months in to the Java development, two engineers started working on the parallel node.js app. In early June they met at a crossroads, the applications had the same set of functionality; the node.js application, a smaller team with a two month delayed start, had quickly caught up. A few details stood out after we ran the test cases and both applications passed the same functional tests. The node.js app was:
- Built almost twice as fast with fewer people
- Written in 33% fewer lines of code
- Constructed with 40% fewer files
This provided encouraging evidence to show that our teams could move faster with JavaScript. We were sold and made the decision to put the Java app on hold while we doubled down on the JavaScript one. The great news is that the Java engineers on the project, unsure about node.js in the beginning, delightfully moved over to node.js and are happily committing to a parallel work stream, providing us with double the productivity we were originally seeing.
Performance
Performance is a fun and debatable topic. In our case, we had two applications with the exact same functionality and built by roughly the same teams: one on our internal Java framework based on Spring and the other built on kraken.js using express, dust.js and other open source code. The application contained three routes and each route made a between two and five API requests, orchestrated the data and rendered the page usingDust.
We ran our test suite using production hardware that tested the routes and collected data on throughput and response time.

You can see that the node.js application had:
- Double the requests per second vs. the Java application. This is even more interesting because our initial performance results were using a single core for the node.js application compared to five cores in Java. We expect to increase this divide further.
- 35% decrease in the average response time for the same page. This resulted in the pages being served 200ms faster— something users will definitely notice.
There’s a disclaimer attached to this data: this is with our frameworks and two of our applications. It’s just about as apples-to-apples a performance test as we could get between technologies, but your milage may vary. That said, we’re excited by what we’ve seen from node.js’ raw performance.
Future
All of our consumer facing web applications going forward will be built on node.js. Some, like our developer portal, are already live while others, like account overview, are in beta There are over a dozen apps already in some stage of this migration and we will continue to share data as more applications go live. This is an exciting time for engineering at PayPal!
– Jeff Harrell
@juxtajeff
@juxtajeff
субота, 30 листопада 2013 р.
CRASHING YOUR JVM
Thorough testing can be harmful as we discovered recently. Extending our test coverage led us to a several-hours debugging session caused by just one line of code. What made the debugging particularly unpleasant was the fact that the code crashed not just the JVM it was deployed to, but also the virtual and/or physical machine underneath.
So, run the following at your own risk. Note that you have to provide the tools.jar in your classpath both for compilation and run-time.
Top 10 Algorithms for Coding Interview
The following are top 10 algorithms related concepts in coding interview. I will try to illustrate those concepts though some simple examples. As understanding those concepts requires much more efforts, this list only serves as an introduction. They are viewed from a Java perspective. The following concepts will be covered:
- String
- Linked List
- Tree
- Graph
- Sorting
- Recursion vs. Iteration
- Dynamic Programming
- Bit Manipulation
- Probability
- Combinations and Permutations
середа, 27 листопада 2013 р.
One million requests per sec? No sweat for Compute Engine, says Google
Elliot Bentley
November 27, 2013
However, while Bezo’s behemoth may be thebiggest cloud provider, it’s far from the only option available. Microsoft arestarting to take Azure seriously, and this week Google trumpeted the advantages of Google Compute Engine with an impressive demo of their load balancing service.
In the days before Nginx, the target was 10,000 simultaneous requests: now, Google haveshown off their virtualised infrastructure scaling up to 1,000,000 per second in just five seconds.
In May, Google Compute Engine hosted the backend for the Eurovision Song Contest companion app. The TV show is watched live by 125 million people across Europe, and its engineers managed to scale the app to a whopping 50,000 requests per second.
In comparison, wrote Voellm, the load generated in this experiment was 20 times that amount – equivalent to truly enormous massive spike in traffic. The million requests per second were served by 200 single-core VMs, each receiving approximately 5,000 requests per second.
The key boast for Google is the speed at which these VMs were spun up: apparently within five seconds and without any ‘pre-warming’ whatsoever. AWS’ Elastic Load Balancing service is nowhere near as flexible – requiring both a $49-monthly premium support agreement and notification of high traffic in advance.
Equally impressive is the fact that this setup cost just $10 USD. Granted, this might go up a notch when sending real responses (the service is billed by GB of data processed in addition to an hourly service charge), but still appears to be jaw-dropping value for money.
As AWS continues to dominate the market, it’s good to see real competition and innovation from rivals – even if it results in Google controlling even more of the internet.
Elliot Bentley
вівторок, 26 листопада 2013 р.
пʼятниця, 15 листопада 2013 р.
вівторок, 12 листопада 2013 р.
JUG Lviv Flame#1: How to launch project from scratch?
Ми хочемо запропонувати вам новий формат - JUG Flame
В чому особливість?
Updated: в звязку з певними обставинами зустріч відбудеться 22-го листопада а не 20-го як було анонсовано раніше
Є теми на які нема однозначної відповіді, теми дискутивні та все ж важливі.
Є теми на які нема однозначної відповіді, теми дискутивні та все ж важливі.
Отож ми пропонуємо вам прийти та поділитись власним досвідом, обговорити чи просто послухати думку колег.
Для першої такої зустрічі ми вибрали тему -
Як запустити проект з нуля?
За час своєї роботи у львівському аутсорсі, я не раз бачив ситуацію, коли люди навіть з великим досвідом все ж мали проблеми з запуском нових проектів, робили одні й ті самі помилки та витрачали купу зусиль на непотрібні речі. Дуже часто аутсорс змушує нас розвивати існуючі проекти та доволі рідко трапляються випадки коли проект потрібно запустити самотужки.
Якщо вас цікавить дана тема, якщо ви хочете дізнатись щось нове - реєструйтесь та приходьте. Кількість місць обмежена!
- Коли: 22 листопада 2013 року о 19-00
- Де: Федьковича, 60а, 4004 конференц-зал, компанія SoftServe
- Вхід вільний
- Реєстрація обовязкова
P.S. Як завжди ми розіграємо серед слухачів ліцензію від JetBrains
Scala Day at manning.com - 50% off
Scala Day at manning.com | ||
|
It's Scala Day at Manning. Enhance your programming library with 50% off these selected Scala-related books. Just enter dotd1112tw in the Promotional Code box when you check out at manning.com to save half. Offer expires at midnight EST November 12, 2013.
Only at manning.com
| ||
понеділок, 11 листопада 2013 р.
пʼятниця, 8 листопада 2013 р.
Java Performance Problems eBook
корисна і головне безкоштовно доступна для завантаження книжка присв"ячена типовим проблемам з перформансом при розробці на Джаві
http://info.appdynamics.com/Top10JavaPerformanceProblems_eBook.html
освітленні лише певні топіки, але проглянути всеодно цікаво
http://info.appdynamics.com/Top10JavaPerformanceProblems_eBook.html
освітленні лише певні топіки, але проглянути всеодно цікаво
середа, 6 листопада 2013 р.
R.I.P. GlassFish - Thanks for all the fish.
R.I.P. GlassFish - Thanks for all the fish.
The Long Road from Sun to Oracle
GlassFish was something to worry about right from the start. After the merger it took some time to silence the voices which insisted on "Oracle killing GlassFish". Oracle did a decent job in nurturing the community and keeping their stuff together. I've written a couple of blogs myself helping to get the word out. The 100-day releases 2.1.2 and 3.0.1 have somehow become the milestone to prove the will to improve. And we all have been fine with it after a while. Even back in January 2013 I compiled a list of open source application servers and which one to pick. The final criteria was vendor support. That kicked WAS CE out of the game. As of yesterday it would also removed GlassFish. The two remaining alternatives burned down to one: Which is JBoss AS7 / WildFly.
понеділок, 4 листопада 2013 р.
GeeCON Conference 2013 Video
GeeCON Conference 2013 Video: http://vimeo.com/geecon
Підписатися на:
Дописи (Atom)

