Stephane Carrez Releases Ada Utility Library 1.5.0

It’s been a while since I’ve posted anything from Stephane Carrez’ excellent Java2Ada blog, but today that drought is ended with the release of Stephane’s Ada Utility Library v1.5.0. As the name implies the library provides a bunch of Ada utilities, chief among those being concurrent fifo queues and arrays, process creation/spawning and SHA1/HMAC encoding. There’s lots more in there, so be sure to check it out.

You can read the full release announcement here or you could simply svn clone it and get to the goodies immediately:

svn checkout http://ada-util.googlecode.com/svn/trunk/ ada-util-read-only

What I’d really like to see in this package is a standalone implementation of Stephane’s OpenID stuff. I’ve got a project that needs OpenID, and it would be really nice to be able to do “with Util.OpenID” and then make it fly. One can dream!

Ada Server Faces 0.3.0 is available

Stephane Carrez from Java 2 Ada is hard at work on his Ada Server Faces framework, and as this online demo clearly is showing, he’s making good progress. The version 0.3.0 release announcement outlines some of what Ada Server Faces is:

Ada Server Faces is a web framework which uses the Java Server Faces design patterns (See JSR 252 and JSR 314).

JSF and ASF use a component-based model for the design and implementation of a web application. The presentation layer is implemented using XML or XHTML files and the component layer is implemented in Ada 05 for ASF and in Java for JSF.

I can’t claim a whole lot of knowledge about the Java Server Faces design patterns, but judging from the demo, it’s some pretty powerful stuff. I look forward to tracking this project further, especially considering my involvement in the AdaHeads K/S project.

Ada Utility Library 1.4.0 is available

Good news from Stephane Carrez, author of the Java 2 Ada blog – his Ada Utility Library is now available in version 1.4.0. The Ada Utility Library is a collection of utility packages for Ada 2005, which includes:

  • A logging framework close to Java log4j framework
  • Support for properties
  • A serialization/deserialization framework for XML, JSON, CSV
  • Ada beans framework
  • Encoding/decoding framework (Base16, Base64, SHA, HMAC-SHA)
  • A composing stream framework (raw, files, buffers, pipes)
  • Several concurrency tools (reference counters, counters, pools)

It’s actually pretty funny, because at the latest open Ada-DK meeting, Jacob Sparre Andersen, Kim Rostgaard Christensen and I discussed the need for HMAC-SHA in relation to the AdaHeads K/S project, and then a couple of days later, we get this. I wonder what will happen if we discuss getting a million dollars at the next meeting?

New in version 1.4.0 of the Ada Utilities Library is:

  • Support for localized date format
  • Support for process creation and pipe streams (on Unix and Windows)
  • Support for CSV in the serialization framework
  • Integratation of Ahven 2.1 for the unit tests (activate with –enable-ahven)
  • A tool to generate perfect hash function

Good stuff indeed, especially the tool to generate a perfect hash function, what with all the latest talk of hash function related security issues. You can read the full release announcement here.

Howto: Thread safe object pool

Stephane Carrez from has written a new article at the Java 2 Ada blog:

Thread safe object pool to manage scarce resource in application servers

Stephane presents two solutions on how to build a thread safe object pool: One in Java and one in Ada. I think it’s interesting to see how the two languages solve this classic problem.

I do though wonder why Stephane has chosen to include a Set_Size procedure in the Ada example, instead of just adding size as a parameter to the Util.Concurrent.Pools instantiation. Also I would probably have used one of the Ada.Containers to hold the pool of objects, instead of a plain array. This would have, I think, simplified the code. Maybe this is a good subject for a new Ada-DK wiki article? It has been a while since I last added something to our wiki. Things to ponder…

Ada Server Faces Application Example: The Server

As long as Stephane Carrez keep hammering out new articles, we’re going to post links to them.

His latest article is named Ada Server Faces Application Example part 4: the server.

In previous articles, we have seen that an Ada Server Faces application has a presentation layer composed of XHTML and CSS files. Similar to Java Server Faces, Ada Server Faces is a component-based model and we saw how to write the Ada beans used by the application. Later, we also learnt how an action bean can have a procedure executed when a button is pressed. Now, how can all these stuff fit together?

So in this chapter we actually end up with a working web-application! The entire article is well-written, with lots of code and comments. Stephane finishes it all with a nice chart on how exactly requests are handled by an Ada Server Faces application.

The previous chapters are available here:

Enjoy!

The Action Bean – Ada Server Faces Application

Stephane Carrez has written the third installment of his Ada Server Faces Application article series:

Ada Server Faces Application Example part 3: the action bean

In a previous article, I presented in the cylinder volume example the Ada Server Faces presentation layer and then the Ada beans that link the presentation and ASF components together. This article explains how to implement an action bean and have a procedure executed when a button is pressed.

Here are the links to the previous articles:

There are other Ada goodies at Stephane Carrez’s website, so be sure to visit it, and if you have an Ada related website yourself, why not help boost the community by adding a link to the Java 2 Ada blog?

Thread safe cache updates in Java and Ada

Stephane Carrez has updated his Java 2 Ada blog with a post titled Thread safe cache updates in Java and Ada.

The problem is to update a cache that is almost never modified and only read in multi-threaded context. The read performance is critical and the goal is to reduce the thread contention as much as possible to obtain a fast and non-blocking path when reading the cache.

In this post, the obvious strengths of the Ada protected object are flexed. It is such an elegant construct, and really one of the _very_ nice things about Ada, especially in this multicore world.

Ada Server Faces Example Part 2

The other day I wrote about the interesting Java 2 Ada blog written by Stephane Carrez, and today I discover (or rather my feed reader does) that Stephane has updated his blog with part two of his Ada Server Faces article series:

The first article explained how to design the presentation page of an Ada Server Faces application. This article presents the Ada beans that are behind the presentation page.

In case you haven’t already caught on to this, Ada Server Faces is an Ada implementation of the JavaServer Faces way of building web applications.

A Very Interesting Ada Blog

I heard about the Java 2 Ada blog from Marc C., and after having checked it out, I second his initial opinion: “Lotsa neat stuff!”

We’ve got:

Yea, lots of good stuff. The blog is written by Stephane Carrez who is also the author of several interesting Ada projects:

I must admit I’m quite embarrassed about not having found Stephane’s blog and projects earlier, but it does underline the truth in one of my pet pevees: The almost complete lack of links between Ada resources. I’m betting that there’s a heck of a lot more Ada related blogs and resources out there, but they are hard to find because nobody links to them, and they in return link to nobody.

So please people: If you have an Ada related website, setup a links/resources page and link to other Ada sites. Surely you all know at least one URL pointing to another website about Ada programming? Or simply mention other Ada sites in your blog posts. It will make Ada soooo much more visible in the eyes of the search engines.

Well, that was a bit OT. To get back on track, all I have to say is be sure to visit Stephane’s blog. It’s a good place with some interesting stuff. Oh, and don’t forget to link to it, if you have a website of your own.