tag:blogger.com,1999:blog-70209554830788670322024-03-04T22:10:39.801-08:00Code Impossiblesomething about software (development)Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.comBlogger223125tag:blogger.com,1999:blog-7020955483078867032.post-811135591458449972018-09-24T01:48:00.002-07:002018-09-24T01:48:35.859-07:00Moving to MediumBlogspot seem to be dying. Authoring the articles on this platform feels like I'm in 90's. WYSIWIG is barely working, authoring in HTML isn't very fun either... Blogspost development seem to be frozen while other platforms make authoring a breeze. <br />
<br />
I'm now planning to blog much more and Blogspot can't satisfy my requirements, hence I'm moving to <a href="https://medium.com/@antonarhipov"><b>Medium</b></a>. <br />
<br />
<i>So long, Blogspot, those were fun 10+ years!</i> Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-19060314082779642512018-01-15T08:19:00.000-08:002018-01-15T12:59:03.166-08:00The essential tools for software developer<p>As a software developer I have used a ton of different tools for different purposes. However, it got me thinking, if I really need a lot of tools and what are the essential tools for software developer and what tools are rather “nice to haves”.</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQycVxgdKy9aSXBPHZXeDwotXgkZd9CJ6eplzPpLaQpcP30KqQk0ZkVPoE9zS513uPxx_wPA_yabeRviimohRkehF0aH9XF2y3BsmvcpEiy-ovroIjQ9yac1Fva_oHZj59plb4rkSizsE/s1600/tell-me-text.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQycVxgdKy9aSXBPHZXeDwotXgkZd9CJ6eplzPpLaQpcP30KqQk0ZkVPoE9zS513uPxx_wPA_yabeRviimohRkehF0aH9XF2y3BsmvcpEiy-ovroIjQ9yac1Fva_oHZj59plb4rkSizsE/s1600/tell-me-text.jpg" data-original-width="298" data-original-height="245" /></a></div><br />
<h1>Editor</h1><br />
<p>First, we better be able to write code. Hence, the editor is absolutely required. For Java, I’ve used different IDEs, but mostly <a href="https://www.jetbrains.com/idea/">IntelliJ IDEA</a>. <a href="https://netbeans.org/">NetBeans IDE</a> is nice. Eclipse-based IDEs shine in one way or another. I usually prefer to install <a href="https://developers.redhat.com/products/devstudio/overview/">JBoss Developer Studio</a> as it provides a solid support for Java EE projects. </p><p>For one-off editing, I still use <a href="http://www.vim.org/">Vim</a> and can’t get rid of it. I’m not even using the full power of the editor. I’ve tried other awesome editors at different times: <a href="https://notepad-plus-plus.org/">Notepad++</a>, <a href="http://www.crimsoneditor.com/">Crimson</a>, <a href="https://atom.io/">Atom</a>, <a href="https://www.sublimetext.com/3">Sublime Text</a>, <a href="https://code.visualstudio.com/">VS Code</a> (which I do have installed on my machine). Still, those editors haven’t got much use by me for some unknown reason.</p><p>The cool thing about the editors is that there’s so much choice!</p><br />
<h1>Version Control System</h1><br />
<p>In 2004 I started at one financial company as a Java developer. The first task I was assigned to was something likes this: “We have an application running in production and it has a few bugs. We need to fix those, but we don’t have the source code. Please do something?”. A disaster. They didn’t use source control properly and managed to lose it. </p><p>Today, the scenario above is very unlikely. However, I still hear stories how people store the source code in folders with suffixes _1, _2, _3 on the network drive. Argh!</p><p>Which version control system would you pick? IMO, today <a href="https://git-scm.com/">Git</a> is the dominant one. However, the way people often use Git (or any other distributed VCS) by avoiding branching and playing with feature flags, they probably would be just fine by using <a href="https://subversion.apache.org/">Subversion</a> instead :)</p><br />
<h1>Issue Tracker</h1><br />
<p>An issue tracker is absolutely needed for the team to plan their work, tasks, issues, etc. Now the question is in the implementation. I’ve seen tasks being tracked in MS Excel, text files, sticky notes, and other modern tools like <a href="https://www.atlassian.com/software/jira">Jira</a>, <a href="https://www.thoughtworks.com/mingle/">Mingle</a>, <a href="https://www.pivotaltracker.com/">PivotalTracker</a>, <a href="https://www.jetbrains.com/youtrack/">YouTrack</a>, <a href="https://manuscript.com/">ForBugz</a>, <a href="https://www.bugzilla.org/">Bugzilla</a>, <a href="https://www.mantisbt.org/">Mantis</a>, <a href="trello.com">Trello</a>… the list is infinite!</p><p>The thing with issue trackers is that they should support the approach you take for running the project. For a product company there are quite a few reasons to track issues. First, obviously, you need to track your work, i.e. tasks. From the project management perspective, it’s nice to have the ability to track the tasks, i.e. have the project management facilities in the task tracker. Lots of teams are happy to have it all in one so it’s easier to get an overview of the progress, especially if the tool provides Kanban style boards.</p><p>Second, good products usually have users who are eager to submit questions or bug reports. For that, most of the teams are using some kind of helpdesk software. <a href="https://www.helpscout.net">HelpScout</a> was the one I have used at ZeroTurnaround and can recommend. Plus, some teams make use of forum software that also serves as a channel for communication. Also, some teams expose a public issue tracker so that the users would directly submit issues there. </p><p>The above means that the issue tracker you choose is better have the required integrations available if that’s a requirement.</p><br />
<h1>Continuous Integration</h1><p>You write code in the editor, you test the code on your machine, you push it to Git. Someone pulls the code down, tries to run it, and it doesn’t work. Sounds familiar? Yeah, reminds me the famous “Works on my machine” excuse. Automation is absolutely required for a healthy software project. Automated builds, automated tests, automated code style checks, etc. </p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9yC7jmWdlj2NpAWiWl6PLkCAiciMP1s7wFO6SFi3sRVhiejj68eAjsadswPXLJ1rVJ5sGb7SIuSFhqI8XtkdkoPdru4mgaOMcAYS7-mlqoBL18RVN8GM_ARnupM69wZkxxtQ03Y_gor8/s1600/but-it-works-on-my-machine.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9yC7jmWdlj2NpAWiWl6PLkCAiciMP1s7wFO6SFi3sRVhiejj68eAjsadswPXLJ1rVJ5sGb7SIuSFhqI8XtkdkoPdru4mgaOMcAYS7-mlqoBL18RVN8GM_ARnupM69wZkxxtQ03Y_gor8/s1600/but-it-works-on-my-machine.jpg" data-original-width="400" data-original-height="400" /></a></div><br />
<p>Previously at <a href="https://zeroturnaround.com/">ZeroTurnaround</a>, I’ve seen that the CI server was a very critical piece of project infrastructure. If a source control system want offline, it wasn’t an end of the world to them. But if the build server was down, for many developers the work pretty much stalled. Now at <a href="https://jetbrains.com/">JetBrains</a>, I also see that their own product, <a href="https://www.jetbrains.com/teamcity/">TeamCity</a>, is a very important service internally, with many teams relying on it. Dogfooding at its best!</p><p><a href="http://www.extremeprogramming.org/rules/integrateoften.html">Continuous integration</a> was brought to the masses by eXtrame Programming practices. Today, CI is absolutely essential to any healthy software project. Years ago it all started with automating the test execution, building the artifacts, and providing the feedback quickly. Remember CruiseControl? Or Hudson, when it appeared? CI servers have been evolving the in the past years as the notion of Continuous Delivery appeared. Better visualisation of the process is required to cope with growing complexity. Also scaling the CI server has become an important aspect of the process.</p><p>With the latest trends in CI, the build servers are eagerly implementing the notion of build pipelines (<a href="https://confluence.jetbrains.com/display/TCD10/Build+Chain">build chains</a> in TeamCity) which provide a good overview of the process. And also the trend of 2018, I think, is running the CI tasks in a <a href="https://kubernetes.io/">Kubernetes</a> cluster.</p><br />
<h1>Artifact repository</h1><p>The build server produces the artifacts. Plenty of them. Either the artifact is a final software package, or a reusable component, or a test execution report, etc. Where would you store those artifacts with all the metadata associated with it? Today, there isn’t much choice, actually.</p><p>JFrog’s <a href="https://jfrog.com/artifactory/">Artifactory</a> is the dominant solution for storing binaries and managing them. Plus, the final artifacts could be promoted directly to <a href="https://bintray.com/">Bintray</a> for distribution. Sonatype’s <a href="https://www.sonatype.com/nexus-repository-sonatype">Nexus</a> was originally the go to solution for Java/Maven projects and added support for some other technologies as well in the recent years. Apache Archiva and ProGet are the other options but that’s pretty much it.</p><p>The security aspect of software development becoming more and more critical. I think, automated security checks will become an absolute requirement for any software as well. The trend that has been ongoing for years now and binary repositories, such as Artifactory and Nexus, are actually integrating with the services that provide such vulnerability checks. So, don’t be that guy, use the binary repository!</p><br />
<h1>Summary</h1><p>I have listed 4 categories of tools that I think are essential to any software project:</p><ul><li>an editor,</li>
<li>a version control system,</li>
<li>CI server,</li>
<li>and an artifact repository</li>
</ul>I didn’t mention build tools, compilers, static code verifiers, etc, but those are the small tools that will be used by developers anyway. And if not, some of the tools I’ve mentioned can replace or provide such functionality as a bundled feature.</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-45599294861148725302018-01-06T06:19:00.000-08:002018-01-06T06:19:20.956-08:00Setting up JRebel for WebSphere AS in Docker environmentGetting any Java application server up and running in the development environment is usually a fairly simple task. You can just download the zip archive, and start the contain either from command line or via IDE integration. Configuring JRebel agent for the server is also quite <a href="https://manuals.zeroturnaround.com/jrebel/standalone/launch-from-command-line-jrebel-agent.html">straightforward</a>. However, there are some exceptions to that. For instance, if you’d like to try JRebel on WebSphere AS and you are using MacOS, then you will have to take another route.<br />
<br />
WebSphere Application Server is available for Linux and Windows platforms, but not for MacOS. The good news is that there is a <a href="https://hub.docker.com/r/ibmcom/websphere-traditional/">WebSphere Docker image</a> that you can use for development.<br />
<br />
The <a href="https://developer.ibm.com/wasdev/blog/2016/06/15/websphere-traditional-ibm-http-server-docker-hub/">developerWorks' article</a> demonstrates it pretty clearly, what needs to be done in order to get WebSphere running in Docker and deploy a web application. With the help of the article I have assembled a <a href="https://github.com/zeroturnaround/petclinic">demo project</a> that deploys a Petclinic application on WebSphere running with JRebel in Docker container.<br />
<br />
Let me explain some interesting bits of the outcome.<br />
<br />
First of all, we need to derive from the base image, package the application archive into the new image, and make sure that WebSphere will deploy the application when it starts:<br />
<br />
<pre>#Dockerfile
FROM ibmcom/websphere-traditional:profile
COPY target/petclinic.war /tmp/petclinic.war
RUN wsadmin.sh -lang jython -conntype NONE -c "AdminApp.install('/tmp/petclinic.war', \
'[ -appname petclinic -contextroot /petclinic -MapWebModToVH \
[[ petclinic petclinic.war,WEB-INF/web.xml default_host]]]')"
</pre><br />
As you’ve noticed, it is not enough just to copy the application archive to some folder. You also need to invoke a script to actually deploy the application: call <b>wsadmin.sh</b> by providing it a snippet of Jython code. <br />
<br />
Next, as we want to enable JRebel, we also need to package the agent binary into the image, and also we need to modify JVM arguments of the application server. Hence, the corresponding Dockerfile will get a little more complicated:<br />
<br />
<pre>#Dockerfile
FROM ibmcom/websphere-traditional:profile
COPY ["jrebel-7.1.2","/tmp/jrebel"]
RUN wsadmin.sh -lang jython -conntype NONE -c "AdminConfig.modify(AdminConfig.list('JavaVirtualMachine', \
AdminConfig.list('Server')), [['genericJvmArguments', \
'-Xshareclasses:none -agentpath:/tmp/jrebel/lib/libjrebel64.so']])"
COPY target/petclinic.war /tmp/petclinic.war
RUN wsadmin.sh -lang jython -conntype NONE -c "AdminApp.install('/tmp/petclinic.war', \
'[ -appname petclinic -contextroot /petclinic -MapWebModToVH \
[[ petclinic petclinic.war,WEB-INF/web.xml default_host]]]')"
</pre><br />
<br />
The Dockerfile above packages JRebel distribution into the image. That’s an easy part. The hard part was to figure out how to configure JVM arguments. In WebSphere, JVM arguments are set via <i>server.xml</i> configuration which is quite unusual. Normally, a developer would use an administrative user interface to modify the parameters, but in our case we need the arguments to be in the right place right at the start. Hence we need to do some Jython scripting via <i>wsadmin</i> again.<br />
<br />
Now that the Dockerfile is ready, we can build and run the new image. In the terminal:<br />
<br />
<pre>$ docker build -t waspet .
$ docker run -d -p 9043:9043 -p 9443:9443 -v `pwd`:/tmp/petclinic -v ~/.jrebel:/home/was/.jrebel waspet
</pre><br />
The <b>docker run</b> command above also maps a few directories: a project folder and JRebel’s home folder. We map the project folder because JRebel agent could then see if any resource is updated. JRebel’s home folder (~/.jrebel) includes cached resources, so that if we would have to restart the Docker image then the application will start faster the next time.<br />
<br />
Now it is possible to use JRebel to update the application instantly, without restarting the application server or redeploying the application. For the full list of instructions, see the README.md file in <a href="https://github.com/zeroturnaround/petclinic">GitHub repository</a>.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-79031118847700278862017-08-07T05:26:00.000-07:002017-08-07T05:31:10.330-07:00XRebel for standalone apps with embedded Jetty<a href="https://zeroturnaround.com/software/xrebel/">XRebel</a> was designed to work specifically with Java web applications. Currently, it relies on Servlet API to serve its UI. It has been tested with a range of application servers (Apache Tomcat, WildFly, WebSphere, and others) and some full stack frameworks as well, including Spring Boot and JavaSpark. <br />
<br />
Sometimes however, you might want to use XRebel with a standalone Java process that is not using Servlet API. Hence, XRebel cannot display its embedded UI to render the data it collected from the application. What can we do about this? Well, XRebel is tested on Jetty and it works quite well there. Jetty is also often used as an embedded HTTP server. So why don’t we use this trick and embed Jetty into our standalone app to serve XRebel UI.<br />
<br />
Here’s our example application: <br />
<br />
<script src="https://gist.github.com/antonarhipov/d10f3abf5b6d8e9265f33fc54c7a6178.js"></script><br />
<br />
Just for the demonstration purposes, it executes an HTTP request every 3 seconds and reads the response. Quick and dirty.<br />
<br />
To embed Jetty server we need is to add a dependency to Jetty container and initialize the server when the application starts. The required dependencies are <b>jetty-server</b> and <b>jetty-servlet</b>:<br />
<br />
<script src="https://gist.github.com/antonarhipov/4fc7220a9d6246e417b37773080159bb.js"></script><br />
<br />
Then we can start Jetty by adding the following code snippet into the static initializer of the class:<br />
<br />
<script src="https://gist.github.com/antonarhipov/73072de7bced1a99cf1c07b1d19104a2.js"></script><br />
<br />
To enable XRebel agent, you need to start the application with <b>-javaagent</b> VM argument pointing to the location of xrebel.jar. For instance:<br />
<br />
<pre>-javaagent:/Users/anton/tools/xrebel/xrebel.jar -Dxrebel.traces.all=true</pre><br />
I also added <b>-Dxrebel.traces.all=true</b> VM property to enable tracing of non-HTTP activities by XRebel. Tracing of non-HTTP activities in XRebel is disabled by default, hence I need to add this parameter in order to see profiling data for the periodic tasks (if I wish).<br />
<br />
Once I launch the application, it will boot up the embedded Jetty instance on port 8080. The <a href="https://zeroturnaround.com/software/xrebel/web-services/">standalone XRebel UI</a> is deployed by the agent to <b>/xrebel</b> context. Hence, if we open <i>http://localhost:8080/xrebel</i> in the browser we will see the following:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKBbUB5_VOs4_fFQrKTycE4hxRjk5CJPMPN9s_b36mCB1OHX2isIH5AVhi0ZbPOyyIKU8zK5sgI5K0QP_COj1VfYQedmQkc7Wbv1bx82SK3WPW6lV_yOz5FvWeEfEoXst7WgH_xZal1D0/s1600/xrebel-standalone.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKBbUB5_VOs4_fFQrKTycE4hxRjk5CJPMPN9s_b36mCB1OHX2isIH5AVhi0ZbPOyyIKU8zK5sgI5K0QP_COj1VfYQedmQkc7Wbv1bx82SK3WPW6lV_yOz5FvWeEfEoXst7WgH_xZal1D0/s640/xrebel-standalone.png" width="640" height="436" data-original-width="1600" data-original-height="1090" /></a></div><br />
As you can see, it is quite easy to use XRebel with the standalone apps with this little trick. Just start an embedded Jetty instance on some port and you will be able to see what is your application doing. Perhaps, you can spot a sneaky bug with it before it gets to production! :)<br />
<br />
If you want to play with the example application, I have it at <a href="https://github.com/antonarhipov/headless-app">GitHub</a>. <a href="https://zeroturnaround.com/software/xrebel/download/">Download XRebel</a> and start the application with the appropriate VM arguments to enable the agent. It will be fun! :)<br />
<br />
<br />
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-90133950678998166752017-06-01T07:06:00.000-07:002017-06-01T07:06:34.942-07:00Conferences I have visited in May'17<h1>Riga DevDays</h1><br />
<p><a href="https://rigadevdays.lv/">Riga DevDays</a> - a perfect conference of an Estonian to visit: not too far away (45 minutes flight), nice city, very good event!</p><p>There, I have presented a talk about Java class reloading, which covers the different options for reloading Java classes and explains the fundamental differences of those.</p><center><iframe src="//www.slideshare.net/slideshow/embed_code/key/N2q4gQxX3ay878" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="//www.slideshare.net/arhan/riga-devdays-2017-the-hitchhikers-guide-to-java-class-reloading" title="Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading" target="_blank">Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading</a> </strong> from <strong><a target="_blank" href="https://www.slideshare.net/arhan">Anton Arhipov</a></strong> </div></center><br />
<h1>GeeCON, Krakow</h1><br />
<p>I have presented at GeeCON before. The vibe of the event is quite energising! :) I have presented a talk about TestContainers which seemed to spark a lot of the interest from the attendees. Almost a full room and a lot of questions after the talk. Looks like integration testing is in demand these days!</p><center><iframe src="//www.slideshare.net/slideshow/embed_code/key/19nHX2LHHABZlX" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="//www.slideshare.net/arhan/geecon-2017-testcontainers-integration-testing-without-the-hassle" title="GeeCON 2017 - TestContainers. Integration testing without the hassle" target="_blank">GeeCON 2017 - TestContainers. Integration testing without the hassle</a> </strong> from <strong><a target="_blank" href="https://www.slideshare.net/arhan">Anton Arhipov</a></strong> </div></center><br />
<h1>JUG.ua & JEEConf, Kiev</h1><br />
<p>The visit to Kiev (Kyiv) was super-productive. I've visited EMAP offices of the on-site presentation as well as a local JUG meetup just before the conference. Very good attendance: 100+ people came to the meetup. Interestingly enough, in Ukraine (as well as in Russia) people ask questions in an interesting way: they usually start the question with "What if ...". They are always curious to find the limitations of the technology, the approach, the method, etc - almost like trying to break things. I think this critical mindset is very helpful when you have to develop software these days.</p><center><iframe src="//www.slideshare.net/slideshow/embed_code/key/fGoz1yIgbaDe09" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="//www.slideshare.net/arhan/jugua-20170225-java-bytecode-instrumentation" title="JUG.ua 20170225 - Java bytecode instrumentation" target="_blank">JUG.ua 20170225 - Java bytecode instrumentation</a> </strong> from <strong><a target="_blank" href="https://www.slideshare.net/arhan">Anton Arhipov</a></strong> </div></center><br />
<p>At the JEEConf I have presented 3 talks: 2 on my own, and 1 with Anton Keks, helping to deliver the Kotlin Puzzlers talk. This was a very well organized conference: super-nice view in the center of Kiev, well crafted schedule with the interesting and useful talks, good athmosphere... I recommend :)</p><br />
<p>I had a pleasure to deliver a live coding session about Javassist, though I still have the slides just as a reference for those who attended the session. I don't find this talk to be very useful for the developers, however, attendees still find it interesting, so I'm puzzled with this a bit :) Here are the slides:</p><br />
<center><iframe src="//www.slideshare.net/slideshow/embed_code/key/AGFO67Pwn0d5xO" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="//www.slideshare.net/arhan/jeeconf-2017-having-fun-with-javassist" title="JEEConf 2017 - Having fun with Javassist" target="_blank">JEEConf 2017 - Having fun with Javassist</a> </strong> from <strong><a target="_blank" href="https://www.slideshare.net/arhan">Anton Arhipov</a></strong> </div></center><br />
<p>As for the Java class reloading talk, I had some time to update the content since Riga DevDays -- removed boring parts and added a few other things. Lots of "What if.." questions after the talk -- I love this crowd! :)</p><br />
<center><iframe src="//www.slideshare.net/slideshow/embed_code/key/hUqhyi91cVo5B0" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="//www.slideshare.net/arhan/jeeconf-2017-the-hitchhikers-guide-to-java-class-reloading" title="JEEConf 2017 - The hitchhiker’s guide to Java class reloading" target="_blank">JEEConf 2017 - The hitchhiker’s guide to Java class reloading</a> </strong> from <strong><a target="_blank" href="https://www.slideshare.net/arhan">Anton Arhipov</a></strong> </div></center><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-57598311863806573602017-01-22T13:13:00.001-08:002017-01-22T13:17:10.479-08:00Twitterfeed #4Welcome to the fourth issue of my Twitterfeed. I'm still quite irregular on posting the links. But here are some interesting articles that I think are worth sharing.<br />
<br />
<h2>News, announces and releases</h2><br />
<a href="https://techcrunch.com/2017/01/09/atlassian-acquires-trello/">Atlassian aquired Trello.</a> OMG! I mean... happy for Trello founders. I just hope that the product would remain as good as it was. <br />
<br />
<a href="https://blog.docker.com/2017/01/whats-new-in-docker-1-13/">Docker 1.13 was released.</a> Using compose-files to deploy swarm mode services is really cool! The new monitoring and build improvements are handy. Also Docker is now AWS and Azure-ready, which is awesome!<br />
<br />
<a href="https://blog.jetbrains.com/kotlin/2017/01/kotlin-1-1-beta-is-here/">Kotlin 1.1 beta</a> was published with a number of interesting new features. I have mixed feelings, however. For instance, I really find type aliases an awesome feature, but the definition keyword, <i>"typealias"</i>, feels too verbose. Just "alias" would have been much nicer.<br />
Meanwhile, <a href="https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5-0">Kotlin support was announced for Spring 5</a>. I think this is great - Kotlin suppot in the major frameworks will definitely help the adoption. <br />
<br />
Is there anyone using Eclipse? [trollface] <a href="https://blog.gradle.org/announcing-buildship-2.0">Buildship 2.0 for Eclipse</a> is available, go grab it! :)<br />
<br />
<h2>Resonating articles</h2><br />
<a href="http://www.defstartup.org/2017/01/18/why-rethinkdb-failed.html">RethinkDB: Why we failed.</a> Probably the best post-mortem that I have ever read. You will notice a strange kvetch at first about the tough market and how noone wants to pay. But then reading forward the author honestly lists what was really wrong. Sad that it didn't take off, it was a great project. <br />
<br />
<a href="http://blog.cleancoder.com/uncle-bob/2017/01/11/TheDarkPath.html">The Dark Path</a> - probably the most contradicting blog post I've read recently. Robert Martin takes his word on Swift and Kotlin. A lot of people, the proponents of strong typing, reacted to this blog post immediately. <a href="https://twitter.com/viktorklang/status/819531016029294592">"Types are tests!"</a>, they said. However, I felt like Uncle Bob just wrote this articles to repeat his point about tests: <i>"it doesn't matter if your programming language strongly typed or not, you should write tests"</i>. No one would disagree with this statement, I believe. However, the followup article was just strange: <a href="http://blog.cleancoder.com/uncle-bob/2017/01/13/TypesAndTests.html">"I consider the static typing of Swift and Kotlin to have swung too far in the statically type-checked direction."</a> OMG, really!? Did Robert see Scala or Haskell? Or Idris? IMO, Swift and Kotlin hit the sweet spot in regards to type system that would actually _help_ the developers without getting in the way. Quite a disappointing read, I have to say.. <br />
<br />
<h2>Java 9</h2><br />
<a href="http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-January/005505.html">JDK 9 is feature complete.</a> Those are great news. Now, it would be nice to see how will the ecosystem survive with all the <a href="https://github.com/cglib/cglib/issues/93">issues related to reflective access</a>. <a href="https://github.com/raphw/reflection-reset">Workarounds exist</a>, but there should be a proper solution without such hacks. <a href="http://wildfly.org/news/2016/12/12/Jigsaws-Missing-Pieces/">Jigsaw caused a lot of concerns</a> here and there but the bet is that in the long run, the benefits will outweigh the inconveniences.<br />
<br />
<h2>Misc</h2><br />
<a href="https://www.opensourcery.co.za/2017/01/05/the-jvm-is-not-that-heavy/">The JVM is not that heavy</a> <br />
<a href="https://aboullaite.me/15-must-know-dev-tools-tricks/">15 tricks for every web dev</a> <br />
<a href="http://www.yegor256.com/2017/01/17/synchronized-decorators.html">Synchronized decorators</a> <br />
<a href="https://blog.jetbrains.com/upsource/2017/01/18/code-review-as-a-gateway/">Code review as a gateway</a><br />
<a href="http://blog.takipi.com/lean-mean-java-virtual-machine-making-your-docker-7x-lighter-with-alpine-linux">How to build a minimal JVM container with Docker and Alpine Linux</a> <br />
<a href="http://jeroenbellen.com/meet-lagom-the-latest-monolith-killer/">Lagom, the monolith killer</a> <br />
<a href="https://dzone.com/articles/reactive-streams-and-the-weird-case-of-back-pressu">Reactive Streams and the weird case of backpressure</a> <br />
<a href="http://blog.agiledeveloper.com/2017/01/closures-dont-mean-mutability.html">Closures don’t mean mutability.</a> <br />
<a href="https://blog.jetbrains.com/idea/2017/01/git-questions-how-to-keep-a-git-fork-up-to-date/
">How do I keep my git fork up to date?</a> <br />
<br />
<h2>Predictions for 2017</h2><br />
Since it is the beginning of 2017, it is trendy to make predictions for the trends of the upcoming year. Here are some prediction by the industry thought leaders:<br />
<br />
<a href="http://adambien.blog/roller/abien/entry/2017_predictions">Adam Bien’s 2017 predictions</a> <br />
<a href="https://www.azul.com/staring-java-crystal-ball/">Simon Ritter’s 2017 predictions</a> <br />
<a href="http://blogs.tedneward.com/post/2017-tech-predictions/">Ted Neward’s 2017 predictions</a> <br />
<br />
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-56920351706457027782016-12-28T08:02:00.002-08:002016-12-28T08:05:11.371-08:00Twitterfeed #3Welcome to the third issue of my Twitterfeed. Over two weeks since the last post I've accumulated a good share of links to the news and blog posts, so it is a good time "flush the buffer".<br />
<br />
<br />
Let's start with something more fundamental than just the news about frameworks and programming languages. <a href="http://calendar.perfplanet.com/2016/a-tale-of-four-caches/">"A tale of four memory caches"</a> is a nice explanation of how browser caching works. Awesome read, nice visuals, useful takeaways. Go read it!<br />
<br />
Machine Learning seems is becoming more and more popular. So here's a nicely structured knowledge-base at your convenience: <a href="https://github.com/ZuzooVn/machine-learning-for-software-engineers/blob/master/README.md">"Top-down learning path: Machine Learning for Software Engineers"</a>.<br />
<br />
Next, let's see what's new about all the reactive buzz. The trend is highly popular so I've collected a few links to the blog posts about RxJava and related.<br />
<br />
First, <a href="https://zeroturnaround.com/rebellabs/rxjava-for-easy-concurrency-and-backpressure/">"RxJava for easy concurrency and backpressure"</a> is my own writeup about the beauty of the RxJava for a complex problem like backpressure combined with concurrent task scheduling. <br />
<br />
<a href="http://akarnokd.blogspot.com.ee/2016/12/the-reactive-scrabble-benchmarks.html">Dávid Karnok published benchmark results</a> for the different reactive libraries. <br />
<br />
<a href="https://www.infoq.com/articles/Refactoring-Reactive-JDBC">"Refactoring to Reactive - Anatomy of a JDBC migration"</a> explains how reactive approach can be introduced incrementally into the legacy applications. <br />
<br />
The reactive approach is also suitable for the Internet of Things area. So here's the <a href="https://paolopatierno.wordpress.com/2016/12/27/internet-of-things-reactive-and-asynchronous-with-vert-x/">article about Vert.x being used for IoT world</a>. <br />
<br />
IoT is actually not only about the devices but also about the cloud. <a href="https://twitter.com/arungupta">Arun Gupta</a> published a nice write up about <a href="https://blog.couchbase.com/2016/december/aws-iot-button-lambda-couchbase">using the AWS IoT Button with AWS Lambda and Couchbase</a>. Looks pretty cool!<br />
<br />
Now onto the news related to my favourite programming tool, IntelliJ IDEA!<br />
<br />
<a href="https://blog.jetbrains.com/idea/2016/12/intellij-idea-2017-1-eap-is-open/">IntelliJ IDEA 2017.1 EAP has started</a>! Nice, but I'm not amused. Who needs those emojis anyway?! I hope IDEA developers will find something more useful in the <a href="https://youtrack.jetbrains.com/issues/IDEA">bug tracker</a> to fix and improve.<br />
<br />
<a href="https://twitter.com/andrey_cheptsov">Andrey Cheptsov</a> experiments with <a href="https://twitter.com/andrey_cheptsov/status/812347007922798592">code folding in IntelliJ IDEA</a>. The <a href="https://plugins.jetbrains.com/idea/plugin/9320-advanced-expressions-folding">Advanced Expressions Folding</a> plugin is available for download - give it a try!<br />
<br />
Claus Ibsen announced that the <a href="http://www.davsclaus.com/2016/12/work-started-on-apache-camel-intellij.html">work has started on Apache Camel IntelliJ plugin</a>. <br />
<br />
Since we are at the news about IntelliJ IDEA, I think it makes sense to see what's up with Kotlin as well. <a href="https://blog.jetbrains.com/kotlin/2016/12/kotlin-1-0-6-is-here/">Kotlin 1.0.6</a> has been released, which is the new bugfix and tooling update. Seems like Kotlin is getting more popularity and people try to use it <a href="https://blog.jetbrains.com/kotlin/2016/12/kotlin-1-0-6-is-here/">in conjunction with popular frameworks like Spring Boot and Vaadin</a>.<br />
<br />
Looks like too many links already so I'll stop here. I should start posting those more often :)<br />
<br />
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-4904804362384110812016-12-05T15:07:00.000-08:002016-12-05T15:10:11.250-08:00Twitterfeed #2<p>So this is the second issue of my Twitterfeed, the news that I noticed in Twitter. Much more sophisticated compared to the <a href="http://arhipov.blogspot.com.ee/2016/11/twitterfeed-1.html">first post</a>, but still no structure and no definite periodicity.</p><br />
<h2>Articles:</h2><br />
<p><a href="https://blog.jetbrains.com/idea/2016/12/java-annotated-monthly-december-2016/">Java Annotated Monthly - December 2016</a>. Nice collection of articles about Java 9, Java 8, libraries and frameworks, etc. With this, my Twitterfeed is now officially meta! 😃 </p><p>RebelLabs published <a href="http://zeroturnaround.com/rebellabs/java-generics-cheat-sheet/">Java Generics cheat sheet</a>. Print it out and put at the wall in your office!</p><p><a href="https://patrickgrimard.io/2016/11/24/server-side-rendering-with-spring-boot-and-react/">Server side rendering with Spring and React</a>. Interesting approach to UI rendering with React. Some parts of the UI are rendered at the server side, and some data is then rendered at the client side.</p><p><a href="https://vladmihalcea.com/2016/12/01/one-year-as-a-developer-advocate/">One year as a Developer Advocate</a>. <a href="https://twitter.com/vlad_mihalcea">Vlad Mihalcea</a> reflects on his achievements from the first year in the role of a Developer Advocate for Hibernate. Well done!</p><p><a href="https://twitter.com/tagir_valeev/status/805598219015229440">IDEA 2016.2 Icon Pack</a>. IDEA 2016.3 update came with the new icons and some people don’t really like those. There is now a plugin to replace the new icons with the old icons. Enjoy! </p><p>Oh, and talking about IntelliJ IDEA, there is another great blog post related to 2016.3 release. Alasdair Nottingham writes about Liberty loos applications support in IDEA: <a href="https://developer.ibm.com/wasdev/blog/2016/11/30/faster-application-development-with-intellij-idea-2016-3/">Faster application development with IntelliJ IDEA 2016.3</a></p><p><a href="https://www.oreilly.com/ideas/reactive-programming-vs-reactive-systems">Reactive programming vs Reactive systems</a>. <a href="https://twitter.com/jboner">Jonas Boner</a> and <a href="https://twitter.com/viktorklang">Viktor Klang</a> make it clear, what is the difference between the two. "Messages have a clear (single) destination, while events are facts for others to observe".</p><p><a href="http://www.yegor256.com/2015/06/18/good-programmers-bug-free.html">Good Programmers Write Bug-Free Code, Don’t They?</a> Yegor Bugayenko has a good point about the relation of good programming to a bug-free code.</p><p><a href="https://medium.com/@johnmcclean/cyclops-java-by-example-n-queens-7cacbb05f684#.pdb17z2gm">Cyclops Java by Example: N-Queens</a>. A coding kata for N-Queens problem using <a href="https://github.com/aol/cyclops-react/wiki/For">"cyclop's for-comprehensions"</a>.</p><p><a href="https://spring.io/blog/2016/05/31/zero-downtime-deployment-with-a-database">Zero downtime deployment with the database</a>. The name says it all.</p><p><a href="https://www.infoq.com/news/2016/11/rxjava-2-with-reactive-streams">RxJava 2.0 interview with David Karnok</a> about the major release. Here comes support for Reactive Streams specification!</p><p><a href="https://www.infoq.com/articles/reactor-by-example">Reactor by Example</a>. Reactor is very similar to RxJava, but it is also in the core of Spring Framework’s 5.0 reactive programming model.</p><p><a href="https://dzone.com/articles/performance-testing-vs-load-testing-vs-stress-test">An explanation of the different types of performance testing</a>. I think this is quite important to make the difference.<br />
<br />
<h2>Videos:</h2><br />
<p><a href="https://www.youtube.com/watch?v=oyLBGkS5ICk">Spec-ulation by Rich Hickey</a>. As usual, must watch!</p><p><a href="https://www.youtube.com/watch?v=6dfBd-2Oq1M&feature=youtu.be">Microservices evolution: how to break your monolithic database</a>. Microservices are becoming mainstream, it seems. So we need best practices for building microservices based systems.</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-44566283552252017742016-11-22T15:22:00.000-08:002016-11-22T15:35:16.202-08:00Twitterfeed #1<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><i>Twitterfeed</i></b> is the collection of news that I find via Twitter. I have no particular system or a method on how do I pick the news. Neither do I have a predefined period for grouping the news. It is neither daily or weekly or monthly - it is all just random. Enjoy! :)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />
</span><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://mail.openjdk.java.net/pipermail/announce/2016-November/000215.html">Java 10 is now officially a project</a><br />
</span> <span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://blog.jetbrains.com/idea/2016/11/intellij-idea-2016-3-ga-java-8-and-es6-debugger-and-ui-improvements-and-a-ton-more/">IntelliJ IDEA 2016.3, my favourite IDE, was released!!! Yay!</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://blog.jetbrains.com/clion/2016/11/clion-2016-3-released/">CLion 2016.3, a IDE for C/C++ development was released</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://blog.jetbrains.com/dotnet/2016/11/21/jetbrains-rider-public-preview/">Rider, a new IDE for .NET is now publicly available via EAP</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://akka.io/news/2016/11/18/akka-2.4.14-released.html">Akka 2.4.14 was released</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://ceylon-lang.org/blog/2016/11/22/ceylon-1-3-1/">Ceylon 1.3.1 was released</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://fedoramagazine.org/fedora-25-released/">Fedora 25 was released</a></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Heinz Kabutz teaches <a href="https://vimeo.com/192657568">how to implement our own ArrayList in less than 10 minutes</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Martin Kleppmann talks about <a href="https://twitter.com/martinkl/status/801117724223082496">conflict resolution for eventual consistency</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Yegor Bugayenko <a href="https://www.youtube.com/watch?v=R1lA7pN60xg">rants about software architects</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Roland Kuhn writes about <a href="https://github.com/rkuhn/blog/blob/master/01_my_journey_towards_understanding_distribution.md">understanding distribution</a></span><br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-39708728479287374972016-05-18T15:01:00.001-07:002016-05-22T12:12:31.218-07:00Hello World with JBoss Modules <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://github.com/jboss-modules/jboss-modules">JBoss Modules</a> is quite an interesting project that powers JBoss application server and some other projects in JBoss ecosystem. However, I was surprised to find out that there isn't much you can find about Modules on the webs. Documentation is... <strike>bad</strike> half-done, not that many tutorials, no good examples of how you could use this awesome library in your project. The best you can find is the description on how to apply JBoss Modules within the application server. (sad panda)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I was looking for the simplest "Hello World" example and couldn't find it. Well, why not create one myself then? </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h2 style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b>Downloading JBoss Modules</b></span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">A surprising fact is that you won't find JBoss Modules in the list of upstream projects at <a href="http://www.jboss.org/projects/#!">jboss.org</a>. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">The first option is to download the </span><b style="font-family: Arial, Helvetica, sans-serif;">jboss-modules.jar</b><span style="font-family: "arial" , "helvetica" , sans-serif;"> from </span><a href="https://bintray.com/bintray/jcenter/org.jboss.modules%3Ajboss-modules/view" style="font-family: Arial, Helvetica, sans-serif;">Bintray</a><span style="font-family: "arial" , "helvetica" , sans-serif;"> or </span><a href="http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.jboss.modules%22%20AND%20a%3A%22jboss-modules%22" style="font-family: Arial, Helvetica, sans-serif;">Maven Central</a><span style="font-family: "arial" , "helvetica" , sans-serif;">. And the second option is to </span><a href="https://github.com/jboss-modules/jboss-modules/releases" style="font-family: Arial, Helvetica, sans-serif;">build it from sources</a><span style="font-family: "arial" , "helvetica" , sans-serif;">. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Oh, ok, one more option (not the best one) is to download the application server that includes <b>jboss-modules.jar, </b>e.g. <a href="http://wildfly.org/">WildFly</a>.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h2 style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b>Hello World</b></span></h2>
<div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Ahh, the good old "Hello World" :) The main application class is as follows:</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">
public class Main {</div>
<div style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">
public static void main(String[] args) {</div>
<div style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">
new Hello().say();</div>
<div style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">
}</div>
<div style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">
}</div>
</div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">So we have a dependency, the Hello class, that will reside in a different module:</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><b>public class Hello {</b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><b> public void say(){</b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><b> System.out.println("Hello!");</b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><b>}</b></span></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
So to mimic the modules we first have to compile both classes and assemble corresponding JARs. Plus, a proper directory layout is expected by JBoss Modules to resolve the artefacts.</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu0bPcBl6HN631oPa53IbKk7QpXqOzTj04aC5xsddDNxTbzolfIfYRNfm8GM-FuRcf_KEyxm7lV8YrkOsK57Kp8SWF39ElY75WmImQ12-qEMGq4xj6Jqm5bvyH8pWDeNRI0eTzAP024qs/s1600/Screenshot+2016-05-19+00.43.36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu0bPcBl6HN631oPa53IbKk7QpXqOzTj04aC5xsddDNxTbzolfIfYRNfm8GM-FuRcf_KEyxm7lV8YrkOsK57Kp8SWF39ElY75WmImQ12-qEMGq4xj6Jqm5bvyH8pWDeNRI0eTzAP024qs/s320/Screenshot+2016-05-19+00.43.36.png" width="277" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Main class belongs to '<b>app</b>' module, and Hello class belongs to '<b>hello</b>' module. Each module requires module.xml descriptor. This part is <a href="https://docs.jboss.org/author/display/MODULES/Module+descriptors">somewhat documented</a> actually. Also the '<b><i>main</i></b>' directory that you see within each module's directory structure <a href="https://docs.jboss.org/author/display/MODULES/Module+names">is actually a version</a> (!). </span></div>
<blockquote class="tr_bq" style="clear: both; text-align: left;">
<span style="background-color: white; color: #333333; font-family: "arial" , "helvetica" , "freesans" , sans-serif; font-size: 13.3333px; line-height: 17.3333px;">A version slot identifier is an arbitrary string; thus one can use just about any system they wish for organization. If not otherwise specified, the version slot identifier defaults to "main".</span></blockquote>
<div style="font-family: Arial, Helvetica, sans-serif;">
Here's the module.xml for the app module:</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><?xml version="1.0" encoding="UTF-8"?></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><module xmlns="urn:jboss:module:1.5" name="app"></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <main-class name="Main"/></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <resources></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <resource-root path="main.jar"/></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> </resources></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <dependencies></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <module name="hello"/></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> </dependencies></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></module></span></div>
</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
It specifies the main class (i.e. Main), the reference to the actual JAR that will be used in this module's <b><i>classpath</i></b>, and a dependency - the '<b>hello</b>' module.</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
Same module.xml for the '<b>hello</b>' module:</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><?xml version="1.0" encoding="UTF-8"?></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><module xmlns="urn:jboss:module:1.5" name="hello"></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <resources></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> <resource-root path="hello.jar"/></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"> </resources></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"></module></span></div>
</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Voila! Now we can execute our brand new modular "Hello World" app:</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">> java -jar jboss-modules-1.5.1.Final.jar -mp mods app</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">Hello! </span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The format for the command is as follows. First, </span><span style="font-family: "courier new" , "courier" , monospace;">java -jar jboss-modules.jar</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> is used to bootstrap the environment; </span><span style="font-family: "courier new" , "courier" , monospace;">-mp mods</span><span style="font-family: "arial" , "helvetica" , sans-serif;">, and the '</span><span style="font-family: "courier new" , "courier" , monospace;">app</span><span style="font-family: "arial" , "helvetica" , sans-serif;">' parameter is the name of the application module that should be executed.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This example isn't really practical, but at least it gives a hint on how to get started with JBoss Modules. Hopefully, one day, the documentation for this awesome project will be complete and there will be a bit more tutorials for different the use cases.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
</div>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-31008370051135503582016-02-12T15:20:00.000-08:002016-02-13T08:37:07.797-08:00HotSwap vs hot deploy<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><b>It is the year 2016 and one still has to explain that HotSwap and hot deploy in Java IDEs is not the same thing.</b></span></div>
<span id="docs-internal-guid-3799378a-d7b4-c9af-7c67-9254c3fa515d"><br /></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">Stackoverflow is full of questions about avoiding restarts of Java applications. So of the answers suggests that “Eclipse can update code without restarting the application” or “IntelliJ IDEA can hot update running applications” or “NetBeans automatically updates running code in debugger”. But the ultimate solution for this problem is <a href="http://zeroturnaround.com/software/jrebel/">JRebel</a>, of course. </span><br />
<span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><b>UPD</b>: You can also read about various solutions to the redeployment problem in my <a href="http://stackoverflow.com/questions/17419900/what-are-the-differences-between-the-various-java-plugins-for-hot-class-reloadin/17642585#17642585">Stackoverflow answer</a>.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">One fundamental thing that people don’t understand is that it is not even the capability of an IDE to be able to update applications. </span><span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><u>The IDE is just a medium</u></span><span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"> -- it only triggers the update, and then the runtime environment is the one responsible for updating the code.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Repeat after me</span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<blockquote class="tr_bq" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">HotSwap and Hot deploy is not the same thing!</span></blockquote>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="font-family: "arial"; font-size: 21.3333px; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">What is HotSwap?</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/enhancements1.4.html#hotswap">HotSwap (тм)</a> is the technology in HotSpot JVM that is tailored at updating class definitions at runtime. Most importantly, </span><span style="font-family: "arial"; font-size: 14px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">"HotSwap adds functionality to the Java Platform Debugger Architecture (JPDA) to allow a class to be updated while under the control of a debugger”</span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">. </span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">So when it comes to IDEs, once an application is started in a debug mode, the IDE can trigger class redefinition in a running JVM by utilizing <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/">JPDA</a></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">. </span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">If you are interested in the intimate details of HotSwap, read the <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.66.1812&rep=rep1&type=pdf">“Safe class and data evolution in large and long-lived java applications” paper by M. Dmitriev</a>.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">It is important to understand the limitations of HotSwap: </span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><b>it is limited only to updating statements of code inside methods</b></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">. Can’t change method signatures, can’t add new methods, fields, etc. Some JVM implementations are able to do a bit more. For instance, with IBM J9 JVM it is possible to add new methods to an existing class. Nevertheless, HotSwap capabilities are minimal. A <a href="http://openjdk.java.net/jeps/159">JEP for enhanced class redefinition</a> </span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">has been submitted long ago, and even a <a href="http://ssw.jku.at/dcevm/">research project</a></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"> was sponsored by Oracle, but no further progress was made.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">The bottom line here is that </span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><b>HotSwap is not a feature of an IDE</b></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">, it is the ability of a JVM that you use.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="font-family: "arial"; font-size: 21.3333px; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">What is hot deploy?</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">Hot deploy is the </span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><b>ability of application container to automatically deploy (web) applications</b></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"> at the startup. Obviously, the same feature can be applied to re-deploy the applications without restarting the JVM process. </span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">Hot deploy is </span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><b>not</b></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"> a feature in any of the IDEs either. IDEs can only trigger (re)deployment of an application by either copying the artefacts to a correct location, or by using hooks if provided by the application server. So this is totally application server specific - this is what server adapters are for! It requires the IDE to be aware of the application server specifics, hence some people affiliate this functionality to their IDE.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14px; line-height: 19.32px; white-space: pre-wrap;">Redeploying the application drops its state. Sometimes, application server can serialize/deserialize HTTP session state, but that's about it, not more. It can't preserve the state of the structures inside the application; internal caches have to be warmed up; framework internals have to be reinitialized, etc. The process is time consuming. </span></span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">Application servers rely on class loader magic to redeploy applications. You can read about it in details in <a href="http://zeroturnaround.com/rebellabs/rjc301/">ZeroTurnaround’s blog</a></span><span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="font-family: "arial"; font-size: 21.3333px; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Summary</span></h2>
<span style="font-family: "arial"; font-size: 14px; vertical-align: baseline; white-space: pre-wrap;">Make sure you use the terms correctly -- 'HotSwap' and 'hot deploy' is not the same thing! You may other terms, like 'hot update' -- then make sure to ask, what does the person actually means by this, because the devil is in the details.</span></div>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-41720355288475206632015-12-10T13:15:00.001-08:002015-12-10T13:15:43.971-08:00Another great Java interview question: Singleton<p>I'm not a big fan to ask to write code at the interviews. But I still find it useful to do some coding exercises at the whiteboard. One of my favourites is the Singleton pattern. Because Singleton is so simple, you can use it as a starter for so many interesting discussions. </p><p>it often comes down to the discussions about the Singleton being lazy or eager. And while it leads to the discussion about Java Memory Model, it's not the most interesting one. No one understands Java Memory Model anyway :)</p><p><i>BTW, did you know that <a href="http://stackoverflow.com/a/71399/431270">a single-element enum type is the best way to implement a Singleton</a>?</i></p><p>Yes! And you can't imagine how many people do fail with this. If you deploy 2 web applications with the same Singleton class, will there be two instances of the same Singleton or one? Of course, there isn't one true answer for this question - you have to ask the details. The the answer depends much on how the class is loaded. If the class is packaged within the WARs, then you get 2 instances of the Singleton.</p><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOxKcrf5Tly1VzkA4mq3sjrWHw3GHLbtlJn0GdXh8qt-IofpKtO_X-d1SXudl9gCVcCTT_JjFa2J15DqEre42fT2ftdEDRkTu_4XXCQj_bpR0K7wtUsYEe3e5tNUJU6eoalHocROEFtZc/s1600/singleton-highlander.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOxKcrf5Tly1VzkA4mq3sjrWHw3GHLbtlJn0GdXh8qt-IofpKtO_X-d1SXudl9gCVcCTT_JjFa2J15DqEre42fT2ftdEDRkTu_4XXCQj_bpR0K7wtUsYEe3e5tNUJU6eoalHocROEFtZc/s640/singleton-highlander.png" /></a></div><br />
<p>This is why Singleton is such a great interview question - it opens a lot of topics for further discussion!</p><br />
<br />
<br />
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-47495519097818783082015-11-21T15:53:00.002-08:002015-11-26T10:59:18.933-08:00final/finally/finalize<p>I have been interviewing candidates for Java developer jobs for a full decade at this point. I have tried various approaches for the interviews: various tests about language and the APIs, whiteboard programming, bug hunting, homework assessments, etc. There is no best approach for the interviews - it merely depends on the expectations, candidate background, position, day of the week, weather, whatever else.</p><p>Despite all the details, I’ve found one interview question that works like a charm. It is almost the best question to start with. And it is quite efficient in filtering the candidates early enough if have to screen a lot of candidates.</p><p>Here’ it is:</p><blockquote>What is the different between final, finally & finalize?</blockquote><p>How is this even a question, you would ask? Asking about the difference of the things that cannot be compared!? Well, apparently, a lot of developers can't make a clear difference. Those who don’t - you just don’t have to interview them further :) </p><p>OK, you asked this and candidate answered this brilliantly, now what? Well, I did tell you that it is a very good question to start with, didn’t I? Next, you can take it to any direction of your choice:</p><ul><li><b>final</b> - you may take the discussion to <a href="http://arhipov.blogspot.com.ee/2011/04/just-some-java-reflection-madness.html">Reflection API</a>, for instance. Or you can discuss how the final keyword helps with concurrent programming in Java.</li>
<li><b>finally</b> - talk more about the exceptions in Java and discuss some puzzles. Like the one below. <i>What does it print?</i></li>
<script src="https://gist.github.com/antonarhipov/716b708a8b8ff3fe2f21.js"></script>
<li><b>finalize</b> - the discussion about <i>finalize()</i> method is only useful to validate the nerd level of the candidate. Usually you’d check why one <a href="http://howtodoinjava.com/2012/10/31/why-not-to-use-finalize-method-in-java/">shouldn't use <i>finalize()</i> in first place</a>. Maybe some rare candidate can tell about legitimate uses of finalize(). This most likely shows that he or she remembers what is written in Item 7 from <a href="http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp/0321356683">Effective Java</a>.</li>
</ul><p>I hope you get my point now, why this strange question is a very good one for the Java interviews. <i>Have fun!</i></p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-41158161861435629022015-07-23T13:37:00.000-07:002015-07-23T13:52:48.141-07:00I will be speaking at JavaOne 2015<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtwlo9XkBv3GLkjP9eEwaWJ6H1C3gWSHV10TyXFyzSTNEbjUShjQXF4vb7Imw6T0mQwGjSfD3wKSZItJXdrHUGSK9limSqTPN90DreSJdmzbzVtNmYzsSXgXHbiAClZbxMZ7p6jSv3kgY/s1600/ImSpeaking.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtwlo9XkBv3GLkjP9eEwaWJ6H1C3gWSHV10TyXFyzSTNEbjUShjQXF4vb7Imw6T0mQwGjSfD3wKSZItJXdrHUGSK9limSqTPN90DreSJdmzbzVtNmYzsSXgXHbiAClZbxMZ7p6jSv3kgY/s1600/ImSpeaking.jpg" /></a></div><p>I'll be speaking at JavaOne this year again! This time I have 2 talks accepted:</p><p><b>CON3597 - Having Fun with Javassist.</b> This is merely a live coding session where I demonstrate various uses of the Javassist library for Java bytecode manipulation. I've delivered this talk multiple times and every time it is different as it turns out quite interactive and attendees usually ask questions right in the middle of the talk so I have to adjust the content as I go. Usually it's quite fun, so I enjoy presenting this talk.</p><p><b>CON6699 - What's the Best IDE for Java EE?</b> I'm not sure how this one turns out - it's so much to talk about and so little time. I'll be presenting this talk along with <a href="https://twitter.com/maxandersen">Max Rydahl Andersen</a> and <a href="https://twitter.com/AdamBien">Adam Bien</a>. This time we're focusing solely on Java EE. Basically - it's and overview of what's available for Java EE users in Eclipse, NetBeans IDE, and IntelliJ IDEA.</p><br />
<p>Both the talks can be found in the <a href="https://events.rainfocus.com/oow15/catalog/oracle.jsp?event=javaone&search=arhipov&search.event=javaoneEvent">content catalogue for JavaOne</a>.</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com2tag:blogger.com,1999:blog-7020955483078867032.post-34238495794492793342015-07-10T05:18:00.000-07:002015-07-10T05:18:09.502-07:00GeekOut 2015: CompletableFuture<p>The talk by <a href="https://twitter.com/tnurkiewicz">Tomasz Nurkiewicz</a> about <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html">CompletableFuture</a> was rated the highest at GeekOut this year. This is really interesting API that appeared in Java 8 </p><blockquote>A Future that may be explicitly completed (setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.</blockquote><br />
<iframe src="https://player.vimeo.com/video/131394616" width="600" height="338" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/131394616">Tomasz Nurkiewicz - CompletableFuture in Java 8, asynchronous processing done right.</a> from <a href="https://vimeo.com/zeroturnaround">Official ZeroTurnaround Account</a> on <a href="https://vimeo.com">Vimeo</a>.</p><p>Some time ago Tomasz published a really nice series of articles at his blog - worth reading!</p><a href="http://www.nurkiewicz.com/2013/05/java-8-definitive-guide-to.html">Java 8: Definitive guide to CompletableFuture</a><br />
<a href="http://www.nurkiewicz.com/2013/05/java-8-completablefuture-in-action.html">Java 8: CompletableFuture in action</a><br />
<p>And there's more!</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com1tag:blogger.com,1999:blog-7020955483078867032.post-54148228447860364792015-07-09T12:48:00.000-07:002015-07-09T12:48:21.428-07:00GeekOut 2015 recordings are available<p>All the videos from GeekOut 2015 are available: <a href="http://2015.geekout.ee/videos/">http://2015.geekout.ee/videos/</a></p><br />
<p>Here are the two talks that seemed the most interesting to me: </p><br />
<iframe src="https://player.vimeo.com/video/131393446" width="600" height="338" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/131393446">Martin Thompson - Practicing at the Cutting Edge</a> from <a href="https://vimeo.com/zeroturnaround">Official ZeroTurnaround Account</a> on <a href="https://vimeo.com">Vimeo</a>.</p><br />
<iframe src="https://player.vimeo.com/video/131688512" width="600" height="338" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/131688512">Nitsan Wakart - Lock Free Queues</a> from <a href="https://vimeo.com/zeroturnaround">Official ZeroTurnaround Account</a> on <a href="https://vimeo.com">Vimeo</a>.</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0Tallinn, Estonia59.436960799999987 24.75357459999997959.178853299999986 24.108127599999978 59.695068299999988 25.39902159999998tag:blogger.com,1999:blog-7020955483078867032.post-11472836436943719272015-04-08T14:20:00.001-07:002015-04-08T14:22:35.784-07:00XRebel 2.0 with Application Profiling<p>From the very start, our users requested profiler capabilities in XRebel. As of 2.0, it is possible to get the performance overview for every request and identify the slowest methods.</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA-dHhJI05SmwS7PqZMpw1xMSw1qVSW_2GGupbFPCznHKB-BZYayrX0tftgOiqys-EG7tz5d5yDMhygA10dA5GpMIbtBHSFVN06ZsatSjFzTtIu6qnnSPXxq9iQvjaMpXccml9gbiKCRE/s1600/Screenshot+2015-04-08+20.07.03.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA-dHhJI05SmwS7PqZMpw1xMSw1qVSW_2GGupbFPCznHKB-BZYayrX0tftgOiqys-EG7tz5d5yDMhygA10dA5GpMIbtBHSFVN06ZsatSjFzTtIu6qnnSPXxq9iQvjaMpXccml9gbiKCRE/s640/Screenshot+2015-04-08+20.07.03.png" /></a>
<p>The profiler view shows the time distribution in the call tree by assigning the percentages to the individual nodes that represent method invocations. The slowest methods are also accompanied with an extra percentage figure that indicates the method own contribution time.</p>
<p>JSP tag mapping is one neat little feature, new in XRebel 2.0. Instead of a cryptic runtime name XRebel displays the real JSP tag.</p>
<p>In 2.0, there are some more notable improvements to the existing features. The session component is now able to handle very large HTTP session snapshots. And of course, there's a ton of little UI improvements -- all to make the profiler more pleasant to use.</p>
<p>Links for XRebel:</p>
<ul>
<li><a href="https://zeroturnaround.com/software/xrebel/download/">Download</a></li>
<li><a href="http://zeroturnaround.com/software/xrebel/features/">Features</a></li>
<li><a href="http://zeroturnaround.com/software/xrebel/learn/">Documentation</a></li>
</ul>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com3tag:blogger.com,1999:blog-7020955483078867032.post-68381267110609529952015-04-05T13:19:00.001-07:002015-04-05T13:19:47.934-07:00Grails 3 Released. Setting up -javaagent<p><a href="http://grails.io/post/115110650393/grails-3-0-released-and-the-road-ahead">Grails 3 was released</a> just recently and with <a href="http://grails.github.io/grails-doc/3.0.x/guide/introduction.html#whatsNew">all the new stuff</a> it looks really-really-really awesome release! (Really hope that Grails will find the new home now). The two key changes for me are 1) moving to Gradle instead of Gant, and 2) building on top of Spring Boot. NOw it looks like it's basically the Gradle project with custom conventions that are derived from Grails 2.x.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCivBPR_zigA-yTRPdjcu2eLIFV2XYqlK9ZZ6kFb15uBlVo2DhkNwbAEkAgwrAANtjT-1ZhzJmh_BfeGz1Kgh6zgt-Pb8EmAMrVlEu4PVkYoQF8a0V4JiUHf52cvuJpbWXkxlcWJKDZc/s1600/grails.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCivBPR_zigA-yTRPdjcu2eLIFV2XYqlK9ZZ6kFb15uBlVo2DhkNwbAEkAgwrAANtjT-1ZhzJmh_BfeGz1Kgh6zgt-Pb8EmAMrVlEu4PVkYoQF8a0V4JiUHf52cvuJpbWXkxlcWJKDZc/s400/grails.png" /></a></div>
<p>For the first time, it feels like Grails is not a toy framework any more :)</p>
<p>What's not that cool (<i>my own very subjective opinion</i>), is the introduction of <i>application.yml</i>. It's almost impossible to modify it without reading the documentation. Even XML version of it (yes!) would have been more practical.</p>
<p>There are many other nice things added - go <a href="https://grails.org/single-page-documentation.html">look</a> for yourself.</p>
<h2>Setting up a -javaagent argument for Grails 3</h2>
<p>My personal interest with any new framework or server is usually related to the projects I'm working with. Thus, the first thing I wanted to check is how could I set up a <b>-javaagent</b> for Grails 3 application. Turns out, it's not as simple as you would expect. </p>
<p>Thanks to <a href="https://twitter.com/bsideup">@bsideup</a>, here's the snippet that you'd have to add to build.gradle file to setup a -javaagent argument, given that the agent JAR is located somewhere in file system:</p>
<script src="https://gist.github.com/antonarhipov/15be2f6a868dd0f82b72.js"></script>
<p>In the example above, <b>xrebel.jar</b> is the agent package that is located somewhere in my file system. One can use the absolute path just fine in there.</p>
<p>Here's the another snippet, with DSL-style:</p>
<script src="https://gist.github.com/antonarhipov/c3331f28bc7fe087e2c3.js"></script>
<p>With this, I can confirm, that <a href="http://zeroturnaround.com/software/xrebel/">XRebel</a> works with Grails 3 :)</p>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-85754279749794076902015-03-24T15:48:00.000-07:002015-03-27T14:57:41.233-07:00IntelliJ IDEA 14.1 - Distraction Free Mode<p>IntelliJ IDEA 14.1 was <a href="http://blog.jetbrains.com/idea/2015/03/intellij-idea-14-1-is-here/">released just recently</a> with a good set of new features and improvements. Among other things, one really interesting feature that appeals to me is the new "distraction free mode".</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdPzdYRraWi7S-WhYy5t9ZrMCwKiAzZVeYw6IkkoyvfKW0PNjb-dFUKtNpCmPEvCa0f_YCJ6ZwSPMhOjXGhOWB3gaGZN4t15J1JL_sG7B7z2i9mznKk_1dK9V4ohZ2di1lj2JNVGQqVaI/s1600/Screenshot+2015-03-25+00.09.06.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdPzdYRraWi7S-WhYy5t9ZrMCwKiAzZVeYw6IkkoyvfKW0PNjb-dFUKtNpCmPEvCa0f_YCJ6ZwSPMhOjXGhOWB3gaGZN4t15J1JL_sG7B7z2i9mznKk_1dK9V4ohZ2di1lj2JNVGQqVaI/s320/Screenshot+2015-03-25+00.09.06.png" /></a></div>
<p>Essentially, entering the distraction free mode means that you'd hide away everything but the editor.</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmorH8KKtMaNcrWApHwvMHuKX8lM346m0i8U0Vw0Q613DpwmwP5Z8-0iC4CRkZotL51dNSV1j7Lt1yeQ006SCZFkExIqwSpUp40dJOsAxivbSv6jiL6DuJxUYFt6j8Jin-KDsJcmQSxbM/s1600/Screenshot+2015-03-25+00.11.21.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmorH8KKtMaNcrWApHwvMHuKX8lM346m0i8U0Vw0Q613DpwmwP5Z8-0iC4CRkZotL51dNSV1j7Lt1yeQ006SCZFkExIqwSpUp40dJOsAxivbSv6jiL6DuJxUYFt6j8Jin-KDsJcmQSxbM/s320/Screenshot+2015-03-25+00.11.21.png" /></a></div>
<p>The seasoned IntelliJ IDEA user would now ask, how is it different from "presentation mode" that is already available, or the full screen mode?</p>
<blockquote class="twitter-tweet" lang="en"><p>it would be helpful if <a href="https://twitter.com/intellijidea">@intellijidea</a> explained the exact differences between 'presenation', 'distraction-free' and 'full screen' modes</p>— Prashant Deva (@pdeva) <a href="https://twitter.com/pdeva/status/580454970337730561">March 24, 2015</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>This is a very good question! Let's try to answer that! :)</p>
<h2>Presentation mode</h2>
<p>Presentation mode is designed essentially for delivering <b><i>presentations</i></b>. Some of my friends have adopted the presentation mode for actual coding. But to be honest, it only works fine if you have a reasonably large screen and you're not switching between windows while coding. This is how the whole screen looks like when IntelliJ IDEA is in presentation mode:</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgecIDQZpJdNPg1fUJeEsNzu0Imr4St5NmtyxmdcPhmW-Npjm03oEChDOG3mUgxELqoG71AoyY0W33uUBTaosv6e9tYM2-2Yj759oJqBtoLlh3btEzpTf4d0fl8IT-uU3VZ_RP97IIWjPE/s1600/Screenshot+2015-03-24+23.53.19.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgecIDQZpJdNPg1fUJeEsNzu0Imr4St5NmtyxmdcPhmW-Npjm03oEChDOG3mUgxELqoG71AoyY0W33uUBTaosv6e9tYM2-2Yj759oJqBtoLlh3btEzpTf4d0fl8IT-uU3VZ_RP97IIWjPE/s320/Screenshot+2015-03-24+23.53.19.png" /></a></div>
<p>The default font size in presentation mode is much larger and can be configured in <b>Settings -> Appearance & Behavior -> Appearance</b>. Locate the setting at the bottom of the view:</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibITBuCav3LBdgv2-QIllK7poX8_HfrDFZxGOnbpjmaJTnIYh99rCLMoqc79oFRwy77A7G-6f3iEScXur0BmUSBlhw87nuBAvOpdIGfB8TKceEGDtruQz3KYQWe1G8HR4xIFQygwlKNj0/s1600/Screenshot+2015-03-25+00.21.13.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibITBuCav3LBdgv2-QIllK7poX8_HfrDFZxGOnbpjmaJTnIYh99rCLMoqc79oFRwy77A7G-6f3iEScXur0BmUSBlhw87nuBAvOpdIGfB8TKceEGDtruQz3KYQWe1G8HR4xIFQygwlKNj0/s320/Screenshot+2015-03-25+00.21.13.png" /></a></div>
<br/>
<h2>Full screen mode</h2>
<p>Entering the full screen means exactly that. IDE window will span the full screen area. On Mac OS X it also means that it will take the application window to another desktop, which I actually dislike very much, but it's rather a personal preference. In this mode, nothing is changed in the IDE window - all the toolbars, views, etc <u>are preserved</u>.</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFiz2kE09tVofH51Vk3sCeIDdlz_jXRWpLJISCZ8U4nEkPJszBkp6X1zFY7ZYApDS4U9B6Ay8neVzHxHwIrZWnQhMdQEJj2xa527Ji3FBnInJN4Du6kKfKsE7jPGMQbdNRlFSpzSSOmH0/s1600/Screenshot+2015-03-24+23.53.50.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFiz2kE09tVofH51Vk3sCeIDdlz_jXRWpLJISCZ8U4nEkPJszBkp6X1zFY7ZYApDS4U9B6Ay8neVzHxHwIrZWnQhMdQEJj2xa527Ji3FBnInJN4Du6kKfKsE7jPGMQbdNRlFSpzSSOmH0/s320/Screenshot+2015-03-24+23.53.50.png" /></a></div>
<p>Notice all the control elements and widgets at the screenshot above?</p>
<h2>Distraction free mode</h2>
<p>"Distraction free mode" is actually just a fancy name that the marketers came up with :) In fact, it just means that by entering this mode you only keep the editor. This might sound like you're actually entering the presentation mode, it's an incorrect conclusion. In distraction free mode the IDE window doesn't expand to full screen and the fonts are preserved in the original configuration. Basically, we could call this mode as "Hide all toolbars" and it would probably confuse some users less.</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNb6wy-oiXts6l-IsMSNnvjm6lTYJkwWN8ckjOhwzi3oeEm5bjSFGq8HfzT2CEkvv2xivgu_zjr2tyVpihtEjBsKCsjcpgSd4E-aWIT9NIduTcU_uyRTgGUaSRxwElGIVFUWL7MLCAtH4/s1600/Screenshot+2015-03-24+23.54.20.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNb6wy-oiXts6l-IsMSNnvjm6lTYJkwWN8ckjOhwzi3oeEm5bjSFGq8HfzT2CEkvv2xivgu_zjr2tyVpihtEjBsKCsjcpgSd4E-aWIT9NIduTcU_uyRTgGUaSRxwElGIVFUWL7MLCAtH4/s320/Screenshot+2015-03-24+23.54.20.png" /></a></div>
<p>At the screenshot above, you can see - it's only the editor that occupies the IDE window. No toolbars, no status bar, no additional views, nothing! So this is exactly what I wanted and I'm really pleased with the new feature! In addition, <b>the text is center-aligned!</b></p>
<p>What's also cool is that in this mode I can still navigate the same way as I'm used to it in the normal mode. Navigate to the project tree:</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdsriHOUwYGC2djhVWh-iG6ijNazLfGP9xaNaYTrv_t-Qrpndg0T95nKa6oAqeHNLHv4gtolfQZGvvBpvUk8v06Ryqkg_8NF38oLD7tDHkiA-mlSOfVaHDfiFHuxjPFamC7uwjyvBB18Q/s1600/Screenshot+2015-03-24+23.54.28.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdsriHOUwYGC2djhVWh-iG6ijNazLfGP9xaNaYTrv_t-Qrpndg0T95nKa6oAqeHNLHv4gtolfQZGvvBpvUk8v06Ryqkg_8NF38oLD7tDHkiA-mlSOfVaHDfiFHuxjPFamC7uwjyvBB18Q/s320/Screenshot+2015-03-24+23.54.28.png" /></a></div>
<p>... or call out the navigation bar:</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3PqaeOts1NgcN7GucqupiQtFjgwqRQ7mtzjB4f1BJInSihoVzkTQjiinFVyggu45VfsGlyldP8lovc7DOL3moWpI8XIELiNHQl7tZZLcH6u6qP2GW6VI0Dsq3pZan-U2sgIBSrcDz3Kg/s1600/Screenshot+2015-03-24+23.55.04.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3PqaeOts1NgcN7GucqupiQtFjgwqRQ7mtzjB4f1BJInSihoVzkTQjiinFVyggu45VfsGlyldP8lovc7DOL3moWpI8XIELiNHQl7tZZLcH6u6qP2GW6VI0Dsq3pZan-U2sgIBSrcDz3Kg/s320/Screenshot+2015-03-24+23.55.04.png" /></a></div>
<p>Just have to learn the shortcuts ;)</p>
<p><b>P.S.</b> The new distraction free mode is really cool. However, it is not quite new. In fact, all this was possible long before version 14.1. Even in earlier versions of IntelliJ IDEA you can achieve the same, just not with one mouse click or shortcut press. In the earlier Intellij IDEA versions, in the View menu, you could just hide the toobar, tool buttons, status bar and navigation bar and here you go - you have a "distraction free mode"! :) So the new feature isn't really new. It is rather just a convenience that was added on top of the existing features.</p>
<div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXKHGB-u91ZsIcYlwr8YEVIkXmM6qo4_UeDv08CDwAppexzOl6io330ZMmrUZ-jpoba8NTpqWQtaK5UWAuzp252i4k7oMF1CXpwtELlgpoTdskeU9qkv5fr7DlyjGUmA7YIHUZnvf7bo/s1600/Screenshot+2015-03-25+00.44.01.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXKHGB-u91ZsIcYlwr8YEVIkXmM6qo4_UeDv08CDwAppexzOl6io330ZMmrUZ-jpoba8NTpqWQtaK5UWAuzp252i4k7oMF1CXpwtELlgpoTdskeU9qkv5fr7DlyjGUmA7YIHUZnvf7bo/s320/Screenshot+2015-03-25+00.44.01.png" /></a></div>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com3tag:blogger.com,1999:blog-7020955483078867032.post-32212683509019079532015-03-10T15:22:00.000-07:002016-03-18T17:30:16.009-07:00Packaging Java applications for Mac OS, javapackager<div dir="ltr" style="text-align: left;" trbidi="on">
Stumbled upon an issue with installing <a href="http://www.mucommander.com/">muCommander</a> on Mac. The native installer did not work, saying that the launcher is corrupted, but the portable version worked just fine via the command line:<br />
<pre>java -jar mucommander.jar</pre>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrqUMQc32qnAbtM0pUHFJLxufsg3_WPyghveOkLbfuyZmB1b77hmMJ8pCeFMhaK-sccOD8CM1pT_nPfoA3O1dNarlVJL7eb_t89z2P936h3Tc1z_OqTpZtTIwUnZWcw_96wbTo0yxCNMY/s1600/Screen+Shot+2015-03-10+at+22.46.36.png" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrqUMQc32qnAbtM0pUHFJLxufsg3_WPyghveOkLbfuyZmB1b77hmMJ8pCeFMhaK-sccOD8CM1pT_nPfoA3O1dNarlVJL7eb_t89z2P936h3Tc1z_OqTpZtTIwUnZWcw_96wbTo0yxCNMY/s400/Screen+Shot+2015-03-10+at+22.46.36.png" /></a>
<br />
Launching a GUI app from the command line is not convenient at all. One option is to assemble the *.app package using <a href="http://launch4j.sourceforge.net/">Launch4j</a>. However, I didn't have enough patience to do apply the tool. So I tried looking for an alternative solution.<br />
So I found this guide: <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html#bundle">Packaging a Java App for Distribution on a Mac</a>. And the instructions worked just fine! Here's what I did:
<br />
1. Downloaded the appbundler utility from <a href="https://java.net/downloads/appbundler/">https://java.net/downloads/appbundler/</a><br />
2. Create a build.xml file. For instance:<br />
<script src="https://gist.github.com/antonarhipov/97365c1d9c6d61901341.js"></script>
3. Run "bundle" task: <b>ant bundle</b><br />
Profit! :)<br />
This is all cool and works, but the process is a bit clumsy. One has to download some strange utility and use a legacy build tool to assemble the final artifact. We should do better! So I found another documentation page: <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html">Java Platform, Standard Edition Deployment Guide: Self-Contained Application Packaging</a>. Apparently, there's a <b>javapackager</b> utility included in JDK distribution that you can use to create native packages.<br />
By running the following command in the same folder where mucommander.jar is located, it created the desired artefacts:<br />
<pre>$JAVA_HOME/bin/javapackager -deploy -native -outdir . -outfile mu.app \</pre>
<pre>-srcfiles mucommander.jar -appclass com.mucommander.Launcher -name "muCommander" \</pre>
<pre>-title "muCommander"</pre>
Voila!
<br />
<pre>muCommander-0_9_0 anton$ ls -l bundles/
total 269904
-rw-r--r--@ 1 anton staff 75110066 Mar 10 23:53 muCommander-1.0.dmg
-rw-r--r-- 1 anton staff 63076596 Mar 10 23:53 muCommander-1.0.pkg
drwxr-xr-x 3 anton staff 102 Mar 10 23:53 muCommander.app
</pre>
The only missing bit there is a proper icon, which I was too lazy to bother about :)<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEo5AOaqpakxu0YrJFBmoX80CiR5-z4tkAHbQTa71No_PZAC5bIKYnm5IhpVd-coZENM0CyhD-87YSv1THTS7zUI7m9sUHt8vT9Sest-qZgcWxeDnWu4WNGa4WP8e9Jyfq1t1q4s-aHw0/s1600/Screen+Shot+2015-03-11+at+00.17.31.png" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEo5AOaqpakxu0YrJFBmoX80CiR5-z4tkAHbQTa71No_PZAC5bIKYnm5IhpVd-coZENM0CyhD-87YSv1THTS7zUI7m9sUHt8vT9Sest-qZgcWxeDnWu4WNGa4WP8e9Jyfq1t1q4s-aHw0/s400/Screen+Shot+2015-03-11+at+00.17.31.png" /></a>
</div>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-41424845863784576912015-03-10T11:04:00.000-07:002015-03-10T15:56:52.302-07:00Misconceptions about microservices<p>Every now and then I hear people asking questions like "How can I implement a microservice using Play framework?", or "How can I build a microservice using Spring Boot?". Every time I read this it sparks the "facepalming" reaction in me.</p>
<p>Repeat after me: <b>microservice is not defined by a framework!</b> </p>
<p>It doesn't matter what technology or a framework is used to implement a microservice. It is rather the domain or the functionality in isolation that defines it. Martin Fowler has written <a href="http://martinfowler.com/articles/microservices.html">a nice article</a> for defining the microservice and while he mentions the technology bit there, it's not about technology at all! </p>
<p>Captan Obvious says: if you use Play or Spring Boot to implement a microservice, it doesn't mean that those frameworks can't be used to build silos. Which also means that a microservice is a "mini-silo" :)</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnzhyh38i-muZ-dLd-l1c3esjM76DTWNYagKp_g-dfPujzyi-YqDHDjVynJ1UpJq_VW4y7aX6792Kryo-3Jxhqxux3zXfC_JpjzTHneQYSSkpqL3SunFZNfHPnY2YqYpUYniNe8H4ruYE/s1600/say-microservice.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnzhyh38i-muZ-dLd-l1c3esjM76DTWNYagKp_g-dfPujzyi-YqDHDjVynJ1UpJq_VW4y7aX6792Kryo-3Jxhqxux3zXfC_JpjzTHneQYSSkpqL3SunFZNfHPnY2YqYpUYniNe8H4ruYE/s400/say-microservice.jpg" /></a>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com1tag:blogger.com,1999:blog-7020955483078867032.post-89171920738882697132015-03-09T03:18:00.002-07:002015-03-09T03:24:25.809-07:00XRebel 2.0 Beta is available<p><b><a href="https://zeroturnaround.com/software/xrebel/trial/20beta/">XRebel 2.0 Beta</a></b> is available for download! The new version includes profiling capabilities and it is now possible to get an overview of performance breakdown in a single HTTP request. The cool part is that XRebel shows only the minimal relevant information by filtering out a lot of irrelevant stuff. I have tested the new version with a lot of different enterprise-grade applications, including Atlassian Jira, Magnolia CMS, Liferay Portal, eXo Platform... and it works just great!</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSTcY0WjzUjU0AJW2nuwGJjVRGWdCQPQ8rMf7VX7ziuLQMD1aIO53w8xkE7IQG7mBlzODiO0MQxFJ15uvsG4jzZyRjrxOU1HQiwtI8lv3VnKzTJZ0QhFTJHkmOi1FCoqyfByI8cE79V4U/s1600/xrebel_beta_image.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSTcY0WjzUjU0AJW2nuwGJjVRGWdCQPQ8rMf7VX7ziuLQMD1aIO53w8xkE7IQG7mBlzODiO0MQxFJ15uvsG4jzZyRjrxOU1HQiwtI8lv3VnKzTJZ0QhFTJHkmOi1FCoqyfByI8cE79V4U/s400/xrebel_beta_image.png" /></a>
<p>The greatest feedback so far was that the tool provided the ability to monitor JPA queries and the subsequent JDBC invocations in one go. With the new version, XRebel is turning into a real profiler, yet simple and powerful.</p>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-26642205006484989602015-01-19T13:08:00.001-08:002015-01-19T23:04:53.605-08:00Groovy and Grails<p>The biggest today (19.01.2015) news in the community is probably the announcement regarding <a href="http://www.infoq.com/news/2015/01/Pivotal-Pulls-Groovy-Grails-Fund">Pivotal pulling Groovy/Grails funding</a>. And there are a lot of <a href="http://groovy.329449.n5.nabble.com/ANN-Groovy-is-looking-for-a-new-home-td5722211.html">sad reactions</a> on this in all channels that I have seen.</p>
<p>This might start a panic reaction around Groovy and Grails. IMO, <b>there's nothing to panic about</b>. Groovy and Grails communities are the healthiest and there's a lot of big companies that use Groovy and Grails and who would definitely be willing to sponsor the projects further. I'm pretty sure they all will be in line to get the both projects under their sponsorship just in a few weeks :)</p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUiqQcz8ihxWT55ECvH87B7-TJhPIzbnZDuVXwG-l7T2Ympaf7xbDUxkUtIJvFEvbJc_8L4BYwGZKJpxIwMqb_tJVEhxy-HI3_GEI29DnzR7XzA5RItgm6pbBNWGwrccBNSGC1cu5N7Ms/s1600/groovy-logo-medium.png" /></div>
<p>All-in-all, it might even be very good for Groovy since Pivotal didn't seem to leverage Groovy in their ecosystem with the focus on Cloud Foundry offering. So we might even see an acceleration of Groovy/Grails development once the projects get a new sponsor.</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com1tag:blogger.com,1999:blog-7020955483078867032.post-63484556576064733382015-01-19T05:14:00.001-08:002015-01-19T05:14:37.248-08:00GeekOut 2015 Registration is Open!<p>As of today, the registration to <a href="http://2015.geekout.ee/">GeekOut</a> Java conference in Tallinn is open!</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://2015.geekout.ee/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDD3RXpz0y_Ig2bB7Ylmh_zWE4kOFXXqfPVKhT7jLvBXTO3yDAuxZBgm0hJdtzNJgjcI9r4MKkUy-K_fCIypF2MGTr4RG_G2qqxYrJIk8f83cFMng1XmKxOAwi3zgcU-Zdn3miMeju-5k/s640/geekout-2015.png" /></a></div>
<p>The focus of the conference is on all-Java but not only. For instance, this year we have talks on Dart and Go programming languages. Other talks cover developer tooling, solution architecture, programming methodologies. There will be a few talks on Java concurrency that you shouldn't miss in case you're into writing multithreaded applications in Java.</p>
<p>And here's what the conference is in numbers:</p>
<ul>
<li>2 days</li>
<li>400 attendees</li>
<li>18 excellent talks</li>
<li>and 1 kick-ass party!</li>
</ul>
<p>We're also expecting <a href="https://twitter.com/steveonjava">Stephen Chin</a> to visit us with his awesome <a href="http://nighthacking.com/">Nighthacking</a> sessions, so one should expect a lot of fun from the event!</p>
<p>BTW, If you haven't been to Tallinn yet, this is a great reason to consider visiting and June is just perfect month for this travel!</p>Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0tag:blogger.com,1999:blog-7020955483078867032.post-66469476711366373812015-01-17T15:37:00.000-08:002015-01-17T15:44:12.704-08:00My "fluffy" reading list for 2015<p>In 2014 I was kind of reluctant to reading and the queue of my "to read" books has grown immensely. I could probably spend full time reading the books instead of my actual job - it still wouldn't help to clear up the queue. BTW, I keep track of my reading list at <a href="https://www.goodreads.com/user/show/6503187-anton">Goodreads</a>, that's a nice website!</p>
<p>Why is it a "fluffy" reading list, you'd ask? Because none of the books here are technical. That's a part of my reasoning - if something is not technical, I call it "fluffy". It doesn't mean that it's a bad thing ;) So I though I'd share a few of the "fluffy" books that I'm planning to read next. Maybe someone would see that I'm planning to read a crappy book and can suggest something instead?</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9tvSwNKZ5y0xohKZQyAS_OhyphenhyphenKUk9o0wwCzEJUr8vajjC355MEFE7OR27nM-wqrGK-gN0OFyq94bx8g7K8p8yie_reZAGBdeGlKCp4KeeeJIjSYkQjfSNyEWyWjccgxO3KcvCbj0o6knc/s1600/the-inmates-are-running-the-asylum.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9tvSwNKZ5y0xohKZQyAS_OhyphenhyphenKUk9o0wwCzEJUr8vajjC355MEFE7OR27nM-wqrGK-gN0OFyq94bx8g7K8p8yie_reZAGBdeGlKCp4KeeeJIjSYkQjfSNyEWyWjccgxO3KcvCbj0o6knc/s1600/the-inmates-are-running-the-asylum.jpg" /></a>
<p>The book I'm currently reading is <b><a href="https://www.goodreads.com/book/show/44098.The_Inmates_Are_Running_the_Asylum">The Inmates are Running the Asylum</a></b> Oh man! I wish I would have read the book 5 years ago when I just started to work at <a href="http://zeroturnaround.com/">ZeroTurnaround</a>! I could have saved so much time by now. This is a must read book for every product manager and software designer. Well written, highlights the issues with software from the usability POV.</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsSaNgcMtFBwNmZ7vhj-jgIpgGvFvnMglpB54KMwJ4H7ir0XrLshYe1Wa8VQQqRbz7BWKn88YjncnNSsjlm2HF6KoHTjMX1LYeqS0rNc9X8mbIUq6C6iKUuFqIViwFYZ0rgfZYqQIXemA/s1600/crossing-the-chasm.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsSaNgcMtFBwNmZ7vhj-jgIpgGvFvnMglpB54KMwJ4H7ir0XrLshYe1Wa8VQQqRbz7BWKn88YjncnNSsjlm2HF6KoHTjMX1LYeqS0rNc9X8mbIUq6C6iKUuFqIViwFYZ0rgfZYqQIXemA/s1600/crossing-the-chasm.jpg" /></a>
<p>Next on my list is <b><a href="https://www.goodreads.com/book/show/18085530-crossing-the-chasm">Crossing the Chasm: Marketing and Selling Disruptive Products to Mainstream Customers</a></b>. The author shows that in the Technology Adoption Life Cycle there is a vast chasm between the early adopters and the early majority. The challenge is to narrow this chasm and ultimately accelerate adoption across every segment. I've heard good things about the book, so I think I should give it a try. Nice cover, btw :)</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnlupR4oKJenMsJL6xXaNCOzgNBZTr0jJV-ZtxzRFkDIk68DXet4gOcERk6eDG8AKGXCh5YucaF4TWlx8pnWAUAsqjSYny32wsfdsuH1g-N-45Vn8lpmkq1h0NDJrLEVZGxmwQgPfml0g/s1600/how-google-works.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnlupR4oKJenMsJL6xXaNCOzgNBZTr0jJV-ZtxzRFkDIk68DXet4gOcERk6eDG8AKGXCh5YucaF4TWlx8pnWAUAsqjSYny32wsfdsuH1g-N-45Vn8lpmkq1h0NDJrLEVZGxmwQgPfml0g/s1600/how-google-works.jpg" /></a>
<p><b><a href="https://www.goodreads.com/book/show/23158207-how-google-works">How Google Works</a></b>. I don't even know what to expect. The title is kind of abstract and the potential reader could assume different content depending on how the title is interpreted.</p>
<blockquote>How Google Works is the sum of those experiences distilled into a fun, easy-to-read primer on corporate culture, strategy, talent, decision-making, communication, innovation, and dealing with disruption.</blockquote>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCjCJp_LDs2NJTlsLbGVkc229sQu0BwgynIXmFKRN_g-kNPjkcPs5-Hq1JZA6kH4Nq0n7ZUk0IEuJY6w-0NbS0EOYR6ncoJgaU303CR2Mq9KKhfQS9f1DpEolH8UOvH5zZu6ini5dD_jI/s1600/the-goal.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCjCJp_LDs2NJTlsLbGVkc229sQu0BwgynIXmFKRN_g-kNPjkcPs5-Hq1JZA6kH4Nq0n7ZUk0IEuJY6w-0NbS0EOYR6ncoJgaU303CR2Mq9KKhfQS9f1DpEolH8UOvH5zZu6ini5dD_jI/s1600/the-goal.jpg" /></a>
<p><b><a href="https://www.goodreads.com/book/show/113934.The_Goal">The Goal: A Process of Ongoing Improvement</a></b> was suggested to my by colleagues. One of the reviewers wrote about this book:</p>
<blockquote>The best process improvement novel I've seen, this classic work explains the all-important Theory of Constraints through real life examples and a surprisingly good story. Most books of this nature are exceptionally unrealistic, but this one manages to keep the reader engaged, which is key for an instructional text like this.</blockquote>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jPa92TlGQR_6qGHp3DbOaHyC8E-gP6JJQUxOEc-dBx2nUirHj0j4LRc6obEZ3yqa3DpOuI-Wl8mh31mUaaI-gN3CT81iWCv3yPzs6GHaURuJPtTaDC5HInlecCd2iQx3OymYpOGsG4Q/s1600/the-connected-company.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jPa92TlGQR_6qGHp3DbOaHyC8E-gP6JJQUxOEc-dBx2nUirHj0j4LRc6obEZ3yqa3DpOuI-Wl8mh31mUaaI-gN3CT81iWCv3yPzs6GHaURuJPtTaDC5HInlecCd2iQx3OymYpOGsG4Q/s1600/the-connected-company.jpg" /></a>
<p><b><a href="https://www.goodreads.com/book/show/13628572-the-connected-company">The Connected Company</a>.</b> The title is intriguing :) And good reviews also. I think it's worth reading.</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcTjTmiN9iX0NK9fjckhoioNUScQoPTMxYSFQuyCyx1yIuBIFp7y8EzQ0E77kfzmkVgVdD49KFOJumffRfoUL7LbQxFB6efAbnJ4_B59FIzMVRWTe_WFLAJDM-o81HxVk2lGnVvM7QzvY/s1600/hooked.jpg" imageanchor="1" class="separator"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcTjTmiN9iX0NK9fjckhoioNUScQoPTMxYSFQuyCyx1yIuBIFp7y8EzQ0E77kfzmkVgVdD49KFOJumffRfoUL7LbQxFB6efAbnJ4_B59FIzMVRWTe_WFLAJDM-o81HxVk2lGnVvM7QzvY/s1600/hooked.jpg" /></a>
<p><b><a href="https://www.goodreads.com/book/show/22668729-hooked?from_search=true">Hooked: How to Build Habit-Forming Products</a></b> is probably the last "fluffy" book on my immediate reading list. Again - suggested by colleagues. The title implies one very interesting topic for discussion <i>"Why do some products capture widespread attention while others flop?"</i></p>
Anonymoushttp://www.blogger.com/profile/11951065633319406772noreply@blogger.com0