Tuesday, October 24, 2006

[Event] Java & Persistenz: 23. Nov. 2006

This BLOG Entry is in German, as the Event: "Java and Persistence" will be hold in German, hence it will be not particularly interesting for non-German audience. However, we will report after the event in English.
Der Open Source Arbeitskreis der OCG plant ein Event zum Thema
Persistenz im Java Umfeld.

Vortragende

Diesen Donnerstag findet unser "Persistenz-Event" im Tech-Gate im 3. Stock statt. Es ist uns gelungen, eine Gruppe von hochkarätigen Vortragenden zum Thema zusammenzubringen und wir freuen uns auf:
Moderiert wird die Veranstaltung von Alexander Schatten (IFS/TU-Wien).

Inhalt der Vortäge

Jürgen Höller: Die Entwicklung von Spring ORM, von Hibernate bis JPA
  • Jürgens Vortrag ist geplant als eine anektotische Reise durch Spring ORM im Kontext der Entwicklungen im Java Persistentbereich. Ziel ist es
    • einereseits die historische Entstehung von Spring ORM zu dokumentieren
    • andererseits das Produkt in Bezug zu anderen Persistenz APIs zu setzen, e.g. EJB 2.0, Hibernate, JDO, and more recently JPA (EJB 3.0)
  • Von besonderem Interesse sind natürlich die Mechanismen, welche auf Spring ORM einwirken, e.g. die Integration von persistence frameworks wie Hibernate, JDO, die Entwicklug von JPA, eine eventuelle Beurteilung von JPA, etc.
  • Was sind die Mechanismen zur Integration eines Persistenz-Frameworks?
Werner Guttmann: Data Binding, Persistenz, Aspekte der Modellierung
  • Werners Vortrag ist geplant als thematische Annäherung zum eigentlichen Thema (Begriffsbildung, Einordnung nach oben/unten/zur Seite) und als Versuch, Persistenz als gleichwertiger (Modellierungs)Aspekt verstanden zu wissen.
  • Darstellung der Problematik, Auflistung typischer Aspekte (persistence, XML data binding, ...)
  • Historische Beleuchtung der persistence side of things (JDBC, intrusiveness, standards)
  • Kurze historische Beleuchtung der XML data binding side of things (frameworks, JAXB)
  • Abhandlung des Begriffes "Aspekt" --> Bezüge zur Modellierung, Implementierung, separation of concerns
Stefan Edlich: db4o, objektorientierte Datenbanken
  • OODBMS Historie und neue Chancen
  • Der Open Source Ansatz von db4o.com
  • db4o Advanced
  • Neue Abfragesprachen: Native Queries und LINQ
  • "db4o in the real world"

Im Anschluss gibt es eine Podiumsdiskussion, moderiert von Alexander Schatten.

Ort und Zeit

Do., 23. November 15:00 – 19:00
TechGate Wien 3. Stock

Die Teilnahme ist kostenlos; Anmeldung bitte per Email an
Frau Haas (OCG).

Unterstützung

Der Event wird unterstützt von der OCG, Indoqa (Reinhard Pötz), Interface 21, Anecon und dem IFS/TU-Wien. Vielen Dank an alle Beteiligten!

Tuesday, October 17, 2006

[Tech] High Performance Queries with Apache Lucene

"Full-Text" Search? High Performance Queries!

Apache Lucene is one of the leading full-text indexing frameworks. Actually, from my point of view, the term full-text index/search is somewhat misleading. At least from the "marketing" point of view. For the application developer, Lucene is a framework providing a powerful and very performant query API. For certain, indexing is the technical basis for that, and Lucene allows to index hugh amounts of data: Data is organised in chunks called "documents" and a document can have several fields (name/value pairs). But most appealing for developers, Lucene provides a variety of query options like:
  • Search for keywords ("Java")
  • Search with wildcards ("Java*" )
  • Fuzzy search ("Java~" finds also "Lava")
  • Search of terms located close together ("Java Applicationserver~4" both terms within four words)
  • Range queries ("500-700")
And additionally these queries can be applied to various fields plus used in combination, i.e. a query like this would be feasible: "Find all Books from Author name is approximiately X where the word Y is in the title, published by publisher C or D and that was published between 1998 and 2003".

Besides the Query API the Lucene framework also offers a query parser, that can be used for user interfaces: The parser eventually uses the abovementioned query API.

Lucenes main application "the usual suspects" are problems like: indexing web-sites, indexing PDF, Office documents on a file server, indexing Wikis (Wikipedia) and so on. Yet, regarding these powerful query options, Lucene is recently used in some projects replacing traditional databases. This can be a good idea, when large amounts of data have to be accessed efficiently, access is mostly read only (few changes/writes) and transactions are not important. Objects could be serialised, e.g., in XML and stored on disk and added to the Lucene index. This can be an easier procedure then using databases. There are drawbacks, of course, like the fact, that data is not as highly structured as in relational databases.

Szabolcs wrote more about this topic in his diploma thesis (see below) and will probably add some thoughts here in the BLOG soon.

Lucene "Multilingual"


The success of the Lucene project, that originated as Java project in the Apache Software pool, is meanwhile followed by ports to other languages like: Perl, Python, C++, Ruby and .net. However, it should be noted, that not all port yet show the same quality as the Java version.

Some Experiences

In our work, we used and still use Lucene in several projects with great success. E.g., Franz Inselkammer used Lucene for his diploma thesis "Question based Knowledge Management in a Groupware Environment". Szabolcs Rozsnyai's diploma thesis "Efficient indexing and searching in correlated business event streams" was the foundation for our ongoing research in Event-Mining strategies.

Luke

One additional tip for work with Lucene is Luke:

Luke is a very handy tool, that allows to inspect Lucene indices. As they are stored in binary form, they are hardly accessible with other editors. And in developing Lucene applications, Luke is very helpful in checking, whether the index really looks as expected.

Learning Lucene

Unfortunately the documentation of the Lucene project is weak. Particularly the material for new users. This is unfortunate, because the project is excellent and this lack of documentation might give a wrong impression. However, there is a good book, that is recommended for every serious Lucene user: Lucene in Action from Otis Gospodnetic and Erik Hatcher. On the website of the book, also two chapters and some examples can be downloaded.

Remark: Sorry for my previous mistake: First I forgot to mention one of the two authors, and then I wrote the name of the other one wrong...

I wrote a brief introduction to Lucene in the current Infoweek.ch magazine (german/swiss).

Thursday, October 12, 2006

[Arch] Exception-handling best practices and patterns

"Poor exception-handling implementations can thwart even the best design"
Rebecca J. Wirfs-Brock

Exception Handling Strategies

In the recent issue of IEEE Software, Rebecca J. Wirfs-Brock discusses the influence of exception handling strategies on the quality of software architecture (PDF can be found here). In the article she expresses some design-guidelines
  • Coding Errors should not be handled by exception, but treated by proper testing strategies (e.g., unit-tests)
  • The number of "own" exception classes should be very limited
  • Naming of these exception classes should reflect what happened, not where the exception was raised
  • Recasting exceptions has to be done with care: just repeatedly rethrow exceptions is typically not a good idea (also from the performance point of view); on the other hand, throwing exceptions too deep in the hierarchy can leak implementation details (and confuse users)
  • Hence exception should be enriched with context information (from the classes that know the context) but thrown at a position, where the user is provided with useful information
Exception Patterns and Anti-Patterns

She suggests the development of exception patterns and anti-patterns (comparably to the well-known software patterns). Some attempts can be found at the Exception Pattern Wiki, and at this article, dealing with exception anti-patterns.

Monday, October 09, 2006

[Tech] Human Computation

I've found a very interesting and very funny video from one of Google's Tech Talks and it concerns a problem which was discussed earlier in this blog: is it a problem to use the labor of internet users or consumers without compensation? Well, Luis von Ahn has found clearly a way to compensate humans for computation and the currency is: fun. He invented the theory of symmetrical and asymmetrical verification games and designed until now three games to use human computation cycles for work which is nearly impossible to be solved by computers. The first one, ESP, is used to label images correctly. The second one, Peekaboom, is used to find the correct areas inside an image where specific features which are asked by their notion. The last one, Verbosity, targets the problem to find syntactically and semantically connections for terms. What is really fascinating is, the people like to be part of the game! They use hours and hours of time to play this games and get score points. They all know about the concept of the game, but that does not matter. So the technique that Luis von Ahn and his colleagues invented is a really unique and genius way to use humans as part of an program to solve the really tough problems.
So is it a problem to use people as processing units if they have fun? At least in the Matrix, they were also very happy ...
And by the way, the style of the presentation is simple admirable (even compared what I've seen at JAOO).

powered by performancing firefox

Sunday, October 08, 2006

[Event] Personal impressions of JAOO 2006

JAOO is known as one of the best conferences about Software Development and this is definitely true. Nearly all speakers are on a very high level and the audience is from the smarter kind of developers. The interesting part is, that there is no kind of separation between the attendees of the conference: speakers like Gregor Hohpe or Werner Vogels are listening the same speeches you do and they are sitting next to you! JAOO also is perfectly organized, starting from the registration up to sozial events such as the party on the first evening and the IT-Run, also the catering was very impressive, you never left lunch hungry. The most impressive speakers were Kevlin Henney and Alistair Cockburn. Both are very charismatic and especially Kevlin is very literated and knows how to tell stories. A lot of things weren't really new, but it makes a difference how they were presented.
What is also common to most the crowed: all really love beer ... and the JAOO provides a lot if it, even on the panels.
Aarhus itself is a nice little town and as a lot of pubs and restaurants so it is really worth to leave your hotel in the evening.
So what is left to say? If you can visit the JAOO, go! I will certainly visit JAOO 2007 if it is possible, now with the knowledge this is not a “normal” conference, it is unique in its own way.
Finally, trust your digital cam: if there is no enough light, it is mostly true ...

powered by performancing firefox

[Event] JAOO Tutorial Day 2

Patterns & Practices of Building Sustainable Software Architectures (Frank Buschmann)

Frank wants to bring the message that architecture in software really matters. If you do not know your primary attributes of your project and build and sufficient architecture you never will have a useful piece of software. He selected four themes which are often overlook in concern of architecture: Performance,Scalability, Availability and Flexibility. For each part, he shows up the problems and presented some solutions in kind of patterns or best practices. The final message was simple: architecture matters and if not executed carefully, it will hurt. Architecture is also not about platforms and technology, it is about what it is right to achieve your primary quality attributes.

powered by performancing firefox

[Event] JAOO Tutorial Day 1

ATAM - The Architecture Trade Off Analysis Method (Len Bass)

ATAM is a analysis tool for consultants to quickly detect architectural risks in projects. The main parts are: presenting the business model, extract the quality attributes, the architecture is presented and the evaluator checks if the quality attributes are matched by architectural tactics. Additional possible quality attribute are found via Brainstorming afterwards. The risks, if an quality attribute is not covered by the architecture, are expressed as scenarios, which are prioritized afterwards. This highly risky features are than reported to all stakeholders and provide a good guideline to improve the architecture so the project will meet most of the business needs.

EJB 3 Persistence with OpenJPA (Patrick Linskey & David Ezzio)

JPA is part of the spec of EJB3 and can stand completely alone from the rest of the spec. It is modeled after Hibernate and it seems that finally the persistence in JEE now is use able. OpenJPA is an Open Source Implementation of BEAs Kodo and under Apache License. The main advantage now is that JPA is an usable API which is standardized and implemented by various projects.
Finally the old Entity Beans are gone!

powered by performancing firefox

[Event] JAOO Conference Day 3

Hot Old Ideas - Experiences Of An Old Country Programmer (“Pragmatic” Dave Thomas)

Nice track introduction and an overview which concepts of programming models and languages he has encountered in his life. The reason to know about the history of computer science is, that a lot of ideas were there before but are sometimes forgotten. So sometimes you have to look back to know what could be right today ...

The History of Scheme (Guy L. Steele Jr.)

Introduction to Lisp and its concept of lists and where it was flawed. He then continues to present how Scheme (which original name was Schemer, but the files on his machine only had 6 characters ...) was born and how he discovered that Lamda Functions are functional equivalent to the actor based messaging concept.

Functional Programming And Monads (Erik Meijer)

Haskell is back and with Eric it made a lot of sense once more. For him, because he has a small brain, Haskell was the ultimate language because it represents the ultimate DRY language. He also explained why an experienced Haskell developer never ever writes recursive functions (as I did in the university course long time ago), you can always write folding functions and Lamda functions which work directly on the lists. His advice was, because we have already stolen the work from the mathematicians of the last 2000 years, the best thing to do is to train new ones because otherwise we will run out of ideas ...

Are We There Yet? (Rod Johnson)

Rod told the story how Spring come to life because the JEE concept was totally flawed 2003. Spring was the answer of the community and it fixed completely what IBM, Sun, BEA and others nether got right (because the smart people where never build real applications). The next big thing for Enterprise Java is to focus on the domain model, which should once again really be object oriented and not a dump structure which is only used for state management and as transfer structure between the DAO and the service layer. He has also a wonderful example why the interceptors in EJB3 are totally crap and showed that with Spring 2.0 and AspectJ it is a lot more elegant to inject aspects in the domain model.

Five Considerations for Software Architecture (Kevlin Henney)

Kevlin told something about five considerations for good and elegant architecture, which, as every fundamental truth, was discovered with the help of beer. He explains all five with a lot of anecdotes, but basically the idea is that if the architecture is flawed you never get a project right, independent from tools, languages or platforms you use.

How Will We Be Programming In 2016? (Dave Thomas, Guy L. Steele Jr., Erik Meijer, Kevlin Henney, Ole Lehrmann Madsen, Steve Vinoski)

Because the panel was stopped after the beer was gone, it lasts only for an hour. But all of them agreed in the following points: Concurrency and Distributions of programs will largely increase and had to be supported by tools and language features, programs and the problems they solve will get more complex and we need more tools for analyzing, deploy, test and monitoring them, DSLs will evolve but not everyone is a good language designer so most of them will be rubbish, development is language agnostic, so it doesn't matter in which language you solve the business driven problem.


powered by performancing firefox

[Event] JAOO Conference Day 2

The Soul of a New Programming Language (Guy L. Steele Jr.)

Guy presents Fortress, the planned successor for Fortran and a language which is targeted to the scientific computation community. Fortress is much more convenient for mathematicians to express already existing algorithms and it will also encapsulate by its compiler (or VM) the parallelism of the execution in multi-core or multi-node computer systems. A lot of concepts come from Haskell and Scheme but it will also integrate a lot of features which also have worked for Java. It is planned for 2010, so only the spec is in progress these days, no interpreter is officially available.

Typical Pitfalls in Agile Development (Jutta Eckstein)

Jutta told the audience about a lot of problems she encountered as consultant on large agile teams and opens the track.

DSLs Best Practices illustrated with Eclipse Tools (Markus Völter)

Markus shows how well Model-Driven development could work if you are using sufficient tools on the modeling level and you do not make the mistake to modify generated code. On thing you always should do is to use the strength of model-model transformations. As example, if you build your domain model and finally you want to generate some DOA objects for already existing domain entities, you have sometimes to enrich your model automatically because one or more generated artifacts will be referenced inside the model. So to be consistent and to use constraints on the model level, you have to extend the model itself on the first place. Finally you have to transform it only once to your target artifacts.

DSL implementation at compile-time via syntax extension (Laurence Tratt)

Laurence presented the way how easily DSLs can be build with his own system and platform, Converge, which works basically by the way of statically typed macros. He also mentioned that Converge is actually used by an Indian company so the stuff was not completely academic.

Scrum Tuning: How to Make Good Scrum Implementations Better! (Jeff Sutherland)

Jeff presents a lot of surprising finding from companies which already use SCRUM. One was very interesting, because the team there was large but located in India and the US. So SCRUM was executed in parallel but the team managed to be as successful as a collocated team. He also explains how it is possible to use SCRUM for the whole company (SCRUM C).

Domain Annotations (Michael L Royle & Erik Dörnenburg)

Short presentation how to use attributes as navigation handles to traverse in an domain model then no direct path exists between the entities.

If I was going to Glasgow, I wouldn't start from here (Alistair Cockburn)

The old joke was the start for Alistair to encourage the audience to tell why agile development was not possible to them (the sub context was, someone told him that Scandinavians do not need Agile development because they already do it for their whole life). Surprisingly, one third of the audience delivers working software more than once a month, most deliver at least once in free months. The obstacles which prohibit the deployment for the rest of the projects where basically reasonable, such as a fixed change cycle of the infrastructure, contracts (such as from the government) which forbid agile development (although not internally) or the software was part of embedded systems.


powered by performancing firefox

[Event] JAOO Conference Day 1

The Amazon.com Technology Platform: Building Blocks for Innovation (Werner Vogels)

Werner explains how strong Amazon.com is build as platform on services and why their solutions was the only possible way to scale well. Scaling is fundamental for them because the basic block in their business model is growth. He also mentions that their SAO architecture is not based on a specific vendor or technology (as SOAP/ESB), they use every technology which helps to solve a specific problem. Small teams develop these services and they are full responsible for deployment and the life cycle of the service.

Abstractions for Concurrency (Erik Meijer)

Eric presents the concurrency concept of Comega which helps to solve a lot of nasty problems you have to solve with Monitor usage. Because Comega is a language extension to C#, there is also a library version of the concepts which is based on delegates and can be used in every CLR 2.0 language.

REA (Resources, Events, Agents) (Pavel Hruby)

Pavel explains how business processes can once more be modeled in a way in which the economy normally really works: Goods are resources which are constantly exchanged, if the exchange takes place a business event happens and someone is participant of this transfer.
So instead of to model domain models in the typical technical way as entities and business value methods they can also be modeled in a more reality aligned way.
He builds this concept for the framework which is used in Navision.

Concurrency and the Composition of Frameworks (Joe Duffy)

Joe shows some concepts how to encapsulate concurrency if you build up frameworks and how you can define an API which helps the user to discover what your intention really was and why and how he has to use your code in concurrent situations.

Seaside: A Radical Web Framework (Glenn Vanderburg)

Glenn presented Seaside as working Demo, which he was changing all along the talk. Seaside is based on Smalltalk and makes heavy usage of continuations, so problems like the nasty state transfer if the user use the back button in the browser or “forks” the web page flow with opening a new window could be simply solved. Because it is Smalltalk, you can change the code rather easily on the fly so this talk was a real life demo. The downside is, that Seaside continuations are not serializable, so this can be a great obstacle if you want to scale your web site.

Conversations between Loosely Coupled Services (Gregor Hohpe)

Gregor presents some of his patterns which he is collecting for his new book about patterns for service oriented architectures. Most of the patterns are best practice for complex and simple conversation style between services.

SOA What's left to say? (Steve Vinoski & Gregor Hohpe & Beat Schwegler & Ivo Totev)

The panel discuss what is open for SOA and basically it should be now time to implement architectures based on services and never forget that the implementation is driven by business and not the other way round.

Methodologists are Blue-Green Algae and Methodologies as Swimsuits (Alistair Cockburn)

Alistair explains the audience why methodologists are a very low life form but which is useful because they can transform flawed systems (algae also consume CO2 and produce O, very useful for us). On the other side, methodologies have all different size and shape, so there is no “one fits it all”. His metaphor for this are swimsuits, because if they are used by divers, they have to be really heavy and if they used by girls, well, they can be very lean ...

powered by performancing firefox