tag:blogger.com,1999:blog-140019822024-03-13T05:38:51.298+01:00J and I and MeJ for Java |
I for Internet, iMac, iPod and iPad |
Me for meEberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.comBlogger498125tag:blogger.com,1999:blog-14001982.post-19796159124770497162016-02-10T21:36:00.001+01:002016-09-05T20:40:12.059+02:00A Week With the Fairphone 2I have spent about a week with the Fairphone 2 - a phone that aims at using fair trade ideas also for producing smartphones. Besides the ethical reasons for buying the Fairphone 2 there were actually a few technical, too:
<ul>
<li>Dual SIM</li>
<li>A quite up-to-date Android (5.0)</li>
<li>microSD slot</li>
<li>Modular design i.e. every part of the phone like display, microphone etc. can be replaced.</li>
</ul>
I do like the design and it is really easy to open and disassemble. I like the basic design of the phone a lot and wish there were more like it.<br/>
Now I have spent a week with the Fairphone 2 and I regret to say it was less than pleasant:
<ul>
<li>The Android is not plain vanilla. It has some additional features. For example, the OS shows the privacy impact of each App. However, if you disable this feature some Apps don't work. For me Threema did not restore my backup - no error message, nothing. Luckily the Threema support was aware of the issue. If you enable the feature again, there is no problem.</li>
<li>Battery life appears to be not-too-great. I can hardly get a full day without recharging which should be the minimum in my opinion.</li>
<li>The display flickers if the brightness is set to a low value.</li>
<li>I have trouble doing calls. Yesterday I could do a call - but the person I called could not hear me, even after dialing again several times. Today I had trouble understanding the person I called.</li>
<li>The phone reboots - at least once a day, sometimes more often. Today it rebooted during a call. I am <a href="https://forum.fairphone.com/t/fairphone-2-random-reboots-15-times-a-day/11553">not the only one</a>. I don't know any work around. An unreliable phone is a real issue in my opinion. But maybe it is a hardware issue and not all phone have this problem.</li>
<li>There are many minor issues. The phone shows an exclamation mark at the wireless symbol - even though everything works. Only the red LED works - all other don't. The location icon stays on - even though no App requests the location. There is a quite long list of <a href="https://forum.fairphone.com/t/fairphone-2-random-reboots-15-times-a-day/11553">in the forum</a> and <a href="https://fairphone.zendesk.com/hc/en-us/articles/207228996-Fairphone-2-software-issue-report">official report</a>.Those are minor issues and I don't care too much about them - but some of them are so obvious that I wonder whether the phone and its software was actually tested.</li>
</ul>
Today I submitted a support ticket concerning the reboots. It seems the answer can take up to eight working days. I am considering to return it.<br />
So I really think the Fairphone 2 has a lot of potential and I really want the product to succeed. But I am afraid given its current state it is hardly usable for me. I wasn't sure whether I should write this blog post - I really love the technology and the idea behind the Fairphone. But the information concerning the issues is public anyway so I figure this blog post might not be such an issue after all.<br/>
I hope I can update the blog post soon with better news...<br/>
Update 2016-02-17: The support ticket was actually handled quite quickly - actually in less than a day. I tried to tweak the phone to solve the reboot issue at least - but I wasn't successful. So I have applied for returning the phone.<br/>
Update 2016-02-21: Return is not yet approved. I am considering a <a href="http://shiftphones.de/">Shiftphone</a> instead.<br/>
Update 2016-02-26: <a href="https://forum.fairphone.com/t/fairphone-2-random-reboots-15-times-a-day/11553/93">https://forum.fairphone.com/t/fairphone-2-random-reboots-15-times-a-day/11553/93</a> is the first Fairphone's official statement about the reboots. Quite honestly this doesn't look like there will be a fix soon or the problem is fully analyzed. The reboot is not on the list of known issues in the forum or on Fairphone's list of known issues. IIRC it has been on the list in the forums at one point. :-(
Update 2016-08-12:
<ul>
<li>The reboot problem is fixed.</li>
<li> However, my Fairphone destroyed my SIM card - <a href="https://forum.fairphone.com/t/fp2-kills-some-sim-cards/16680">a known problem</a> that is now fixed.</li>
<li>My microphone stopped working at one point. I got a replacement for free and now that problem ist solved, too.</li>
<li>Also there is a problem now that <a href="https://forum.fairphone.com/t/re-enter-sim-pin/20204">required you to reenter the PIN</a>. However, you can deactive the PIN for the SIM card.</li>
</ul>
Still the battery life is not that great and the proximity sensor doesn't work too great - i.e. if you look at the screen during a call, the screen is often blank.
So right now the phone is basically usable and most of the big problems are solved. I use it every day. However, the latest problem around the SIM PIN shows that the quality of the software is still not great.
Update 2016-09-05:
<ul>
<li>Microphone dead again</li>
<li>Cover doesn't look too nice any more</li>
</ul>
So I bought a Moto G4+ to replace the Fairphone 2. I just need a reliable mobile phone.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com5tag:blogger.com,1999:blog-14001982.post-82774305250977486262015-07-06T16:44:00.003+02:002015-07-06T16:44:43.365+02:00Time To Move On...I have started a new blog called <a href="http://www.heise.de/developer/Continuous-Architecture-2687847.html">Continuous Architecture</a> at heise developer. It's in German - sorry to the English audience. I will therefore probably not spend a lot of time on this blog in the future. Thanks a lot for reading through all the material, commenting and the discussions. Hope to see you at the new blog! :-)Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-22328980743409446482015-01-26T10:36:00.000+01:002015-01-26T10:36:00.820+01:00Approaches for Über / Fat JAR Deployment in Java EEI believe the deployment and monitoring model for Java EE Application Server is outdated. If you want to learn more about my opinion refer to my <a href="http://jaxenter.com/java-application-servers-dead-112186.html">article at JAXenter</a>, the <a href="http://de.slideshare.net/ewolff/java-application-servers-are-dead">slides</a> or my <a href="http://www.infoq.com/interviews/eberhard-wolff-java-app-servers">Interview at InfoQ</a>. Instead I advocate a model to deploy an application including all the needed infrastructure as a large JAR file. This model is supported e.g. by <a href="http://vertx.io/">Vert.x</a>, <a href="http://dropwizard.io/">Dropwizard</a>, the <a href="https://www.playframework.com/">Play Framework</a> and of course <a href="http://projects.spring.io/spring-boot/">Spring Boot</a>. However, what about Java EE applications? While in theory there is no reason why a Java EE should not be deployed as a huge JAR file - but there are not that many solutions to actually do that.
So here are some approaches that might be worth looking at:
<ul>
<li>Spring Boot actually does support some Java EE APIs. A <a href="https://spring.io/blog/2014/11/23/bootiful-java-ee-support-in-spring-boot-1-2">Blog Post</a> describes this in more detail. It shows JAX-RS with Jersey, transactions with JTA and the Java EE annotation @Transactional, and also JSR 330 annotations for Dependency Injection. However, the example still uses some Spring classes and some technologies like EJB are not supported. But Spring Boot has a quite advanced model for metrics and monitoring, see <a href="http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready">Spring Boot Actuator</a>.</li>
<li>TomEE supports this model to some extend. See this <a href="https://rmannibucau.wordpress.com/2014/09/23/tomee-embedded-a-spring-boot-air-without-no-ee-features-for-business-code/">older blog post</a>. Also David Belvins of the TomEE team has <a href="https://gist.github.com/dblevins/7d8f70fa81cd8f9b1f8e">quick demo</a> and another <a href="https://gist.github.com/dblevins/7d8f70fa81cd8f9b1f8e">demo</a>.
</li>
<li>There is <a href="https://github.com/chkal/backset">Backset</a> that supports CDI, JSF and JPA - with EJB, JTA and JAX-RS on the roadmap.</li>
<li>Finally <a href="https://github.com/matzew/undertow-jaxrs-test">this repro</a> shows how to use Undertow with JAX-RS in a main method.</li>
</ul>
Thanks for the discussion over at <a href="https://twitter.com/ewolff/status/541248576090025986">Twitter</a> and all the help I got there. If you know any other options - please leave a comment. Thanks!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com5tag:blogger.com,1999:blog-14001982.post-26004441211978412582013-06-07T10:10:00.000+02:002013-06-07T10:10:13.094+02:00MongoDB and the CAP TheoremThe <a href="http://en.wikipedia.org/wiki/CAP_theorem">CAP theorem</a> by Brewer basically says that a distributed systems can only have two of the following three properties:
<ul>
<li>Consistency i.e. each node has the same data</li>
<li>Availability i.e. a node will always answer queries if possible</li>
<li>Partition tolerance i.e. work despite a network failure so nodes cannot communicate with one another</li>
</ul>
In real life things are a little different: You cannot really sacrifice partition tolerance. The network will eventually fail. Or nodes might fail.
<br />
So here is a different approach to understanding the CAP theorem: Imagine a cluster of nodes. Each has a replicated set of data. When the network or a node fails there are two options to answer a query: First a node can give an answer to a query based on the data on that node. This information might be outdated. The other nodes might have received some update that are not propagated yet. So the node might therefore give an incorrect answer - so the system sacrifices consistency.
<br />
The other option in such a situation is to give no answer. Then the system rather won't answer queries than give a potentially incorrect answer. This sacrifices availability - the node does not answer the query even though it is still up.
<br />
So let's take the CAP theorem to better understand MongoDB. MongoDB uses a Master / Slave <a href="http://docs.mongodb.org/manual/replication/">replication scheme</a>. Data is written to a master node and then replicated to the slaves. If a network failure occurs or the master is down a slave takes over as the new master. So how does MongoDB solve the issue concerning CAP? There are settings that influence Mongos behavior:
<ul>
<li><a href=http://docs.mongodb.org/manual/core/write-concern/">Write Concerns</a> let you choose when a write attempt is considered successful. The setting vary from "error ignored" up to settings that define how many nodes must have acknowledged the write operation.</li>
<li><a href="http://docs.mongodb.org/manual/core/read-preference/">Read Preferences</a> allow you to choose whether you want to read from the master or also from slaves.</li>
</ul>
So concerning CAP it leaves you with different options:
<ul>
<li>Using the write concerns you can enforce different level of consistency in the cluster - you can choose how many nodes the data must be stored at. There is a trade off with availability: The write will fail if the number of nodes the data should be stored at is higher than the currently available number of nodes.</li>
<li>The read preference can be used to choose which node data should be read from. If you decide to read data from the master only you will get the data even if it has not been propagated to all nodes.<li>
</ul>
Besides a trade off between availability and consistency these settings obviously also influence performance.
<br />
If you like you can read details about what happens if a MongoDB partitions in <a href="http://aphyr.com/posts/284-call-me-maybe-mongodb">Jepsen</a>.
<br />
So bottom line: MongoDB allows you to fine tune the trade off between consistency and availability using write concerns and read preferences. Concerning partition tolerance there is really no choice - it will eventually happen. So it can be tuned to be AP or CP or something in between - depending on how you tune it. Final note: This is my take on CAP and where MongoDB stands. If you browse around on the web you might find different takes on it. I am happy to discuss the details - leave a comment!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-14985309962991944952013-05-28T13:37:00.000+02:002013-05-28T14:09:17.059+02:00Why Java's Checked Exceptions Are an IssueExceptions were originally introduced to make programs safer. Back in the days languages like C used return codes to signal whether the call was actually successful. The return codes could easily be ignored. So you end up with a program that just continues executing - even though an error occured. Exceptions are meant to solve this. To signal an error an exception is thrown. This exception has to be handled if the error should be resolved. Handling the exception is separated from the rest of the control flow e.g. in a try-block. So handling an error is separated from the rest of the program.
Java introduced three types of exceptions:
<ul>
<li>Errors like <tt>OutOfMemoryError</tt> are unrecoverable problems. So your code cannot really handle them.</li>
<li>Unchecked exceptions are subclasses of <tt>RuntimeException</tt>. While they can be handled it is not mandatory to do so. Examples include the <tt>NullPointerException</tt>. This exception can be thrown any time an object is accessed. So it makes no sense to force developers to handle it.</li>
<li>All other exceptions are checked exceptions i.e. the compiler ensures that they are handled using <tt>catch</tt> or the method declares that it <tt>throws</tt> the exception.</li>
</ul>
Originally I thought an exception is an extension of the return type of a method. Instead of a value of the "normal" return type it throws or "returns" an exception. So if the program should be sound concerning types every type of exception needs to be handled - just as you would handle a normal return value. Obviously it makes sense to use the type checker to ensure this happens. So checked exceptions make a lot of sense.
Checked exceptions are also used throughout the Java APIs. The developers of these APIs obviously know what they are doing - so again checked exceptions again seemed like a good idea.
However, later on I did quite a few code reviews. Some typical ways to handle checked exceptions appeared:
<ol>
<li>Exceptions were just ignored i.e. the catch block was empty.</li>
<li>Exceptions are logged. This is also what the default Eclipse code snippet does. The code just swallows the exception. However, developers are supposed to actually handle the exceptions and not just log them. More often than not a closer examination revealed that the exception really was about a serious problem and the program should probably have signaled a failure to the user - and not just continue and log the problem somewhere. This is pretty much the same situation as ignoring return codes in C - which exceptions were supposed to solve.</li>
<li> Sometime the exception is wrapped and rethrown. This is more or less identical to an unchecked exception. The exception is just propagated. Just the type changes, of course - but that might not justify the code written.</li>
</ol>
Only seldom the exception is really actually handled e.g. by trying an alternative algorithm or returning some kind of default value.
You could argue that this is just the fault of the developers who wrote the code. Why did they not implement proper exception handling?
However, some facts made me wonder whether this is actually the correct explanation:
<ul>
<li>The Spring project only uses unchecked exceptions</li>
<li>Even EJB introduces the <tt>EJBException</tt> that can be used to wrap other exception in an unchecked exception.</li>
<li>There is hardly any other language using checked exceptions. <a href="http://en.wikipedia.org/wiki/Exception_handling#Checked_exceptions">Wikipedia</a> lists OCaml, CLU and Modula-3. This makes Java the only main stream language using checked exceptions. This should really make you wonder - why didn't C# for example implement this feature, too?</li>
</ul>
So apparently checked exceptions might not be such a smart idea after all - otherwise everybody would be using them. And the reason why so much exception handling is implemented poorly might be that developers are forced to write code to handle exceptions - even if there is no sensible way to do so. This is the primary difference between checked and unchecked exceptions: Unchecked exceptions have a sensible default i.e. the exception is just propagated to the next level in the call hierarchy. Checked exceptions lack such default and must therefore be handled in one way or another.
So essentially checked exceptions force the developer of the calling code to handle the exception. This makes only sense if it can be handled sensible. In a lot of cases that is not possible. Therefore I believe checked exceptions should hardly be used. In almost any case it is better to rely on an unchecked exception. Then the default is that the exception is propagated if not handled - which is usually the better alternative. Note that it is still possible to handle the exception if needed.
I think relying more on unchecked exceptions is primarily a matter of courage. A lot of projects and libraries in the Java space use checked exceptions. They are without a doubt overused - see JDBC's <tt>SQLException</tt> for example. It is a checked exception but can hardly ever be handled sensible. Not to follow these bad examples truly takes courage. Maybe introducing checked exception is even the greatest mistake in Java's language design.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com11tag:blogger.com,1999:blog-14001982.post-48613664068847778402013-04-08T11:14:00.000+02:002013-04-08T11:14:00.338+02:00JAX PreviewThis year's <a href="http://jax.de/2013/">JAX</a> will see some interesting sessions that I would like to highlight:
<ul>
<li>The <a href="http://jax.de/2013/sessions/?tid=2882">New School Enterprise IT</a> Day will show how new technologies and business challenges will change the Enterprise IT. I am quite happy that this has been added to the JAX schedule - because I believe there will a huge shift in this area in the next few years.</li>
<li>The <a href="http://jax.de/2013/sessions/?tid=2887">Cloud Computing Day</a> will show the latest and greatest in the Cloud. Several topics - such as the different Java PaaS alternatives but also IaaS will be explained in detail.</li>
<li>I have done several Code Retreats at adesso AG and always found them to be a great experience for all involved. Therefore I am pleases that I can do a <a href="http://jax.de/2013/workshops/?tid=2861#session-24399">Code Retreat</a> at JAX this year.</li>
<li>And of course the <a href="http://jax.de/2013/workshops/?tid=2862#session-24398">Advanced Spring Powerworkshop</a> will take place - it is a unique opportunity to dive deeper into the framework.</li>
</ul>
Some of my colleagues are also presenting. For example Alexander Frommelt will talk about <a href="http://entwickler.com/konferenzen/ext_scripts/v2/php/sessions-popup.php?module=jax2013&id=24430">IT landscapes</a> and also about <a href="http://entwickler.com/konferenzen/ext_scripts/v2/php/sessions-popup.php?module=jax2013&id=24431">Portals and whether Portlet are really a good fit for them</a>. Halil-Cem Gürsoy will talk about <a href="http://entwickler.com/konferenzen/ext_scripts/v2/php/sessions-popup.php?module=jax2013&id=24773">Google App Engine</a>.
So I am really looking forward to the event - and would be glad to meet you there!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-35159864283773723592012-05-08T09:42:00.000+02:002012-05-08T09:42:00.172+02:00Common Misconceptions: The Waterfall ModelI think the Waterfall Model is the result of a big misunderstanding, probably one of the worst in out industry. <br />
Look at Royce's original paper (PDF can be found <a href="http://www.cs.umd.edu/class/spring2003/cmsc838p/Process/waterfall.pdf">here</a>. You will notice that the paper starts with the separation of different activities such as analysis and coding. To me that sound like an attempt to actually define basic software engineering activities instead of just unstructured hacking. The paper goes on and discusses more different phases that a project might go through. It shows a figure pretty much like the Waterfall model we are used to. No surprises so far.<br />
But then the fun starts: The third figure already shows that the steps are not necessarily performed in order. The text says:
<br/>
<cite>... as each step progresses and the design is further detailed, there is an iteration with the preceding and succeeding steps but rarely with the more remote steps in the sequence.</cite><br />
Let me repeat: The original Waterfall paper says that you might need to go back to previous steps, even remote ones. It even uses the term "iteration".<br />
It goes on and discusses that once you run in production you might learn that your system does not perform well enough. That leads to major problems - and you will probably go back to the analysis. You might call it an iterative approach - even though it is probably not voluntarily.<br />
Even better: The paper suggests:<br />
<cite>
If the computer program in question is being developed for the first time, arrange matters so that the version finally delivered to the customer for operational deployment is actually the second version in so far as critical design / operations areas are concerned.
</cite>
<br />
So essentially you should do at least two iterations - the first version will not get it right. Another hint at an iterative process.<br />
And the paper even suggests to involve the customer - probably one of the most important points in Agile practices.<br />
Of course the paper includes sections that are quite different from the Agile school - such as the focus on documentation. But it is from 1970 - and the author is specialized in systems for spacecrafts. Those still rely a lot on documentation even today because of the extreme risks those systems have.<br />
However, the bottom line is that the original Waterfall paper does not advocate what is now considered the Waterfall Model. It does not require going through the steps in order and it even mentions that the first release will not be a good solutions. Quite contrarily: It talks about iterations - very limited of course but it hints the direction Agile and iterative processes took later on.<br />
I am still confused how the industry was able to misunderstand this paper. I wonder how much damage it did. Even today people still talk about Waterfall. I think everyone working with software processes should read this paper. I also suggest to use the term "Misunderstood Waterfall Model" when discussing a model that suggest going through the steps in a strict order. Because that model is just a misunderstanding, it is not what Royce described.<br />
Oh, and next time someone talks about the Waterfall Model - don't forget to ask him or her whether he has read the original paper about it...Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com4tag:blogger.com,1999:blog-14001982.post-88202179406731381732012-04-17T14:56:00.000+02:002012-04-17T14:56:13.323+02:00Some Possible Enhancements for Java and Java EEThe recent discusssion about Java EE and Spring made me think. Actually I find it odd to fight over the programming model used to develop Java applications. Neither Java EE nor Spring will go away - the market shares of both are just too large. At the end everyone involved in the discussion is trying to sell a platform i.e. an application or web server. That product must offer good support for both programming models - and all the others like Scala, Groovy etc.
IMHO the programming models have a lot in common now. Spring also covers advanced challenges like Social Media, NoSQL etc - see my older blog post <a href="http://jandiandme.blogspot.de/2010/10/spring-vs-java-ee-and-why-i-dont-care.html">Spring vs. Java EE and Why I Don't Care</a>. So it is not in the field of programming models where innovation is laking. Instead we should focus on improving the platform.
So what is it that would really make Java a better platform? Here are some ideas:
<ul>
<li>
Ever since the invention of Java EE roles like the <a href="http://docs.oracle.com/cd/E19798-01/821-1841/bnach/index.html">Application Assember</a> were defined. I never saw a project that followed this workflow. Nowadays there is just an automated process that results in an EAR or even a complete setup including an application server. It is time to face this reality and get rid of these role descriptions. The deployment process is not done that way. Java needs to step away from it.
</li>
<li>
Nowadays application server are seldom used to host more than one application. So maybe that offers some possibilities to improve the deployment processes and also the features. If there is just one application on a server anyway the strict isolation between applications Java EE offers does not make that much sense any more.
</li>
<li>
It would be good to focus more on deployment during the development process. Applications are much more often deployed into testing or development environments than into production. I am wondering how many CPU and I/O cycles are wasted compressing WARs and JARs and then EARs during a build process - and immediately decompressing them on the web or application server so testing can start. Can't the Java EE standard do something about this? Obviously there are exploded WARs and EARs - but they are not used as often as they should be. Obviously there are tools like <a href="http://zeroturnaround.com/jrebel/">JRebel</a> and <a href="http://www.playframework.org/">Play</a> - but what if the complete tool chain including IDEs, build tools, servers etc would support a standard here? What if all of those parties could collaborate to make this work flawlessly? I think we would see quite a boost in developer productivity.
</li>
<li>
Often I see applications modularized in several WARs. These modules need to talk to each other. However, there is no easy way to do this. Usually they end up using Web Services or another HTTP based protocol. Compared to a local method call this adds the overhead of HTTP, sockets and marshalling / demarshalling. A possible solution would be OSGi - but that technology is quite complex. The reason to me seems to be the problems around shared class loading. Classes that might represent parameters or return values can be shared between modules. JBoss includes a solution based on JMX that did not support shared classes - so modules need to have the correct classes available. This is the same as for Web Services or the other HTTP protocols. But there is no standard apart from JMX - which is very low level. Can't we have some communication between WARs that in the standard? Maybe based on JMX? Or at least best practices around it?
</li>
<li>
Concurrency in languages like Erlang is very different from what we are used to in Java. There are <a href="http://en.wikipedia.org/wiki/Actor_model">actors</a> that work on a serial list of messages. Concurrency is achieved by multiple actors working in parallel - while the actors themselves are just working serially. This approach is also used by the Scala library Akka on the JVM. In Erlang this approach leads to lots of actors - far more than the number of threads that can be supported on the JVM. If the JVM wants to stay relevant for this model we need proper support for it.
</li>
<li>
Actors in Erlang and in Google Dart - they are called Isolates have separated heaps. Those heaps can be independently GC'd - so while one actors spends time doing GC the other can continue to work on messages. By design you end up with less stop-the-world-GC. Maybe we could have a similar concept in Java? This is an extension of the previous suggestion but there might be other options as well. For example each WAR file could have a separate heap.</li>
</ul>
Those are just some - possibly crazy - ideas. My intention is to focus on making the Java platform better for all of us. And I believe for that the discussion around the future of Java must focus more on the JVM and the infrastructure like web or application server than on programming models. There is quite some innovation in the area of the programming models anyway. For example there are lots and lots of Open Source projects - frameworks and complete languages. But for infrastructure standards are needed - so any server and environment can work with the solution. So that is what the standardization process should focus on.
What do you think? I am looking forward to your comments!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com1tag:blogger.com,1999:blog-14001982.post-37715317005223371832012-04-02T16:26:00.001+02:002012-04-02T16:26:54.524+02:00Testing: AgainAs you have probably noticed, the last blog posting <a href="http://jandiandme.blogspot.de/2012/04/testing-considered-harmful.html">Testing Considered Harmful</a> was actually a April Fool's Joke. I believe Test Driven Development is one of the most important innovations in the last years. I have been infected ever since Kent Beck explained JUnit to me.
Here are some things adesso does to make TDD a reality:
<ul>
<li>
We did an internal <a href="http://coderetreat.org/">Code Retreat</a>
</li>
<li>
We are sponsoring the <a href="http://coderetreat-berlin.de/2012/">Legacy Code Retreat</a> in Berlin.
</li>
<li>
Also adesso Mobile Solutions does internal Katas.
</li>
</ul>
The list could go on. So please program - and drive - safely! If you were caught by the April Fool's Joke: I hope you don't mind. If you do: I apologize.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com1tag:blogger.com,1999:blog-14001982.post-47370693050365753242012-04-01T13:04:00.000+02:002012-04-01T13:57:38.886+02:00Testing Considered HarmfulUnit testing started with JUnit - and was infectious. As you can see in <a href="http://junit.sourceforge.net/doc/testinfected/testing.htm">JUnit Test Infected: Programmers Love Writing Tests</a> that was the intention from the very beginning. And so the infection spread.<p />
Nowadays almost all programmers do extensive Unit Tests. And therefore we see problems arising. Instead of thinking about a problem and building a reliable solution developers now just write a test and code away. At one point they get a green bar and consider the job done. But can you build proper software that way? Dijkstra stated in 1972: "If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with." - see <a href="http://en.wikiquote.org/wiki/Edsger_W._Dijkstra">Wikiquote</a>. I think the same holds true for testing. So instead of the ever famous code-test-refactor cycle we could use more of the <a href="http://c2.com/cgi/wiki?FeynmanAlgorithm">Feynman Way of Solving Problems</a>. If you really think about the solution first you will find you won't need a test. Instead you will actually write correct code from the beginning. You won't need to rely on tests. They cannot show the absence of bugs anyway - as Dijkstra mentioned. In the end you will end up with cleaner code and less code - as there are no tests to be written. <p />
This principle can be applied to other areas as well. I think one reason why there are so many car accidents are the very effective brakes cars have now. If we had less effective brakes people would think about possible problems beforehand, drive more carefully - and we would have less accidents.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com5tag:blogger.com,1999:blog-14001982.post-9862341113344994332012-02-06T16:33:00.000+01:002012-02-06T16:44:52.408+01:00Dangerous Code Example in EJB 3.1 SpecI am currently working on a training concerning Java EE Best
Practices. For that reason I am reading through quite some material
about Java EE and EJB. However, looking at the EJB 3.1 spec I realized
that the code examples are an example of rather bad coding practice.
As an example here is the original code from EJB 3.1 Spec p. 348. It is supposed to
show how <tt>UserTransactions</tt> can be used:
<tt><pre>
@Stateless
@TransactionManagement(BEAN)
public class MySessionBean implements MySession {
@Resource
javax.transaction.UserTransaction ut;
@Resource
javax.sql.DataSource database1;
@Resource
javax.sql.DataSource database2;
public void someMethod(...) {
java.sql.Connection con1;
java.sql.Connection con2;
java.sql.Statement stmt1;
java.sql.Statement stmt2;
// obtain con1 object and set it up for transactions
con1 = database1.getConnection();
stmt1 = con1.createStatement();
// obtain con2 object and set it up for transactions
con2 = database2.getConnection();
stmt2 = con2.createStatement();
//
// Now do a transaction that involves con1 and con2.
//
// start the transaction
ut.begin();
// Do some updates to both con1 and con2. The container
// automatically enlists con1 and con2 with the transaction. stmt1.executeQuery(...);
stmt1.executeUpdate(...);
stmt2.executeQuery(...);
stmt2.executeUpdate(...);
stmt1.executeUpdate(...);
stmt2.executeUpdate(...);
// commit the transaction
ut.commit();
// release connections
stmt1.close();
stmt2.close();
con1.close();
con2.close();
}
... }
</pre></tt>
What is wrong with this code? Well, first of all it does not
compile. Quite honestly I wouldn't really care too much about that - an
example is fine as long as the important point is still brought
across. But in this case it does matter as we will see later on. So here is
what the method should read like:
<tt><pre>
public void someMethod() throws SQLException, NotSupportedException,
SystemException, SecurityException, IllegalStateException,
RollbackException, HeuristicMixedException,
HeuristicRollbackException {
</pre></tt>
In the original example any code concerning Exceptions
has been left out. So what happens if an
Exceptions is thrown? No <tt>close()</tt> is ever called and therefore none of the resources are ever cleaned up. Let's fix this:
<tt><pre>
@Stateless
@TransactionManagement(TransactionManagementType.BEAN)
public class MySessionBean {
@Resource
javax.transaction.UserTransaction ut;
@Resource
javax.sql.DataSource database1;
@Resource
javax.sql.DataSource database2;
public void someMethod() throws SQLException, NotSupportedException,
SystemException, SecurityException, IllegalStateException,
RollbackException, HeuristicMixedException,
HeuristicRollbackException {
java.sql.Connection con1 = null;
java.sql.Connection con2 = null;
java.sql.Statement stmt1 = null;
java.sql.Statement stmt2 = null;
try {
con1 = database1.getConnection();
stmt1 = con1.createStatement();
con2 = database2.getConnection();
stmt2 = con2.createStatement();
ut.begin();
stmt1.executeUpdate("");
stmt2.executeQuery("");
stmt2.executeUpdate("");
stmt1.executeUpdate("");
stmt2.executeUpdate("");
ut.commit();
} finally {
if (stmt2 != null)
try {
stmt2.close();
} catch (SQLException ex) {
}
if (con2 != null)
try {
con2.close();
} catch (SQLException ex) {
}
if (stmt1 != null)
try {
stmt1.close();
} catch (SQLException ex) {
}
if (con1 != null)
try {
con1.close();
} catch (SQLException ex) {
}
}
}
}
</pre></tt>
This is the infamous try-catch-finally-try-catch block. The <tt>null</tt>
checks actually avoid calling <tt>close()</tt> on objects that have not been
created - as the creation might already have failed and and exception might have been thrown. As the <tt>close()</tt> operation might throw an exception this also needs to be handled. IMHO it is OK to swallow the exception - there is not really anything that can be done as the resources are already being closed. Using Spring's
<tt>JdbcTemplate</tt> would have avoided the problem as the resource handling
is done by the template then. I would strongly recommend it in code like this. It can be used independently from the other parts of Spring - e.g. Dependency Injection can still be done by Java EE. See <a href="http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/jdbc.html#jdbc-core">http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/jdbc.html#jdbc-core</a> for details.
Now there is another thing that is still not OK - actually the most
important point. The <tt>UserTransaction</tt> is never committed nor rolled back
if an exception occurs. Let's fix this, too:
<tt><pre>
@Stateless
@TransactionManagement(TransactionManagementType.BEAN)
public class MySessionBean {
@Resource
javax.transaction.UserTransaction ut;
@Resource
javax.sql.DataSource database1;
@Resource
javax.sql.DataSource database2;
public void someMethod() throws Exception {
java.sql.Connection con1 = null;
java.sql.Connection con2 = null;
java.sql.Statement stmt1 = null;
java.sql.Statement stmt2 = null;
try {
con1 = database1.getConnection();
stmt1 = con1.createStatement();
con2 = database2.getConnection();
stmt2 = con2.createStatement();
ut.begin();
stmt1.executeUpdate("");
stmt2.executeQuery("");
stmt2.executeUpdate("");
stmt1.executeUpdate("");
stmt2.executeUpdate("");
} catch (Exception ex) {
ut.setRollbackOnly();
throw ex;
} finally {
ut.commit();
if (stmt2 != null)
try {
stmt2.close();
} catch (SQLException ex) {
}
if (con2 != null)
try {
con2.close();
} catch (SQLException ex) {
}
if (stmt1 != null)
try {
stmt1.close();
} catch (SQLException ex) {
}
if (con1 != null)
try {
con1.close();
} catch (SQLException ex) {
}
}
}
}
</pre></tt>
So when a problem occurs the transaction will now be marked as
rollback only and ultimately rolled back. If there is no exception it will be
committed.
I hope I made no further mistakes in the code - let me know
otherwise. In Spring resource handling is done for you by the
Templates and therefore I might be doing something wrong here. Using
that approach would also have made the code a lot less complex.
So why this blog post? Bad resource handling and transaction
handling is far too common. I have done a lot of reviews and usually
Enterprise Java applications fail to do a good job in this
regard. This is dangerous, because
<ul>
<li>The whole point of transactions
is to provide safety if something goes wrong. If you do not commit nor
roll back the transaction it will be left in an undefined state and all kinds of things might happen. This is
compromising the safety of transactions. So the transactions become
more or less
useless. You might as well just not use them at all.</li>
<li>Not closing connections and statements will eventually lead to
resource leaks e.g. connection pools running out of connections. This
will at one point make the system fail.</li>
<li>These problems are hard to detect - they will only surface if
exceptions are thrown. So finding and eliminating the problem is
complex. You should rather get it right from the start.</li>
</ul>
Sadly the EJB spec seem to do resource handling constantly wrong. The EJB spec is
not the only document that does resource and transaction handling
wrong. Quite the contrary: I have a read a lot of tutorial and other
documents that get this entirely wrong. However, IMHO at least the
example in the spec for using the <tt>UserTransaction</tt> should show how to
use it in a bullet proof manner. This document is read by many
developers and other authors. Bad practices in such a document might
end up in a lot of code and other publications.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com11tag:blogger.com,1999:blog-14001982.post-48635394981492613332011-11-08T09:31:00.000+01:002011-11-08T09:31:55.071+01:00Random Thought about Google DartHere are some thoughts about Google Dart and its possible usages. They are just wild ideas, I have no information whether they will actually be implemented or whether they are shared by anyone at Google:
<ul>
<li>Compiling Dart into JavaScript is a good idea. It means Dart is immediately usable on any platform. There is no other way to quickly get it out to so many developers. Users are not quickly to switch to new browser - think about IE6.</li>
<li>I originally expected that a Plug In and VM for Dart on Chrome would be released quickly. Now I think that would have been a bad idea. Chrome would have had a good support for Dart while the rest of the browsers would have been left in the cold. They would probably not use the Google VM - remember that they also have their own JavaScript VMs. It is also unlikely that they would create their own Dart VM. So the current approach create a level playing field and makes it more likely for Dart to succeed.</li>
<li>I think the Dart VM might be an option for Android - maybe not in the near term but probably in the long run. Also it might be enough for Google to have an alternative VM. It just means it has a stronger position if a deal with Oracle must be closed.</li>
<li>Dart is a good fit for Google App Engine (GAE). Isolates have just one thread - that is also what Google App Engine enforces. That has the advantage that GAE can restart isolates. Isolates can be snapshotted and migrated to other VMs - which is great if you want to react to different load by offloading work from a machine. Isolates can only communicate via ports - that allows you to minimize dependencies to the outside. Again that is great if you want to restart or migrate Isolates. It might also be a way around the limitation that GAE won't allow you to open sockets. Java without Multithreading and without the possibility to open sockets is hard and no fun - and that is why I believe Java on GAE ist not that great. This changes dramatically if you use Dart.
</ul>
So we will see where this is headed. Remember the first days of Java: It was seemingly all about Applets. Now it is all about the server. Technologies might succeed in other areas than originally planned.
If you are new to Dart - here is a presentation about Dart:
<div style="width:425px" id="__ss_9681955"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/google-dart" title="Google Dart" target="_blank">Google Dart</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9681955" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/ewolff" target="_blank">Eberhard Wolff</a> </div> </div>Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-2938886244421862172011-11-01T11:14:00.002+01:002011-11-01T11:15:35.286+01:00Spring and ScalaScala is an interesting language that appeals to a lot of Java developers as it is statically typed - just like Java. However, Scala focuses on concurrent processing. The choice of frameworks for typically bread and butter issues that you see in Enterprise applications is rather limited. For that reason it makes sense to look at Spring as a very mature and established Java Enterprise technology and whether it can be used with Scala. So here is a presentation and some sample code:
<div style="width:425px" id="__ss_9958551"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/scala-and-spring" title="Scala and Spring" target="_blank">Scala and Spring</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9958551" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/ewolff" target="_blank">Eberhard Wolff</a> </div> </div>
<a href="https://github.com/ewolff/scala-spring">https://github.com/ewolff/scala-spring</a>Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com4tag:blogger.com,1999:blog-14001982.post-48539135622144068242011-09-26T11:26:00.000+02:002011-09-26T11:26:00.158+02:00adesso Now On slideshareMy employer adesso AG is now on slideshare: <a href="http://www.slideshare.net/adessoAG/">http://www.slideshare.net/adessoAG/</a> .
Most of the presentations are in German. There are quite a few already and of course there are more to come. I thought I would show three presentations here on the blog.
The most popular so far is about security and JSF (German):
<div style="width:425px" id="__ss_9389874"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/adessoAG/owasp-top-10-scanning-jsf" title="OWASP Top 10 : Scanning JSF" target="_blank">OWASP Top 10 : Scanning JSF</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9389874" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/adessoAG" target="_blank">adessoAG</a> </div> </div>
Then there is this one about memory and performance analysis in Java - something I think every Java developer should understand (German) :
<div style="width:425px" id="__ss_9390208"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/adessoAG/mist-gemssen-java-performance-und-memory-analyse" title="Mist gemessen? Java Performance und Memory Analyse " target="_blank">Mist gemessen? Java Performance und Memory Analyse </a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9390208" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/adessoAG" target="_blank">adessoAG</a> </div> </div>
And this one about Requirements Engineering (German) :
<div style="width:425px" id="__ss_9375879"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/adessoAG/eine-kleine-praktische-philosophie-ber-das-requirements-engineering-final-mitbildnachweis" title="Eine kleine praktische Philosophie über das Requirements Engineering" target="_blank">Eine kleine praktische Philosophie über das Requirements Engineering</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9375879" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/adessoAG" target="_blank">adessoAG</a> </div> </div>
PS: Of course there is still my personal slideshare account with English presentations at <a href="http://www.slideshare.net/ewolff/">http://www.slideshare.net/ewolff/</a>Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com1tag:blogger.com,1999:blog-14001982.post-91446557428740677062011-09-08T10:30:00.000+02:002011-09-08T10:30:01.827+02:00Cloud PowerWorkshop at WJAXThis year at WJAX me and my colleagues Halil-Cem Gürsoy, Andreas Hartmann and Stephan Müller from adesso will present the Cloud Power Workshop for the first time. It will cover everything you need to know to implement application with Java for the Cloud.
We will cover <a href="http://code.google.com/appengine/">Google App Engine</a> (GAE). It pioneered the PaaS Cloud approach and is quite broadly used nowadays. At the same time GAE has some limitations that you need to know about to successfully build application on the platform - in particular if you use Java.
Then <a href="http://cloudfoundry.org/">Cloud Foundry</a> will be shown - it provides a very interesting approach to PaaS - because it supports relational databases and Tomcat which is quite a familiar platform for most Java developers.
To develop Cloud applications successful you need to use novel architectures. We will cover principles like BASE and the CAP theorem. And we will show how to implement Cloud system with good scalability using RabbitMQ and a NoSQL database. Also Map/Reduce using Apache Hadoop will be demoed.
Of course there will be lot of live coding and material to take away so you can try it at home.
Take a look at the <a href="http://jax.de/wjax2011/workshops/?tid=2110#session-18959">official announcement (German)</a> - looking forward to see you there!
Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-21069781746286622722011-08-04T18:57:00.000+02:002011-08-04T18:57:00.469+02:00Keynoting ECSA 2011I feel honored to keynote with the subject "What Does it Really Mean to be an Architect?" the 5th European Conference on Software Architecture (ECSA 2011) in Essen, Germany. The conference takes place from 13-16 September 2011 to discuss the latest research and experiences in software architecture.<br />
<br />
The range of topics includes service and component architectures, quality attributes of software architectures, product line architectures, management of architectural decisions, and enterprise architecture. Workshops on traceability and dependencies in software architecture, as well as software architecture variability, provide further opportunities for in-depth discussion.<br />
<br />
Each day, keynote speakers from academic and industrial backgrounds will discuss perspectives on current trends and challenges in software architecture. The other keynotes are:<br />
<br />
<ul><li>Interactive Ubiquitous Computing Systems (Albrecht Schmidt, University of Stuttgart)</li>
<li>Software Analysis as a Service (Harald Gall, University of Zurich)</li>
<li>Enterprise Architecture (Jörg Koletzki, E.ON IT GmbH)</li>
<li>Software Performance Engineering in Dynamic Environments (Raffela Mirandola, Politecnico di Milano)</li>
<li>Balancing Long-Term Research with Industrial Applicability (Magnus Larsson, ABB Corporate Research)</li>
</ul><br />
The detailed program and registration information can be found at <a href="http://www.ecsa2011.org">http://www.ecsa2011.org</a> - register online before August 14th to take advantage of the early registration rates!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-72191220477820691502011-06-30T14:15:00.000+02:002011-06-30T14:15:50.474+02:00Slides "Cloud Architecture" Online Seacon 2011The slides for the talk "Cloud Architecture" from Seacon 2011 are online:<br />
<br />
<div style="width:425px" id="__ss_8461865"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/architectures-for-the-cloud" title="Architectures For The Cloud" target="_blank">Architectures For The Cloud</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8461865" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/ewolff" target="_blank">Eberhard Wolff</a> </div></div><br />
You can also <a href="http://www.slideshare.net/ewolff/architectures-for-the-cloud/download">download</a> them.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-74062688177334677132011-05-27T16:41:00.000+02:002011-05-27T16:41:51.027+02:00Slides and Pictures from Amazon EventHere are the slides from the Amazon event at JUG BB sponsored by adesso:<br />
<br />
<ul><li><a href="http://www.slideshare.net/AmazonWebServices/aws-tech-summit-berlin-2011-keynote">http://www.slideshare.net/AmazonWebServices/aws-tech-summit-berlin-2011-keynote</a></li>
<li><a href="http://www.slideshare.net/AmazonWebServices/aws-tech-summit-berlin-2011-running-java-applications-on-aws">http://www.slideshare.net/AmazonWebServices/aws-tech-summit-berlin-2011-running-java-applications-on-aws</a></li>
<li><a href="http://www.slideshare.net/AmazonWebServices/best-practices-in-architecting-for-the-cloud-webinar-jinesh-varia">http://www.slideshare.net/AmazonWebServices/best-practices-in-architecting-for-the-cloud-webinar-jinesh-varia</a><br />
</ul>
And here are some pictures:
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhouPGMjx45I3LFzfBySIjBG6v1klqE3bR2Rjf48HPf8qa3Y1mW3vjRfOhoLJ8BXYKnWMdn9njybK-HuYGRRIt54ov5-3gqcAioiE46B8QExKAaEAkhPZ6OyJLjtSZBLqrKcD5e/s1600/adesso_amazon_event_17052011-010.tif.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="213" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhouPGMjx45I3LFzfBySIjBG6v1klqE3bR2Rjf48HPf8qa3Y1mW3vjRfOhoLJ8BXYKnWMdn9njybK-HuYGRRIt54ov5-3gqcAioiE46B8QExKAaEAkhPZ6OyJLjtSZBLqrKcD5e/s320/adesso_amazon_event_17052011-010.tif.jpg" /></a></div>
Amazon CTO Dr. Werner Vogels
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5m0g1uW0KKmdZThW2j3jO1gwFgAEJeGbSdPxl5zPW_mZbWRxDYB3j77B-mbW7cMdlxq8TrDURthpSRs3ppTVE5VD1iijS_wJaHYjHj6TEEGeAw9SWiLnW_vLWBF4RBZ1FmUU/s1600/adesso_amazon_event_17052011-021.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="213" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5m0g1uW0KKmdZThW2j3jO1gwFgAEJeGbSdPxl5zPW_mZbWRxDYB3j77B-mbW7cMdlxq8TrDURthpSRs3ppTVE5VD1iijS_wJaHYjHj6TEEGeAw9SWiLnW_vLWBF4RBZ1FmUU/s320/adesso_amazon_event_17052011-021.jpg" /></a></div><br />
Attila Narin and Carlos Conde of AWS with meEberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-76919182978498830962011-05-24T10:00:00.000+02:002011-05-24T10:00:07.049+02:00adesso sponsored talk by Amazon CTO Werner Vogels at JUG Berlin BrandenburgOn May 17th adesso AG sponsored an Amazon event at Java User Group Berlin Brandenburg. Today, Amazon is more than an online book store. Since 2006 Amazon.com, through Amazon Web Services LLC, has been offering developer customers access to in-the-cloud infrastructure services based on Amazon's own back-end technology platform.<br />
<br />
After an introduction by me Werner Vogels, CTO of Amazon, gave the first talk of the evening.<br />
<br />
He introduced the audience to the original Amazon IT system. Realizing that Amazon’s growth potential was limited due to the way the system was built, Amazon changed the system’s architecture drastically. Even the organizational structure was changed, forming teams that would each be responsible for one specified business service unit- including the development of the service as well as its operation.<br />
<br />
However, even after the reorganization the engineers spent 70% of their time on scaling the infrastructure and only 30% on creating the new business logic. So the next step was to create a platform that would eliminate this burden and at the same time wouldn’t restrict the engineers. This was one of the starting points of Amazon Web Services (AWS) e.g. for virtual computers (EC2) and storage (S3).<br />
<br />
Later on, services like SimpleDB - a very scalable data store - were developed. The current numbers for the services are very impressive: S3 currently stores 339 billion objects and every day Amazon adds the equivalent amount of server capacity to AWS that was once used to run all of Amazon in the year 2000 – when it was a $2.76 billion USD enterprise.<br />
<br />
Next to talk was Attila Narin, Senior Manager at the Solutions Architecture of AWS. He gave an interesting presentation on the architectural principles for applications in the Cloud.<br />
<br />
Our third guest speaker, Carlos Conde, showed the employment of Amazon Elastic Beanstalk which is an impressively easy to use infrastructure for Java applications.<br />
<br />
With well over 150 participants the event was well received and gave a good insight into AWS and its Cloud services. The guest speaker’s talks emphasized the importance of Cloud services being the infrastructure of the next generation Dr. Werner Vogels gave an entertaining look behind the scenes of Amazon, its infrastructure and its Cloud offerings.<br />
<br />
Thanks to all involved for making this possible!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-14305168964456856332011-05-06T10:12:00.002+02:002011-05-07T20:37:37.430+02:00adesso Sponsored JUG BB Event with Werner Vogels (CTO Amazon)adesso will be sponsoring an event of the <a href="http://www.jug-bb.de/">Java User Group Berlin Brandenburg</a> with Werner Vogels, CTO of Amazon. I had the pleasure to listen to Werner's talk back at JAOO 2006 (see <a href="http://jandiandme.blogspot.com/2006/10/jaoo-2006-werner-vogels-cto-amazon.html">my (German) blog post</a> about the event. It was remarkable: Werner was the first to introduce me to the CAP theorem, now a well known foundation for distributed systems, and an approach that we now call DevOps.<br />
<br />
During the event we will learn about Amazon Web Services, Architecture for the Cloud and AWS Beanstalk, the Amazon Java PaaS solution. If you are interested you can find more details at <a href="http://www.adesso.de/de/service/veranstaltungen/event_26817.html">the adesso event page</a> and <a href="http://www.adesso.de/de/service/veranstaltungen/anmeldeformulare/gastvortrag_amazon.jsp">registration form</a>.<br />
<br />
Seating is very limited - make sure to sign up ASAP. Looking forward to see you there!Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-22932983098535079712011-05-05T13:02:00.000+02:002011-05-05T13:02:39.351+02:00Slides from JAX 2011My talks for JAX 2011 are done, so here are the slides:<br />
<br />
Spring in the Cloud:<br />
<br />
<a href="http://www.slideshare.net/ewolff/spring-in-the-cloud
">http://www.slideshare.net/ewolff/spring-in-the-cloud</a><br />
<br />
<div style="width:425px" id="__ss_7837306"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/spring-in-the-cloud" title="Spring in the Cloud">Spring in the Cloud</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7837306" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ewolff">Eberhard Wolff</a> </div></div><br />
Cloud PaaS with Java:<br />
<br />
<a href="http://www.slideshare.net/ewolff/cloud-paas-mit-java">http://www.slideshare.net/ewolff/cloud-paas-mit-java</a><br />
<br />
<div style="width:425px" id="__ss_7827872"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/cloud-paas-mit-java" title="Cloud PaaS with Java">Cloud PaaS with Java</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7827872" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ewolff">Eberhard Wolff</a> </div></div><br />
Future of Messaging: RabbitMQ and AMQP:<br />
<br />
<a href="http://www.slideshare.net/ewolff/the-future-of-messaging-rabbitmq-and-amqp
">http://www.slideshare.net/ewolff/the-future-of-messaging-rabbitmq-and-amqp</a><br />
<br />
<div style="width:425px" id="__ss_7602039"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/the-future-of-messaging-rabbitmq-and-amqp" title="The Future of Messaging: RabbitMQ and AMQP ">The Future of Messaging: RabbitMQ and AMQP </a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7602039" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ewolff">Eberhard Wolff</a> </div></div>Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-5542246010509339222011-04-29T11:56:00.000+02:002011-04-29T11:56:25.226+02:0010 Typical Enterprise Java ProblemsThis presentation shows 10 typical problems that I encountered during quite a few code reviews. I got mixed responses concerning this subject: During WJAX, JAX and also online at jaxenter the feedback was very positive. I did a similar talk at JAOO. There it seemed that the audience was already well aware of the problems or had already solved them. Not sure what the conclusion of that should be.<br />
<br />
Nevertheless here are the slides:<br />
<br />
<div style="width:425px" id="__ss_7774827"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/10-typical-problems-in-enterprise-java-applications" title="10 Typical Problems in Enterprise Java Applications">10 Typical Problems in Enterprise Java Applications</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7774827" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ewolff">Eberhard Wolff</a> </div></div><br />
And<br />
<a href="http://it-republik.de/jaxenter/news/10-typische-Fehler-in-Enterprise-Java-Anwendungen-057701.html">here</a> is a video of the presentation in German.<br />
<br />
The presentation is somewhat dated but I decided to upload it anyway. I think these problems are actually still far too common.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-83178902041293889172011-04-19T09:43:00.000+02:002011-04-19T09:43:54.386+02:00All You Need to Know About Cloud FoundryThe last few days quite I have done quite some work on VMware's new PaaS offering Cloud Foundry. It is quite interesting because it means that VMware is entering the Public Cloud market. Also the code is Open Source so you can install it on your local machine or on other infrastructure. RightScale has already demoed Cloud Foundry on Amazon EC2 - you can find more information about Cloud Foundry <a href="http://www.rightscale.com/library/server_templates/Cloud-Foundry-All-In-One-Alpha/18780">here</a>.<br />
<br />
If you are generally interested in Cloud Foundry here are the things I have created:<br />
<ul><li><br />
Interview with Adrian Colyer, CTO SpringSource is <a href="http://it-republik.de/jaxenter/news/Introducing-Cloud-Foundry-058920.html">here</a><br />
</li>
<li><br />
English article is <a href="http://jaxenter.com/cloud-foundry-vmware-s-paas-35630.html">here</a><br />
</li>
<li><br />
German article is <a href="http://it-republik.de/jaxenter/artikel/Cloud-Foundry-VMwares-PaaS-Ansatz-3754.html">here</a><br />
</li>
</ul><br />
Enjoy and make sure to visit <a href="http://cloudfoundry.org/">cloudfoundry.org</a> for the code and <a href="http://cloudfoundry.com/">cloudfoundry.com</a> for an account to the Public PaaS.Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-79591978440152764482011-04-14T10:22:00.001+02:002011-04-14T10:22:00.284+02:00JAXLondon The Future of Messaging: RabbitMQ and AMQP Slides OnlineThe slides for my talk "The Future of Messaging: RabbitMQ and AMQP" is now online at <a href="http://www.slideshare.net/ewolff/the-future-of-messaging-rabbitmq-and-amqp">slideshare</a>.<br />
<br />
<div style="width:425px" id="__ss_7602039"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/the-future-of-messaging-rabbitmq-and-amqp" title="The Future of Messaging: RabbitMQ and AMQP ">The Future of Messaging: RabbitMQ and AMQP </a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7602039" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ewolff">Eberhard Wolff</a> </div></div>Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0tag:blogger.com,1999:blog-14001982.post-20470899430516906742011-04-11T11:22:00.001+02:002011-04-11T11:22:00.208+02:00Slides from BED Conference Talk about Java Cloud onlineBED conference in Berlin was quite enjoyable - thanks to all the speaker and attendees for making it such a success!<br />
<br />
You can find the slides for the Java Cloud talk online at <a href="http://www.slideshare.net/ewolff/cloudy-in-indonesia-java-and-cloud">slideshare</a> or they should also appear here:<br />
<br />
<div style="width:425px" id="__ss_7561051"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ewolff/cloudy-in-indonesia-java-and-cloud" title="Cloudy in Indonesia: Java and Cloud">Cloudy in Indonesia: Java and Cloud</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7561051" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/ewolff">Eberhard Wolff</a> </div></div>Eberhard Wolffhttp://www.blogger.com/profile/08362870553782434099noreply@blogger.com0