Saturday, December 15, 2007

Yet another project...

The D-Link DNS-323 home NAS device has a few nice features. Once of which that I wanted to test, was its print serving capabilities and various OS's.

Turns out, to test this is only a 5 minute job! By connecting a USB printer to the DNS-323, the NAS recognizes the printer instantaneously. At this point, it is only a matter of having your networked computers to see the printer through windows networking or Bonjour services on OS X.

While it was VERY easy on Leopard, Tiger was a bit more confusing. I started with Tiger, so I will here as well.

Both OS X 10.4 and 10.5 start by going system preferences to reach the printer and fax setup options. By clicking the "+" to add a new printer, the next step is where it gets different.

On Tiger, while it asks for IP addresses and information about the printer, I actually had to choose "More Printers..." to find it. Once this was done, It displays a "browser" of printers found over Windows Networking workgroup shares, Bluetooth, and AppleTalk printer shares. It also has options for connecting to various manufacture’s printers via IP (Canon, HP, EPSON, Lexmark) but this option didn’t work for me. However, under Windows Printing located by workgroup. I believe this works in this manor due to the fact that the DNS-323 is associated with a windows networking workgroup, and basically exposes the connected printer as a service that can be connected to. The process of connecting to it requires a userid/password that should be setup on the DNS-323. The only thing left to do is select the model of printer to locate the driver needed for it.

While this isn’t such a big deal, it was a bit easier on Leopard. On Leopard, simply choose to add a printer the same manner as above. Once that is done, it will have a much better way to "browse" various printer service shares, and find the printer you are looking for. Choose the "Windows Printing" tab at the top, and then browse the workgroup to see the shared printer. If you select to locate a driver, you can type in a search string for your printer model, and be shown the correct driver to use.

Recap:
The DNS-323 shares printers over windows networking via workgroups. As long as your OS can locate devices in this manner, you use that method to locate the printer directly. It is possible to share the printer from a PC that can see it, but if you do this, it sort of defeats the purpose of a print server. At that point, the PC that is sharing the printer has to be on to allow printing to occur. If all clients connect via the networked printer and not through a PC that is sharing the printer, nothing except the router and DNS-323 have to be on to print documents on that printer.

OpenVPN on OS X

If you have ever messed with any open source projects, you are missing out on some great experimentation. Sometimes these lead to frustration, but more often than not, they lead to great solutions for free, except for a bit of your time.

Today I spent a good portion of the day messing with such a project called OpenVPN. The purpose of this project is to allow VPN over a SSL UDP IP connection, instead of IPSec, L2TP, or PPTP. Therefore, it is not compatible with your run-of-the-mil VPN clients. You may think that you could use your browser, but alas the only way to participate as a client is by running the openvpn client to connect to the openvpn server.

It is still pretty secure, going over SSL and using a PSK system makes it fairly reliable. That makes it a pretty good (and cheap) option for home users, and perhaps small businesses. After a few hours today (not taking my full attention), I was able to get this up and running. I have tried to do this in the past without much luck, partly because the documentation is quiet large and detailed. In addition, I have been doing this on Darwin and there are a few things here and there that can cause a bit of frustration.

However, today I tackled the situation with diligence and managed to get up and running. Here is how.

First, I concentrated on the server. I downloaded the latest source package for the project. Secondly, you will notice that it may not be as easy as the typical configure, make, make install instructions. There are a few dependant programs that you will have to find darwin ports for. OpenVPN requires openssl, lzo, and pam. The best way to deal with all this is to do one of 2 things.

1. get each program’s source packages from the various project homes via the internet and compile/install them individually.
2. use pre-packed binaries for your OS. Linux users can take advantages of RPMs, and Darwin users can use Darwin Ports or an equivalent package manager such as Fink. Windows users can get a self contained .EXE, but who uses Windows?

Once all the required dependencies are handled, a simple configure, make, make install cycle should do the trick. Once everything is built, there are still many things to do, but all are outlined in the HOW TO. The basic steps remaining are to generate the certificate, public and private keys (for clients and servers), and this other file that is specified in the how to doc. This entire build/install process has to be duplicated on the client, however the keys and certificates only need to be generated once.

Once you have all the software on both client and server installed, and keys generated, the client keys need to be placed on the client. This needs to be done over a secure remote connection, or preferably via local network or some other rudimentary file transfer between two computers.

By modifying the client.conf file on the client, and server.conf file on the server, one has a complete setup that is ready to run. The directions for doing all this are outlined in the how to doc, but the configuration files themselves are well documented. To start the client or server pieces on each machine, it is only required to issue "openvpn ".

OS X gets a great benefit of having a nifty GUI to manage and connect to networks, or modify the configuration files in Tunnelblick. In fact, all I had to do on my client was to copy the generated files required on the client to the client, and run Tunnelblick to setup the client. Tunnelblick takes care of installing the TUN driver for OS X during its install. I think the only reason I had to get the actual source code on the server was to generate the keys and configuration files to start from. One of these days, I may wipe out my current openvpn setup and test this theory. Until then, I do not plan to modify any of it haha.

NOTE: Above I mentioned that I disabled LZO when I configured openvpn. Due to that fact, I disabled the LZO directive in the server.conf file which forced me to do the same in the client.conf.

WAS 6.1 and Session Persistance

For the passed few weeks, I have been trying to come up with a way to persist some data across web applications deployed under WAS 5.1. We have discussed many options, but had narrowed the choices down to two. Since those were chosen, I have been implementing one of them, despite it being something we may not want to do ultimately. It would work, but it does not really attack the problem at hand.

Friday it came to my attention that in WAS 6.1, if you deploy web apps under a single EAR, a simple change in the deployment descriptor of the applications will allow the session information to persist across the applications in each ear.

This is a good thing, but would require some rethinking about the organization structure of our applications. Despite that, it would solve a good chunk of the problems we have been trying to figure away around. The bad news is that it completely voids what I have been developing for the passed few weeks. Ill trade it if it works...

This comes at a good time as well because we are preparing to migrate to WAS 6.1 anyway. Soon, I will be testing this, and will put more information up here when it becomes available.

Wednesday, December 12, 2007

Bobby Petrino

So it is not new news that Arkansas managed to pull Bobby Petrino from the NFL to become the head football coach.


What are my thoughts? Well, I was extremely excited when I heard the news. I really had started to think that the best that they would be able to get would be either a low tier head coach or possibly a respectable assistant. Given Coach Petrino's stats, he sounds like a great change for a program that has become stagnant over its lack of ability to be 100% aggressive on the offensive side of the ball through the ground AND the air.  The Razorbacks have become so one dimensional, I really do feel that is the only reason they have not been able to reach that next level.  A coach like Petrino brings a well balanced attack that is very offensive minded, with solid defensive fundamentals. On paper it looks to be just the change the Hog Nation and program needs.

These were my thoughts as of last night.

I still think its great that we got him, but I am increasingly bothered by the bad press not only he is getting, but the school is getting from hiring him. Its more shots from ESPN and Atlanta sports writers at Petrino's character, but some go on to say that he "left an NFL gig to go to.... Arkansas." I cannot help but take offense to that. I realize Arkansas is not Florida, Alabama, or USC when it comes to tradition. Arkansas has great facilities, prestigious alumni, and once upon a time were a very very tough and thoroughly respected football program. Not to mention when they won 22 straight games during the 60s, and all those years of battles in the SWC - especially against Texas. The state is producing more and more upper echelon D1 athletes, but has had a problem keeping them all. We have 3 kids that have left in the last 2 years that should be starting (or close to) at schools like Auburn, Michigan, and USC.  The three that come to mind are all quarterbacks. It sounds like Petrino is just as likely to stay here for 1 or 2 years, and bolt than he was to take the job in the first place.  His personal character has been attacked, and he has been called a liar. While this is not a direct insult to Arkansas, it almost sounds like the press thinks that he should be removed from coaching completely. The media never has given much respect to Arkansas, not even during track competitions (43 national titles), and not during the early half of the 90s when Arkansas appeared in 3 final fours during that time ( 6 overall ) and 2 NCAA Basketball Championship games - winning in 1994.

As long as he can recruit, develop players, especially the skill positions that we have not had at Arkansas in years, Petrino is a welcomed change among fans. He has got to keep those players instate that keep leaving. Why did they leave? I believe it was because our old coach was unable to develop a quarterback. Why would a parade all american QB want to stick around for a ground attack offense? I liked Houston Nutt, but lets face it, he was there for 10 years. He took the program to a level closer to what it used to be back in the SWC days, but never could get it to the next level. Petrino is a great change in that concept. He CAN develop a quarterback, and thats what his career has revolved around. He can, and even much so with a great assistant staff, develop solid running backs. With all this, the state should start to retain more of its offensive skill players during Petrino's tenure - as long as they can trust him.

The bad press is bothersome not only because its bad mouthing our new hire, but because it makes me trust Petrino less. From the media's perspective, which is basically all I have to go on, its hard to make a full commitment to him given his flight risk. What if he coaches here, recruiting suffers because he cannot gain their trust, and then he bolts after 2 years, and we are in worse shape than we are now. Only time will tell, but for now I just have to be excited that we actually have such an offensive minded coach coming into a stale offensive program.

Pros:
  • Well established coaching record
  • Offensive Minded Coach, but believes in balanced attack
  • Can develop a quarterback
  • Wants to get back to college football
  • Has experience in all levels as OC, QB Coach, and Head Coach
  • Arkansas has plenty of money budgeted to allow him to pick quality assistants
Cons:
  • Under media attack for the way he left the Falcons
  • No proven ability to honor contracts or stay in one place for more than a short period of time
  • Set on being his own SEC Offensive Coordinator (sounds like Nutt)
  • Reported as untrustworthy, which could effect recruiting
  • Not from region - could hurt recruiting as he does not know the region or have established regional relationships


What do you think?

Monday, December 10, 2007

Another Lesson for Today

whew.

So the above cookie stuff was not 100% of my problem, although a good
piece of info. Today I learned more in depth facts on how and what the
struts action "redirect" attribute is used for. If you want to chain
actions (despite it being something that is not advised) and you want
to have the client get a response and create a new request with your
desired action, you should add ' redirect="true" ' to your actions.
The default value of false, makes your desired action complete in the
same request/response cycle as the original action instead of two
separate ones.

The pros about having the same request/response cycle for the two
actions is that your request data is preserved across them. The con is
that things (like cookie deletion) require that the client be told to
remove the cookie via a response from the server, which would never
get there until after BOTH actions have ran. In my case, that was not
what I needed. By the time the client was told to delete the cookie,
it was too late. We had already tried to process other needless code
based on that cookie still being in existence. Therefore, forcing each
chained action to have its own request/response cycle fixed this
problem, because the client was being told to delete its cookie before
the server ran that second bit of code. However, that caused other
problems. Now I see why the struts spec does not encourage action
chaining :D. This same problem held for updating the cookies' value to
something useless as well, because again, the client must be told from
a response to change/delete its cookies.

Solution:

In addition to checking to see if the cookie exists, I am going to
check to see what the cookie's age is. The way things work out, we
only have 2 possibilities for the age, so that will work just fine.
Again, not the prettiest solution probably, but it gets the job done.

Xmas Cookies!

Well, I have stumbled across something very interesting today.  I have been working with browser based cookies to keep track of a user's activities and found the need to delete them upon logout. After much headache, it was brought to my attention on another blog (http://blogs.bytecode.com.au/glen/2006/03/31/1143750630535.html) that it is not sufficient to just set the max age of a cookie to 0.  The reason being that your "delete cookie" routine has to be aware of the correct domain/path settings on that cookie. If you call your creation routine to recreate the cookie (with a known path/domain) and then set the max age to 0 on that cookie object before setting the cookie on the response, you can be sure that the cookie will truly be immediately removed.


The problem with this solution for me was that our creation routine returns not the cookie, but a boolean value as to wether the cookie was created or not. Rather than rewriting this logic, I thought of of another solution that may work for you. If possible, however ugly, you can always overwrite the existing cookie with some useless value, such as a spaces, and use that as a control in addition with checking to see if the cookie exists.

Another does of sugar came with the news that I am now engaged! I asked my girlfriend, Caroline, to marry me this past Saturday and she said yes. We are both very excited and I thought I would share!

Friday, December 7, 2007

iWeb Issues

So to continue my rant before on iWeb.

I have been a web developer for almost 4 years, and my least favorite activity is making the actual web pages. I really enjoy the designing and coding of the Java pieces involved, but the actual HTML/JSP code is what I hate the most. This is all going to change in my favor soon, but technically already has. I have accepted a promotion to the framework development team. My job responsibilities will not be pure developing of applications, but rather I will be developing, maintaining, and supporting the Java code and standards that all Java developers are required to follow. This also means that I will be evaluating new technologies and how they would or could apply to Dillards. If Dillards wants to pursue them, I will do the initial research followed by the design, implementation, and standards that we will follow. Its a great step for my career, and is more in the direction that I would like to do. I have been working under this new title for a few weeks now and I really enjoy it.

However, I think i have gotten off topic.

Like I was saying, I like to use templates for web development stuff whenever I can. I really love the UI of iWeb, despite it being slightly crippled. The only problem is that you cannot easily create custom templates. Templates are themes that carry through the entire "site" you are going to be building. That is to say, its not impossible to make custom stuff. You can easily take a template theme and in each of the types of pages (blogs, photo pages, movie page, about me, etc) you can manually edit the way the original template looks. The small problem of manually editing the pages is the headache of making sure all the pages match the same general design. The worst part is the fact that outside of changing basic things like colors and fonts, you really cannot rearrange page elements to much or modify page functions of certain things. The only other option for manually editing of templates is to break down the application resources - that is the various XML files. While I am not scared of this at all, the problem is that when you pull the XML files into an editor they are completely all on one line. Its so jumbled it would be terribly hard to edit. I may eventually look back into this, but for now, I thought I would try to use Blogger. So far, I am pretty happy. After a few hours of manual editing of this template, I have something that looks non-cheesy and a tad more original - I THINK ha.

Anyway, so my goal here is to talk about all sorts of things. I want to talk about pretty much anything, work and personal. If you are not careful, I will be back later tonight.

Xmas Wish List

So, I am a fan of electronically producing some sort of "gift guide" if you will for people who want to shower me with goodies at christmas time. I just think its a really handy way to do that... I am not sure why more people don't, and maybe if they do, i just haven't heard them talking about it. My list is sort of rediculous, but thats the point - ITS A WISH LIST! I do not halfway expect to get most of the things on it, but if i get something from it, i know i will be a happy camper. The list usually also helps me keep what I want to get myself after Xmas organized.

Thursday, December 6, 2007

First Post...

Welcome All!


So, I have sorta made this out of frustration. I am a Mac user, and was hoping to be able to use iWeb for this "project" but that has turned out to be a nightmare. More to come on this topic...