Thursday, January 31, 2008

OSGi happy family: UserAdmin

Bundles, wiring, life-cycle and services architecture are not the only part of OSGi specification. Although they're "Core", standard covers also a number of services that we most likely gonna need - like HTTP, position (GPS!), preferences or user management.

User Admin Service comes into action whenever our application is run by multiple users with different privileges. It brings notion of Roles, Users and Groups, who have their properties and credentials. User can perform actions on behalf of selected role if he's one of that role's basic members and has all memberships required by that role. Authorization code looks like this:

User user = (User) UserAdmin.getUser("jacek");
Authorization auth = userAdmin.getAuthorization(user);
if (auth.hasRole("CVS_USERS")) {
// ...

Naturally users can come and go at any time, thus we're given actually two services: one for querying users (UserAdmin) and another to track any changes (UserAdminListener).
Generic specification allows for wide range of implementations behind UserAdmin. Equinox's one lays on Preferences (yet another OSGi service).
However UserAdmin is functionally very similar to JAAS, JAAS depends on JDK1.3 which is still to high barier for OSGi.

Wednesday, January 16, 2008

On my way to become commiter - homework

This post I dedicate to every fellow working day and night to get commiter status.

There is a time in every eclipser life, when one cannot hide longer in the shadow of internal packages, and has to stand firmly in the snihe of public API.

But one has to be very carefull, because demons of history sleep in Eclipse API. And if someone tries to influence their doze, will be punished.

There is only one way to survive: be faithful to the Eclipse tradition - do not try to break rules.

If you do not know am I talking about - please take a look into eclipse wiki. That's your homework (and mine too).

Just to give you prove that deamons do not sleep:
I have fixed once bug 205194 and that was serious crime which I have not even realized. Then the beast come to me.

Please do not follow my path.

Cheers ;).

Tuesday, January 15, 2008

Do bugs go to heaven?

As we're on fuzzies subject, I wonder how many of you still fill them when you mark bugs FIXED. Probably not many, I heard it's a daily ritual for committers to click FIXED button. :) But what happens after that single preciously investigated being disappears from our Mylyn task list, Firefox history or finally current Milestone horizon?
Well, bugs don't end up their lives in heaven. They sleep buried deeply in unmaintained CVS branch and patiently wait for their time.

Some people happen to work with applications based on Eclipse 3.0 or 3.1 and, among all good they produce, they accidentally bring past into life. Here I come into action with magic Spell Book bugzilla and it's always such a relief to see spells like "fixed in v20030501", or "problem was class XYZ.getFoo() which I have just updated" instead of incorrect Target Milestone field or meaningless "Fixed".
And I'll not mention some EMF gurus who seem to have fun leaving beautiful trace of their code transparency. EMF bugs go to heaven :)

Friday, January 4, 2008

Eclipse Con 2008

I will be there!