Tuesday, 13 November 2012

The network was the computer?


What happened to http://thenetworkisthecomputer.com/[1]? It used to point to a Tribute website regarding Sun, but now it just points to Oracle.

I guess all things pass.

P.S. Startling how back then (1984[3]!!) "The network is the computer" could nowadays be translated as "All your stuff's in the Cloud" (2006[4], 22 years later). I guess they were ahead of their time.

References

[1] a Tribute to Sun Microsystems
http://www.thenetworkisthecomputer.com/
[2] Screenshot : a Tribute to Sun Microsystems
http://dawhois.com/site/thenetworkisthecomputer.com.html
[3] Celebrate 25 years of SPARC Innovation
http://www.oracle-downloads.com/sparc25info/
[4] The Google Podium transcript
http://www.google.com/press/podium/ses2006.html

Sunday, 4 November 2012

J-Fall 2012 Report

J-Fall 2012[1] has come and gone, and I write a small blurb on what I managed to learn at each session.

It was a great J-Fall. I had a lot of fun and learned a lot from listening to some of the people, who were so passionate about the particular field they worked in. I hope next time it will be equally interesting. Or even better! Keep it up, y'all!!!

It's always interesting to see any big event that has a line for the mens room, instead of the ladies room.

Your Product Owner is Just Better at Pretending

Speaker(s): Erwin van der Koogh

It was extremely early in the morning, and I had to catch the very first train to the Conference, or I would miss out.

Some statistics. Of all the features of a software product, only 40% of those are actually used by the customer.

In which case it is very important to decide what to include in the product and what not to. Also, it might be obvious, who your customer is, but sometimes things are not as cut and dry.

The powerful example of Facebook was discussed. The Customers of Facebook are not the users, but the advertisers. Advertising is how Facebook makes (hopefully enough) money. The users are the Product. They are the reason Facebook can charge for advertising. This will make you look at Facebook in a whole other light.

Another statistic is that, if you were to eliminate your source code, and you'd have to write it again, but with the knowledge and experience you have now, how long would that take? Just as long? Twice as long? Half as long? It turns out around 1/3 to 1/4 of the time spend on a project is spent coding. Yet that is the only part that is currently being considered for efficiency in all our Software Development Methods we have gotten used to.

A third I wish to point out, was Documentation. Nobody (seems to) reads documentation. I always say that I prefer to have bad documentation instead of no documentation. I always have the optimistic view that if there is bad documentation, the incentive to fix it is greater than if there is no documentation to be the first to write it.

The speaker did not share my opinion. He mentions that bad documentation, if there is no hint that it is in fact bad, could be assumed to be correct and thusly provide misplaced confidence in what you are doing, leading to larger problems later on.

One other instance is to show people that there's a new Upgrade/Component/Widget/whatever available on your website that does X for you. Then place a link under it to a 404 page. Then run statistics on how often that 404 page was accessed. It gives you an idea of how much a feature is wanted, without writing any actual code. A lot of these ideas were expressed here.

I was sufficiently intrigued that I think there's more than one blogpost in here.

Keynote - Oracle


Stephen Chin @steveonjava Java Technology Ambassador and JavaOne Content Chair was late for the Keynote. He was on a Nighthacking tour on his bike through Europe attending all the major conferences.

But he did manage to get there, riding into the conference room, on said bike and biking gear.

They made quite a show of it.

Find more complete info on Geertjan's Blog.

I really liked the picture of 20 Raspberry Pies in a 8U unit.

Java EE 7 Platform Overview and Highlights

Speaker(s): David Delabassee


They are hard at work for the new version building new APIs and improving old ones.

new API:
  • JSONP presentation view
  • JSON API for Java
  • java.net.websocket
  • batchapplication for Java 1.0
  • java temp caching -> distributed across nodes?

old api to be updated:
  • rest + hypermedia + client api
  • JMS
  • Bean Validation
  • JSF 2.2
  • github.com/jersey./hol-sse-websocket

The Aquarium

javaee-spec.java.net

Some of the Specifications are not quite finished yet. So if you have something to say about how things should be implemented/work, you still have a chance to mention it.

Java EE Multi-tenancy in Practice

Speaker(s): Frans van Buul

Good stuff. Multi-tenancy here is having multiple customers in the same database, and your application is minimally impacted.

It is concerning adding a column to the tables (which can automatically be done by Oracle and by PostgresSQL Enterprise) that indicates the Tenant.

The idea is to have just one database, where every table can be "viewed" by tenants. The tenants will only see the information (rows) of himself and not of other tenants. This way, the impact in the code is minimal.

In a worse case scenario, we have to do all this stuff ourselves. This means that the code will be littered with a lot of if statements to double check if the proper tenant is inserted etc.etc...

In hibernate it is possible to "fix" the problem (though in Hibernate 5.0 there might be a solution for the problem) with an Interceptor (or a PrePersist) to fix the tenant properly on the entity by Lookingup in the context for the proper tenant. A good way of retrieving the tenant is by using the hostname for the proper information. For example holidayinn.localhost or novotel.localhost.

What I find most admiring is the fact that he did make some mistakes, and he managed to find out where he made those mistakes, and fix those mistakes.
Mistakes made were:
- tomcat selected instead of glassfish, and tomcat has a web profile, which isn't everything he needs

MySQL workbench was awesomeness! He generated the entire database from scratch every time, by executing a script created by MySQL workbench!

Combination Netbeans and Glassfish and MySQL and EclipseLink.

Netbeans never ceases to amaze me, the quick way in which an entire project can be started and generated in a manner of minutes.

EclipseLink supported a special annotation to get the Tenant system working,

One question in the public was that there were small and big companies and that the big companies, with their many permutations, would push the little companies out of the cache.

In the case of Frans, his organisations were all on the same scale and he didn't see this happening in his practice.

My opinion: the little companies do not need to be in the cache, as their involvement isn't that big to begin with. They can wait for their data a bit longer.

In general a very tricky question is the second level cache. It is possible to do all this by hand in MySQL, but you basically "screw" with the Primary keys. The primary key is partially "hidden" from the application, the tenant part to be precise. So the primary key known to the system might be the primary key of another record as well (but with a different tenant). This is a problem with caching, as the cache might provide the wrong instance. It is best in those case to just turn the second level cache off.

Question of the audience was: just make the primary key a autogenerated id, problem solved. Frans agreed in principle, but what if you have a customer that wishes to port his local database into your tenanted database. You'd have to resequence all the primary keys before inserting into your database. This is a complicated and error prone process. Not to mention that this must be done on a production database, during a time of low load, so basicallly at night.

Microsoft Keynote


Microsoft explained the advances made with their Windows Azure, their cloud solution. Apparently it is no longer Windows centered, but can support a number of different technologies. Even Linux was mentioned!

Also deploying to a staging environment, testing and then switching the staging and the production environment at the load balancer level to go live within a second was nice.

Hands-on Lab: RRRADDD! ... Really Ridiculously Rapid Application Development (Domain-Driven)

Speaker(s): Dan Haywood, Jeroen van der Wal

It concerns an Apache Incubation project called Apache Isis. It is still in its infancy but looks nice.

It reminds me the most of something we're building at work. It works on annotations for displaying your data on webpages without much hassle.

Hands-on Lab: MongoDB

Speaker(s): Maikel Alderhout

Database evolution in short:
  • 1990: Oracle RDBMS
  • 2000: RDBMS and OLAP/BI
  • 2010: NoSQL Hadoop

Several trends have a big impact on the database landscape:
  • data volume, type & use
  • agile development
  • new hardware architectures, cloud, commodity

4 categories of NoSQL are available:
  • key-value stores
  • document based
  • columnfamily/bigtable clones
  • graph databases

MongoDb is a scalable, high-performance NoSQL databaae of the document based type.
  • no transactions
  • json documents binary stored
  • replication/sharding/durability.

No strict data schema. Examples are
Twitter and Foursquares. Foursquares is actually running on MongoDB.

j:true => this is the system used by relational databases. Changes are stored in a journal on disk. MongoDB can be set to what you want:
  • asyn(default) instant feedback, "got the message I'll get around to it"
  • w=1, "Ï'll remember it"
  • j:true, "Wrote down what I need to do"
  • w=majority, "Wrote everything down"
  • w="<tag>", "Wrote everything down multiple times"

The command line client during the lab felt like working somewhere between SQL and calling javascript functions.

The situation:
  • RDBMS -> a lot of functionality, very little flexibility
  • memcache -> little functionality, a lot of flexibility
MongoDB for the most part goes a long way towards RDBMS feel.

Scala Through the Eyes of Java (8)

Speaker(s): Urs Peter

Urs Peter is a Speaker/Trainer of Xebia and provides courses in Scala, and it shows.

Scala started out in 2003. Created under the EPFL by Martin Odersky and exploited by the company Typesafe.

Has the following frameworks, Scala + Akka + Play.

Some points that came up:
  • syntax lightweight (helps?)
  • val = final
  • var = field
  • none = ?
  • operators are just methods (except == and a few others)
  • types are inferred.
  • no more NullPointerExceptions
  • functional programming (first class citizens)
  • object oriented programming (all the way, no native types)
  • multiple inheritance by means of traits.

An example was given using spaceships, always cool.
  • base, has the following traits
    • shield
    • gun
    • medic
  • commander, has the following traits
    • shield
    • gun
  • fighter, has the following trait
    • gun
  • mechanic, has the following traits
    • shield
    • medic

Dutch Scala Enthousiasts

Scala for the Impatient.

Shadaj Laddad

References

[1] J-Fall 2012
http://www.nljug.org/jfall/