суббота, 6 октября 2012 г.

scala vs java8

Despite all bold promises from Oracle, java8 will be still much inferior to Scala:
http://www.infoq.com/articles/java-8-vs-scala (e.g. traits vs virtual methods - can't be compared)

In all of this java8 will be released no earlier than mid-2013 and scala "certainly won't be sitting still between now and 2013"(c)

(c) from comments:

"Notwithstanding the nice new features in Java 8, Scala seems (in my opinion) to remain significantly more concise and clean than Java."

"Remeber even if its java 8, it still just java. Don't expect too much."

"the Scala folks are delighted that Java 8 will have lambdas, since that will ultimately result in attention to performance of such code, and perhaps even to how it is represented in classfiles. Scala will likely benefit from the resulting improvements."

четверг, 9 августа 2012 г.

Job

HH: Senior Java Developer for R&D (Highload):

Крупнейший оператор рекламного рынка ищет опытных java разработчиков на свои highload проекты по созданию и развитию low-latency (<50ms) рекламных платформ нового поколения.

Прежде всего необходим достойный опыт с JavaSE (сore) и многопоточностью (без этого - no hire).
Далее неплохо будет уметь готовить Netty, Spring, OSGI, NIO, работать с SEDA архитектурами и NoSQL хранилищами данных.
Очень приветствуется опыт с системами DataGrid (например, Hazelcast или Infinispan)

Совсем идеально — если у вас будет опыт работы с highload, low-latency java приложениями, масштабируемыми на N>10 нод в кластере.
Применение (понимание) таких фреймворков и паттернов как Netty, Disruptor, опыт тюнинга GC, а также опыт с JNA/JNI (для переписывания критичных участков на cpp) или sun.misc.Unsafe (!).

Если с высокими нагрузками опыта нет, но есть многолетний опыт в java enterprise (Spring, Hibernate, Swing, Oracle, JMS/Tibco, EJB etc.) — нестрашно, научим!

Проекты новые, динамично развиваются, современные технологии, TDD применяется, legacy код отсутствует, релизы — часто!
....

p.s. Вопросы можно задавать здесь =)

пятница, 27 июля 2012 г.

android.util.Log#wtf ))

funny android developers: android.util.Log#wtf
"What a Terrible Failure: Report a condition that should never happen. The error will always be logged at level ASSERT with the call stack..."

вторник, 10 июля 2012 г.

netty 3.5.1 bundle in Felix 3.2.1 osgi Container = ClassNotFoundException

netty 3.5.1 started in osgi (felix 3.2.1):

...
[org.jboss.netty.util.internal.QueueFactory] - Unable to instance LinkedTransferQueue, fallback to LegacyLinkedTransferQueue
java.lang.NoClassDefFoundError: Could not initialize class org.jboss.netty.util.internal.LinkedTransferQueue
 at org.jboss.netty.util.internal.QueueFactory.createQueue(QueueFactory.java:53) ~[na:na]
 at org.jboss.netty.channel.socket.nio.AbstractNioWorker.(AbstractNioWorker.java:111) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.NioWorker.(NioWorker.java:44) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:34) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:26) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.(AbstractNioWorkerPool.java:58) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.NioWorkerPool.(NioWorkerPool.java:29) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.(NioClientSocketChannelFactory.java:149) ~[netty-3.5.1.Final.jar:na]
 at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.(NioClientSocketChannelFactory.java:114) ~[netty-3.5.1.Final.jar:na]
...

If you debug and dig into netty source code - you'll find more descriptive exception: java.lang.ClassNotFoundException: sun.misc.Unsafe not found by org.jboss.netty

The problem seems that osgi container doesn't normally expose sun.misc.* internals, so the application cannot find it, though it's Oracle Jdk 1.6 with this stuff inside.

Looking further to the source code - you'll find the workaround: -Dorg.jboss.netty.tryUnsafe=false

p.s. issue discussion on the netty github tracker