AutoList Design Pattern

Description: The AutoList design pattern is used when a list of all instances of a class is desired. If a class inherits from AutoList, all instances of that class are inserted to the list as they are created, and are removed when they are destroyed.

Eclipse + OSGI
This is a pretty interesting pattern because it essentially creates a dynamic list objects that are of a certain type (or interface to be exact). This concept is prevalent throughout many other patterns like location services and Eclipse Extension Points. The Eclipse extension point when mixed with OSGI Dynamic loading and unloading is basically the AutoList pattern done in a declarative way. When you provide an extension in Eclipse and your extension implements an interface your newly created object is now part of the Extension registry (somewhat). This means the plugin that has instantiated your object has added it to its list of objects. Mix this with the Extension Registry listener concepts and your plugin can now remove that object from its list when the parent plugin gets unloaded.

So in short, this is a great pattern and can easily be implemented in Java using technologies like OSGI bundles and Eclipse Extensions.

Java 5 Generics
However, how do you do this with basic Java? It is not like you can have multiple inheritance! But wait, Java 5 has the concept of Generics which are implemented as Interfaces. So could you actually write the AutoList pattern using the basic Java language? Almost, you would have to have your implementers write all of the code to properly implement the pattern (much uglier than C++).

Aspect Oriented Programming
Lastly, one thing I thought of was the use of Aspect Oriented Programming (AspectJ) to accomplish this on existing objects that declare similar methods and behavior. Your aspects could inject code in the right places to add and remove the instances from the list. I might have to look into this and see if it is even possible.

Reference:
Game Programming Gems III
Java 5 Generics
Eclipse AspectJ

Buying Memory

I just went to buy some memory and saw something I have not noticed in the past. The memory speed calculation is pretty interesting. I of course had to find the fastest memory before I purchased. What amazed me was the difference from brand to brand and even more interesting is that some brands do not even list their speeds! I endedd up buying two more gigabytes ram giving me a total of 3GB. It had what looks like the best CAS latency value of 2-3-2-5.

These are relatively important timing terms:

  1. tRP – The time required to switch internal memory banks. (RAS Precharge)
  2. tRCD – The time required between /RAS (Row Address Select) and /CAS (Column Address Select) access.
  3. tAC – The amount of time necessary to “prepare” for the next output in burst mode.
  4. tCAC – The Column Access Time.
  5. tCL – (or CL) CAS Latency.
  6. tCLK – The Length of a Clock Cycle.
  7. RAS – Row Address Strobe or Row Address Select.
  8. CAS – Column Address Strobe or Column Address Select.
  9. Read Cycle Time – The time required to make data ready by the next clock cycle in burst mode.

Note #1: tRAC (Random Access Time) is calculated as tRCD + tCAC = tRAC
Note #2: RAS and CAS normally appear in technical manuals with an over-line as in RAS or CAS.

Reference Link: link here

Java and Notes Developers do not mix…huh?

I just posted a response over at Ed Brill’s blog about how I think of the world differently with regards to Hannover and its impact on the Notes community. Even when I was a Domino developer customer I was knee deep in Java for many of the Web applications. I also did tons of Java Script. That said, I think we need to sit back and watch how a whole new world of opportunity comes to the Domino and Notes community. Composite Applications in Hannover are going to change the entire perception of the closed Notes architecture. You are now going to be able to leverage all of your existing application knowledge in a whole new architecture – Eclipse.

By the way, did anyone see Maureen Leland’s presentation about designer at Lotusphere? Enough said…

Ok, in case you didn’t check here for a presentation on Workplace Designer.

Upgraded the PC!

I upgraded my PC and it was well worth the money. For around $600 I have a new PC. I never suffer from disk space so that was fine, I stayed with my 1GB of RAM (which I may bump up) and the only things I changed were the CPU, Graphics Card and a new internal DVD writer.

I upgraded the main CPU from a Celeron 1.7ghz to a normal Pentium 3.2ghz. Amazing difference. My test was simple, a screen I have been working on in TrueSpace 6.6 took basically 8.5 minutes to render in full quality mode. With the new CPU it takes only 9 seconds. This is a huge difference in productivity

I then went away from the GeForce 400M to the new GeForce 7800. This bad bear is pretty amazing coming in at 256MB and AGP 8x. I had to stick with AGP because the motherboard does not support PCI Express

Lastly, I upgraded to the Plextor PX-716SA 16X Int Dual Layer Sata Drive (P67-1118 ). This drive is highly rated and only costs $100 (before the rebate).

So in short, I am glad I bought a good enough motherboard years ago (ABIT) that supported the full range on Pentiums for the 478 model.

The Address Bar in Lotus Notes for Notes URL's

A lot of people do not use this feature in Notes and whenever I use it and send them a URL they are mistified that an actual Notes Document, View or database is opened. The URL to your notes “object” is basically the same things as a Document, View or database link you send around in the Notes world. Do these look familiar ->Links?

First, show your Address bar in the Notes client:

AddressBar
Since pretty much everything is addressable in Notes you can now just click the down arrow in the address bar and viola, you get the Notes url for what ever is opened in the client. Like so:

AddressBar

So what does it all mean? Well here is a high level break down for this strange looking URL.

<protocol>://<server>/<database ID><view ID><doc ID>
Notes:///852568BD0051EF1E/38D46BF5E8F08834852564B500129B2C/F9077013C7B424CC852571190000628B

Ok, now you are really confused. The pattern guy reading this is saying “where is the server?“. Good catch; the server is blank because this URL is a URL to a document in a locally replicated database. A URL to a remote database would have the server name filled in like so:

Notes://DMAILSERVER91/872570D70079FA24/47A1C6AA72F507EB85256A2D006A583D/AC0B7BD736EF14BA87257117006EAD4C

So now you can send emails or instant messages to people with the URL. It isn’t pretty but it gets the job done!

Lotus NotesAddress BarNotes URL

No more inventions?

According to Nicholas Donofrio on CNet in this article he explains how there is no longer the next big thing.

Wow, I picked the wrong time to start looking at patents!

Ok, maybe it is not that bad. Nick does state there is plenty of room for invention but it will be around services and more importantly combining these services to make new inventions. This sounds like the IBM technical leader is subtlety promoting IBM’s SOA initiative, what do you think?

I hope he is, the more I learn about SOA and the value behind services it makes me think why it wasn’t standardized long ago. Much of the new code on the WED client is OSGI service based and it makes decoupling, abstraction and runtime extremely flexible.