On commercial Internet and Enterprise application development

What makes people think building commercial Internet applications is similar to building Enterprise applications?

I am asking this question because there is a perception that one can directly apply the same principles of Enterprise application development to that of commercial Internet application development.

It may be obvious to most of you that these two activities have starkly different requirements, but don’t take it for granted that this is clear to those whose experience only involves one, or the other kind. Believe me, I run into these people allthetime. In particular, a good number of Enterprise application architects seem to think that the traditional, rigid approaches and principles of developing Enterprise applications should be preferred over the more agile approaches and principles commonly practiced in commercial Internet application development — when developing all types of applications.

That is a fallacy. That kind of thinking is an instance of the hammer truism, and fails to take into account the key differences in the requirements for the two types of applications.

Do Enterprise applications have higher scalability requirements than commercial Internet applications? Of course not.

By nature, the scope of any Enterprise application is that of a corporation. I don’t know about you, but I have not yet run into one with a user base anywhere near that of the Internet. Anyone will be hard pressed to find an example of any Enterprise applications in production serving as many users as Facebook, Ebay, or YouTube. And these sites typically run web applications made out of open source components, hosted on commodity hardware and infrastructure. Anyone parroting the mantra of open source components cannot scale must be living under a rock. Of course they are constructed to scale, albeit may be differently from the way the typical Enterprise applications are architected.

Commercial Internet applications usually have to go to market fast — in lightning speed compared to the Enterprise counterparts — and, over time, have to change rapidly to keep up with changing business requirements. Their development and release cycles are measured in weeks and months, not years.

While in the Enterprise we worry about some security vulnerabilities that can be exploited by disgruntled employees, out on the Internet we worry about all and every single one that can be exploited by anyone, including the 13-year old cracker and script kiddie living down the street.

The Enterprise environment is a lot more predictable and controllable. You can mandate a specific and narrow set of client application, workstation, and network environment requirements — and that’s acceptable, because these things can be commanded in a top-down fashion inside the Enterprise. By contrast, that’s not even a choice out on the Internet. Your application is open for attempted access, by anyone, anytime, using any types of client device.

So, tell me again how anyone can say that the same narrow architectural principles applicable for building Enterprise applications should be preferred for building commercial Internet applications?

The bottom line is, don’t let yourself fall into the trap of ignorant — or worse, deceptive — marketing messages about the perils of building commercial Internet applications using agile development methods, and the mix of open source components and commercial software where appropriate. It works, it has been working well, and it’s going to continue to work better, and better.

As always, use the right methods and tools to solve the right problems, and you will be doing just fine.

Comment [2]

Summer flix, 2009

I went to see the re-made Star Trek and The Da Vinci Code “sequel” Angels & Demons last week.

Although both are good and entertaining, they are not what I would call great movies. I am hopeful that Terminator Salvation will do better and save me from getting too disappointed this summer. Unfortunately, I can not seem to get excited with the current lineup... Someone, help me, please, and point me to other, more exciting and original titles, or this will be a long and hot summer…

By the way, I have been living with the Netflix Roku box for about a year now and, I’ve got to tell you, I have been loving every second of it.

True, the Netflix Instant Watch library could use more, newer and better titles. Regardless, the on demand viewing experience has been fantastic and habit-forming. I don’t return my discs to the mailbox as often as I used to, and yet I end up watching many more titles. You cannot underestimate the convenience of not having to deal with discs anymore. Given that network bandwidth continues to get bigger and better, Blu-ray — and any future physical media, for that matter — is dead, as far as I’m concerned.

So, four thumbs up for the Netflix Roku box, without a doubt.

Comment

What to do with Google Voice

I recently got my GrandCentral account upgraded to Google Voice, which lets you manage your voice calls much like the way you do your emails — and much, much more, like place free long distance calls and send free SMS anywhere in the US. It would probably be just a matter of time before everyone gets or wants to get their own accounts, too. So, I would like to share several things that I did with my account that some of you may find useful to replicate.


1. I added my Google Voice phone number to my contact info and put it on my phone’s speed dial.

With this set up, I can check my voice mails, update my settings, and make free calls very quickly.

To make free long distance calls from my iPhone, I would speed dial my Google Voice number, press 2, and enter the destination number. As obvious as this should have been, it did not occur to me right away how useful having my own number on speed dial could be.


2. I added a shortcut to the Google Voice mobile site on my phone’s application launcher home screen.

Since I am using an iPhone, I pointed mobile Safari to http://www.google.com/voice/m, and added the speed bookmark to my home screen by clicking ‘+’ and ‘Add to Home Screen’.

With this set up, I can reach the Google Voice mobile site to place calls, send SMS, and do virtually everything else with my account very quickly on my iPhone.


3. I created a Call Widget for people to make free long distance calls to me from my blog site.

I did this from the Google Voice web site by selecting ‘Settings’, ‘Call Widgets’, and ‘Add a new Call Widget’. Afterward, I pasted the generated code into a page in my blog site, which resulted in the rendering of a ‘Call Me’ button in that page.

When one of my blog visitors clicks the ‘Call Me’ button, it will prompt for a US phone number. Once entered and submitted, Google Voice will ring the number and place a call to me — for free.


4. I created a Gizmo account and added it to my Google Voice profile.

Gizmo provides a free service along with some optional paid services to make VOIP calls. After creating an account, I completed the set up in the Google Voice web site by selecting ‘Settings’, ‘Phones’, ‘Add a new number’, and choosing Gizmo as the ‘Phone Type’.

With this set up, my Gizmo account appears in the list of phone numbers that Google Voice can ring when I’m placing calls.

The benefit of having a Gizmo number configured is that when I travel abroad, I could make free calls to any US numbers by running a Gizmo client application on my laptop, and by having Google Voice place the call through my Gizmo account. Similarly, people in the US could call into my Gizmo account for free using Google Voice.


Let me know if you have any other tips to share. I have to say, however, that in the few hours that I’ve had my Google Voice account, I’ve been very pleased with their services. Hopefully, they will get even better over time.

Comment

The ghost that haunted my MacBook Pro

Let me tell you a scary story. Scary, only because this incident happened to my primary notebook where I keep most of my important information. This notebook happens to be a recent edition of the Apple MacBook Pro. I love this beauty, not just for its build quality, look and feel, and performance, but especially for its rock solid operating system. Or so I thought… until last Sunday, when I started noticing that it had the case of the wandering mouse pointer...

I was so disappointed. I thought, dangit, could it be that the trackpad was poorly manufactured, that within a few months it already started to pick up electrical disturbances in the air, or that the mouse driver software was so badly written and buggy that this had to happen? But wait, it was even more worrisome, because it looked like the mouse pointer did not just drift steadily across the screen — which would be a good sign of poor manufacturing of hardware or software — but rather, it moved around as if it was purposefully directed to trigger some functions.

Holy cow, my machine had probably been hacked!

Somebody was controlling my mouse pointer, clicking open some applications and the Finder window, too. Whoa… this was real trouble! I quickly took over control of the pointer, and cut off the Airport connection to make sure that noone could access my machine over the network anymore.

But… but… it did not stop there… Somebody or something continued to control my mouse pointer and do crazy things on my desktop!

I was stunned… You know, I don’t believe in the existence of supernatural beings, but, if ghosts existed, surely this would be the case of a haunted machine… For a short moment my lack of faith was a bit shaken… There was a ghost controlling my machine!

Tiger Lili

Until I looked around the corner, and saw Tiger Lili looking at me and shaking her tail. The curious thing was that her body movement somehow corresponded directly to the pointed movement of the mouse pointer…

Well, no, she does not have supernatural abilities to control computers remotely, or anything close to that. What she does have, however, is the ability to find warm and soft materials, and the preference for sitting on them. At that time, my bag was the warm and soft material under her backside.

So, can you now guess what was going on?

That’s right, she was sitting on top my bag that happened to have a switched on Mighty Mouse inside of it, that had been previously paired with my notebook. Being a Bluetooth mouse, it was easily able to control the notebook’s mouse pointer from a few feet away with radio waves through the fabric of my bag and the body of my little kitty.

What a relief. The MacBook Pro and Mac OS X were still rock solid, and, more importantly, there was still no such thing as a ghost.

Comment [4]

VMware Fusion port forwarding in NAT mode

Recently, I needed to make some network services in one of my VMware Fusion guest virtual machines available to other machines in my physical network. Among other things, this guest VM is running Squid and is connected to my company’s network through a VPN connection. A browser on the host OS X machine has no problem getting through over Squid on the guest machine, but I needed to have a native Windows machine in the physical network to get connected as well. It so happens that the guest VM networking is running in NAT mode, and so, by design, it is not directly accessible from the external, physical network.

Please forward my packets...

The solution for establishing connectivity is actually very simple, using a not so well advertised feature of VMware Fusion.

VMware Fusion supports NAT port-forwarding, which in short, lets the host machine forward traffic that has been directed to a set of configured ports of a guest VM. To set this up, I needed to do the following:

  • Edit the NAT configuration file to add the list of ports to be forwarded in this mode. To support HTTP proxy requests, I added port 3128 forwarding to the incomingtcp section of this file.
$ sudo vi "/Library/Application Support/VMware Fusion/vmnet8/nat.conf" 
...
[incomingtcp]
3128 = 192.168.19.69:3128
...
  • Restart VMware Fusion networking.
$ sudo "/Library/Application Support/VMware Fusion/boot.sh" --restart

No restart of VMware Fusion application or the guest VM is necessary. This configuration change takes effect immediately, and from this point on the host machine acts as a stand in for the guest and will forward all HTTP proxy requests to the guest VM.

Comment [3]

Installing your own Ruby gems in a shared hosting environment

Although this is presumably a situation commonly encountered, it’s hard to find the instructions on how to install your own private gems in a shared hosting environment — where you don’t normally have root access.

Sorry, no super user access

Here are the steps:

  • Create your local gems directory:
$ mkdir /home/julian/gems
  • Find out the current environment settings for the installed Ruby gems:
$ gem environment
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - GEM PATH:
     - /usr/local/lib/ruby/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
  • Create the startup file for Ruby gems to modify the search paths:
$ vi /home/julian/.gemrc
gemhome: /home/julian/gems
gempath:
- /home/julian/gems
- /usr/local/lib/ruby/gems/1.8
  • Add GEM_HOME and GEM_PATH to your shell startup file, which in my case is the .bashrc file:
$ vi /home/julian/.bashrc
...
GEM_HOME=/home/julian/gems
GEM_PATH=/home/julian/gems:/usr/local/lib/ruby/gems/1.8
export GEM_HOME GEM_PATH

With the above settings in place, you can now install and use your own private Ruby gems in your home directory.

Comment

Summer flix, 2008

Two down and a few more to go…

Just about two weeks ago I saw the surprisingly good movie Iron Man. I have to admit that I knew very little about the comic book and the characters of which this movie was based on before seeing it. Maybe it was because I had no expectation about the story line that I found this movie really entertaining. However, I have to say that Robert Downey Jr. did a great job playing Tony Stark, and Gwyneth Paltrow as Pepper Potts looked just beautiful, as always. So, I surely will see it again when it becomes available in high-def Bluray format later this year. I also cannot wait to see the two sequels, which unfortunately will not be out until 2010 and beyond.

Iron Man

Earlier today, I went to see Indiana Jones and the Kingdom of the Crystal Skull, and, frankly, was rather underwhelmed. I found the storyline rather predictable and the acting of the characters not so convincing. It was still a good way to kill two hot summer afternoon hours, but I expected more and the picture did not meet that expectation.

I am really looking forward to see Mongol and maybe Get Smart in June, and definitely The Dark Knight, and Religulous — if I can find a showing nearby — in July.

Instant watching

I also have just ordered the brand spankin’ new Netflix Player by Roku, so, I do expect to instant watch more titles from the Netflix collection, streaming over the Internet directly to this gorgeous Samsung LN52A750 unit.

This would be a really fun summer of movies, this year’s.

I've got you under my skin

I was at the San Jose Tech Museum of Innovation this past Saturday, April 19 to deliver a presentation at the SDForum Third Annual Silicon Valley Ruby Conference. The theme of the conference this year was “Using Ruby and Rails for Innovation and Creativity”. Given this theme, and what I have been involved with in the past several years, I decided to talk about how I have been getting Ruby on Rails applications developed in the enterprise environment.

Developing applications through the scenic route

The main message that I tried to convey in my presentation is that enterprise application development could be fun, when done with Ruby and Rails. Another equally important message is that a very effective way to get Ruby and Rails accepted in the enterprise application landscape is through thoughtful penetration from the skin, down to the core.

The enterprise environment is a complex one, no doubt about it — typically involving more than one operating system platforms, multiple legacy data sources, many existing components and affecting various organizational units. So, why add more noise and complexity to this circumstance? I would prefer dealing with YAML to XML for configuring things, Ruby to Java for spelling magic, and Rails to — heck, I am not even sure what the comparable legacy alternative would be… Struts or Spring plus Hibernate, or servlets and EJBs? — for building applications so I could reduce, rather than add complexity to this environment.

But, Ruby and Rails are not even enterprise ready, right?

Wrong.

If your plan was to conquer the enterprise world — gut the systems, remove all of the legacy stuff, and replace them with Ruby and Rails components — then of course, Ruby and Rails are not nearly ready for that. But there are tons of other things that happen in the Enterprise 2.0 landscape, and Ruby and Rails are the best candidates to be the tools for developing the solution to the problems occurring in this turmoil. These days, we blog, use wikis, tag and share bookmarks, and build social networks regularly outside and inside the enterprise. Business stakeholders start to see the benefits of these activities, and they would like to build applications that can mash up legacy services and can have the features that enable these activities.

This is what I mean by penetrating the enterprise landscape from the skin, down to the core. Rails provides a great framework for orchestrating web services, whether they are SOAP- or REST-based. It enables experienced enterprise developers to be even more competitive — by being able to build better mashup applications at the edge of enterprises at a lower cost, and faster. Rather than aiming to replace enterprise systems, the plan should be to complement them by continuing to take advantage of Rails strongest suit: being the services orchestration platform of choice at the edge of the enterprise. In other words, closer to the skin of the enterprise architecture. Over time, as Ruby and Rails age gracefully and become more mature, it would only be natural to build systems closer to the core of the enterprise architecture with them.

As far as being able to run Ruby and Rails applications on a traditional enterprise platform, I have gotten that done recently on the IBM zSeries mainframes. Well performing, elastic, and scalable applications that are integrated with and stand tall alongside other more traditional enterprise applications. If that is not enterprisey enough, I don’t know what is.

Ruby and Rails on zLinux

So, last Saturday, I closed my presentation by appealing to the community to be more creative about looking for opportunities to use Ruby and Rails to build edgy Enterprise 2.0 applications.

Comment

Getting started with Second Life

These past few days I have been greatly occupied with getting into Second Life (SL) for a project that aims to replace some physical collaborative design processes with virtual ones. I have to admit that although I have had an SL avatar on the Linden grid for over a year, I have only logged in and wandered around inworld at most a couple of times and never more — but that has been more because of the lack of available time to explore than the lack of interest. Lucky me, this time I’ve got a chance to do it in the context of a commercial project.

Having been around for about five years, SL is one of the most populated virtual worlds with over 2 million registered users as of January 2007 (and 12 million registered users as of today!). Although the actual percentage of active users is arguable, SL has a healthy virtual economy and community that had produced a real-life millionaire worthy the front page of BusinessWeek and a virtual babe that made it to the list of the Maxim Hot 100. Now, no one can argue with that kind of success, right?

Meet her inworld in Second Life...

So, to get started, I went ahead and downloaded the latest SL client software from the community downloads page. My laptop is a Lenovo ThinkPad T60 with a 1.83 GHz Intel Core 2 Duo T5600 CPU and 2 GB of RAM running Windows XP, and as it turned out, this machine has enough power to run the client and connect to the grid comfortably. If you do not yet have an avatar, you would need to register and create one through the registration page before running the client software. The registration process is quick, and once completed, you will be able to go inworld immediately with the newly created avatar.

After going through the welcome orientation, one of the first inworld landmarks that you should teleport to is The Shelter, where you could meet other new residents, watch video tutorials, pick up some freebies, and learn a great deal more about the environment. Also, check out the community events calendar to find out what is going on throughout the day. Not to be missed is the official SL blog, where you will find announcements about software updates, blackouts, and other issues.

Welcome to the grid!

Comment

Setting up a file server with WebDAV on IBM HTTP Server

This entry has been republished on February 20, 2008 by SYS-CON Media WebSphere Journal online magazine

IBM HTTP Server (IHS) is a derivative of Apache with extensions to support the IBM WebSphere Application Server (WAS). It is different enough that you can’t simply interchange it with the plain Apache if you have to support WAS applications. Nevertheless, it is still an Apache derivative, and therefore it supports Apache modules and extensions and behaves more or less as expected.

Recently, I ran into a requirement to set up a file server on an IBM zSeries mainframe platform running various WAS components and applications. To cut a long story short, this customer requirement eventually translates into having a WebDAV file server set up on existing IHS instances on the mainframe. Well, don’t let the mainframe platform scare you away. This system runs Linux on System z — or zLinux — virtual machines with Novell SUSE Linux Enterprise Server (SLES) as the operating system. From the application and system administrative perspectives, the operating system is just another flavor of 64-bit Linux — not much different from the Intel x86 version of SLES. As a matter of fact, with very little difficulty, I have been able to set up clusters of Ruby on Rails application servers to support a Google Maps Enterprise and ESRI ArcGIS mashup application on this same mainframe platform. But that’s another story that I will have to share with you another time…

So, even though there aren’t many explicit instructions out there on how to set up WebDAV on IHS on zLinux, I was able to do it by following the vanilla instructions for doing the same with Apache, testing the set up on a local Intel-based virtual machine running SLES, and finally implementing the same set up on the target mainframe platform. For your enjoyment, here are the steps that you can follow to replicate what I have done.

Hi, my name is DAVney, and I am your file server...

Step 1: Enable DAV modules

To do this, find the main IHS configuration file httpd.conf, which should be located in /opt/IBM/HTTPServer/conf directory, and uncomment the directives that load modules/mod_dav.so and modules/mod_dav_fs.so. Obviously, you will need to have root privileges to be able to do this. Next, add a directive at the end of the configuration file to load httpd-dav.conf which we will create in the next step.

...
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
...
Include /opt/IBM/HTTPServer/conf/httpd-dav.conf

Step 2: Configure DAV for the file server storage

Next, you need to create the configuration directives that will enable DAV for the directory on the server that you want to serve. In my case, I had an NFS partition mounted in /files that I wanted to use as the file server storage. In /files, I created a subdirectory called dav that I made readable and writeable to the IHS instance, which runs as user nobody of group nobody. This is the directory where uploaded files and collections — the DAV terminology for folders — will reside. In addition, I had to create a subdirectory to hold the lock files that will be created by the DAV modules, also made readable and writeable to the IHS instance.

# mkdir /files/dav
# chown nobody:nobody /files/dav
# mkdir -p /opt/IBM/HTTPServer/var/DAVLock
# chown nobody:nobody /opt/IBM/HTTPServer/var/DAVLock

The configuration directives for enabling DAV for the /files/dav directory resides in /opt/IBM/HTTPServer/conf/httpd-dav.conf and looks like the following:

DAVLockDB /opt/IBM/HTTPServer/var/DAVLock
DAVMinTimeout 600
Alias /files/ "/files/dav/"
Alias /files  "/files/dav"
<Directory "/files/dav">
    DAV           On
    Options       +Indexes
    AuthType      Basic
    AuthName      "DAVney File Server"
    AuthUserFile  "/opt/IBM/HTTPServer/conf/user.passwd
    AuthGroupFile "/dev/null"
    <LimitExcept POST GET>
        Require valid-user
    </LimitExcept>
</Directory>

Step 3: Create DAV users

To complete the set up, you will need to create the file that will hold the valid DAV users and their hashed password. I did this by using the htpasswd executable that comes with IHS.

# cd /opt/IBM/HTTPServer/conf
# ../bin/htpasswd -c user.passwd joe
New password: ******
Re-type new password: ******
Adding password for user joe

Finally, you are ready to rock and roll. Restart IHS and use a DAV client to connect to your new DAV file server!

# /opt/IBM/HTTPServer/bin/apachectl restart

If you have access to a Windows XP workstation, open the Internet Explorer web browser, select menu item File > Open, select Open as Web Folder checkbox and type the URL to the DAV file server in the text field, like so: http://joe@<dav_server>:80/files/ — replace <dav_server> with the IP address or name of your DAV server. You can then upload and download files and folders using drag-and-drop actions to and from the DAV file server. There are other freely available WebDAV clients that you can use, such as SkunkDAV, Novell NetDrive, and DAVExplorer. To use these clients, however, you will have to download and install their executables on your Windows XP workstation.

Comment