Tuesday, January 13, 2009

Small review of my yesterdays talk at JBUG Munich (updated with pictures)

I've been invited for some time by Serge Pagop to talk at the JBoss User Group Munich. Yesterday was the big day then.

Munich is not that far from Stuttgart, but the train connection is still slow because part of the tracks are built over 100 years ago, so that the fast train can nevertheless only run 60km/h in some places.

When I arrived in Munich I first met with Heiko Braun from the jBPM team to have lunch together and to talk about Jopr and RHQ and to give him a hands on introduction.

We also took a photo for all of you that don't believe that we are not the same person:

Foto 16.jpg

Heiko (left) and Heiko (right)


Afterwards I worked from his office for some time and then went to the meeting venue (the linked page offers a link to the slides).

Attendance was around 15 people of which there were 4 people from Red Hat Munich. It was nice to meet them too and I think they were happy to get information about RHQ, Jopr and JBoss ON directly from the source.

My talk went on for 1,5 hours - I was showing some slides and also the live system, as well as introduced into plugin-writing (again, slides with all the links etc. should be available soon from the JBug web site).

After talk we had some Q&A and then went into the other room to conclude the meeting with Pizza.

My train back left in Munich on time and I arrived back in Stuttgart at 1:20am this morning. There is no more tram going at that time, so I decided to take a Taxi. Unfortunately I did not have enough cash with me, so I asked about credit card acceptance. "Yes, no problem". But as the driver heard that I don't want to travel a big distance, he indicated me to leave his taxi again "I don't accept credit cards for such a small distance". So I had a 25mins walk from the train station to my home (Germany is no Service Oriented Country).

Here are some impressions from the event:

P1000356.jpg

Serge and I

P1000357.jpg

Part of the audience

P1000361.jpg

Me talking

P1000364.jpg

Socializing after the talk

Sunday, January 11, 2009

Tremendous speedup for NSMetadataQuery

In QNote I am using a NSMetadataQuery to allow the user to search for notes. Even with a notes database of a trivial size, it took ages to find notes (it is basically faster to open a terminal and issue a grep command ). And this even when
I have already restricted the searchScope to the directory with the notes in them.

Today I was experimenting with Spotlight again (is there really good documentation for it out there?).

When I add the type of the data I am expecting (plain text), the search gets real quick - exactly as expected. So the code now looks like this:


// Predicate expression for the search string
NSString *predicateFormat = @"kMDItemTextContent like[cd] %@";

// Predicate expression for
NSString *textType = @"kMDItemContentType == 'public.plain-text'";

// If there is something to search for ..
if (_searchKey != nil )
{
// Create the predicate for the key
NSPredicate *p = [NSPredicate predicateWithFormat:predicateFormat,
[_searchKey stringByAppendingString:@"*"]];

// And one for the type
NSPredicate * subPredicate = [NSPredicate predicateWithFormat:
textType];

// Combine the two
p = [NSCompoundPredicate andPredicateWithSubpredicates:
[NSArray arrayWithObjects:p, subPredicate, nil]];

// And set on the query
[_query setPredicate:p];


This simple addition of kMDItemContentType == 'public.plain-text' provides the speedup.
It is unfortunately not clear to me why, as I don't have any other files of other types in the searchScope.

Next thing for me to investigate is not why this spinning thingy (they are called async arrows :) does not stop spinning when spotlight does no longer return results. Perhaps I need to programatically set this and can't rely on the cocoa bindings here - does anyone know?

JBug-Munich talk 12.1.09

Ok, this is sort of a very short notice..,

I'll talk about Jopr,RHQ and JBoss ON at the JBoss User Group Munich on Jan 12th. The talk wil start at 7pm.

Check out www.jbug-munich.org for more info.

Friday, January 09, 2009

Warranty, repairs, downtime etc.

So, as I was twittering I had an issue with my mac mini at home and especially with its connected Raid in a Taurus case.

The internal hard disk of the mini seems to have died and the raid behaved strangely too. Ok, I got myself a new internal hard disk for the mini and restored it from a Time Machine backup. No really big deal (wasn't too easy, as the installer does not want to directly install from the backup when the data on the backup is more than the internal HD size and it does not let you ignore parts of the data).

But then I had to find out that (very probably) the power supply (one of those external bricks) is broken. When I put a volt meter on the 12V line, I see the voltage dropping to < 11V when the drives want to start, so the drives don't spin up.

I had bought the Taurus enclosure at a local dealer and went there last monday. They were not able to do anything about it, but to sent it to their central office. Today I was calling them about the status and the lady on the phone told me that the box was sent to the central office on wednesday (Tue was a bank holiday here in Stuttgart) and that they did not yet have it in the systems in the central office. She told me that they will probably take it into the system today and starting on it on monday.

If I extrapolate this, I will hopefully the box back monday in a week resulting in 2 weeks of downtime just from the dealer service side.

This is extremely annoying.

When I think back - if I did not go to the local dealer "competent, service, ..." but would have ordered somewhere on the internet, I would probably have saved money when buying and wouldn't have a longer downtime now.

How are your experiences? How do you handle this? I am a prosumer here - this is no way to order a 1 day pickup-return service. Also I can't really afford a several k€ raid array. Actually that raid is just an example of the underlying issue: buying from a local dealer in the hope of getting service - or buying just at the lowest cost (and possibly throwing the stuff away to buy new one).