Tag Archive: Tomcat


OfficeDesk-smTime at the desk has been limited this week. The extreme cold has listed Pittsburgh as one of the 20 coldest cities hit by the arctic polar vortex. As a result, My 7 yr old has been out of school both Tuesday and Wednesday and my over/under guess is that he will also be out on Thursday. We are due for another sub-zero with windchill morning. My time in the office has been limited. I have however, had time to finish doing some cleaning to my work desk. I’ve been trying to do a full clean and organise over the past month due to the fact that this is now my 24/7 work place. (If only I were getting paid)

But onto the progress. Software design is often an experience of two steps forwards one step back. Sadly, the one step back also usually consists of several O’Reilly manuals, a bunch of gSearchs, and of course documentation and answers found on StackOverflow. Today was no exception. Finally back on my desktop app for entering data I realised that I wasn’t just doing SQL puts to the database. I was also uploading graphic resources. These however were going into a directory with references being added to the database. Sigh, back down to the API level.

So today, I had to learn in Java (and to some extent on the Client level) how to compose programmatically an upload post and then correctly save it to my server. Now, I (as always) realise that there are probably simple libraries to do this and experienced Java, JSP, and LAMP folks will scoff at the likely banal process this is. I however hadn’t done it before so I had to teach myself. Happily, info was available in the form of a few StackOverflow questions, a couple of nice online tutorials, and a few hours later; my Poster test app is sending the requisite info and it’s causing a file to be saved. This isn’t finished. I haven’t actually put in some of the path and file directives and I’m not sure that the file is storing up in clean shape. But considering the fact that I have only gotten about an hour at the desk today; and that before that hour I didn’t know how to do this at all; I’m kind of happy about the results so far.

Tomorrow, I hope to have more time at the desk (even though the child is home again) and I hope to finally be done on the API level… for a while. Also, I will be having a conference with one of my “volunteers for credit counting.” What this means is that they’ve agreed to volunteer time in exchange for tracking hours and converting it to value once we see more funding. I’m incredibly excited to have this person working on the team because they have great business depth, incredible sense of organization, and a great working relationship with me to call me on stupidity when needed without taking a response of NO personally.

Things trudge, but I think we’re on track to keep moving forwards.

As always, if people are interested on helping out.. I’ve got plenty of work to go around.

I don’t get nearly that much done on the weekend with The Project. Sadly my back went out today so I found myself enjoying the comfort of my home office chair.

I managed to finish up the last of my API calls that allow me to start crawling back up the stack. As a reminder, I started on the end client with hard coded data. Then I went down and created an SQL based relational database to hold the data. Then I realised I needed an app to enter data. Then I realised I needed an API for the Apps to use.

So, thus began my love-hate relationship with Java and Tomcat. Both of which I knew next to nothing about.

Fast forward about 3 weeks.

The first version of the APIs are done. However, in checking the logs for the Tomcat server, I discovered some sites had been snooping around. I had hits from Wichita  Kansas, Brooklyn NY, and several hits from places in China. Needless to say, this made me just a little cranky.

So today, I got up close and personal with two technologies. Tomcat Addr Valves (which is like a Tomcat Firewall) and VPN. After a bunch of minor testing, I can say with (unlearned and naive) assurance; the net-facing service is now accessible by VPN only.

I wish I had more of a choice here; but I don’t. Until I’m ready to open the floodgates, I need to have access for people helping me who aren’t on my internal network while still having the resource accessible remotely. This seems to be the best approach.

Where does this put me? On Monday the first thing I do is gut the old client’s APIs in favor of the new ones. Then I start fixing up the data entry program. Then I start entering about two month of newer data.

Then we can start pushing on that client full speed again. Whee!

chattering-teethThis weak (sic) has been full of excitement. Thanks to the surgery which left me doped pretty much all week, I’ve gotten far less done than I wanted to. This is right down to having to push off an appointment from Friday to Monday as well as completely missing important mail from my land lady. There have been some highlights however.

  1. While I’m likely not using them correctly, I’m navigating Tomcat, Java, and Eclipse more efficiently now.
  2. I’ve done my first servlet code to push data back to the database from a client
  3. I’ve been working on a data entry app to make adding data easier. (It’s crappy, but it has some nice features including db lookup)
  4. I may have a potential Product Manager to start working with arranging the business end of thing.

On the agenda (aside from catching up on email and meetings)

  1. Data Entry Client
    1. Add versioning info to the client 02104.01.12..2250
    2. Add the data client to the continuous automation 02104.01.12..2250
    3. Gather the collected data for push back to the server
    4. Add a <strike>redacted</strike> to let me see where a <strike>redacted</strike> is.
  2. Servlet
    1. Finish the data PUT calls for posting data to the DB
    2. Learn how to automate the checkin of java code with CI to push it directly to the Tomcat machine.
  3. Client
    1. Use the new data managed in the DB to populate the existing interfaces
    2. Disable unused interfaces for Alpha distribution (keeping active for dev dist)

As you can see, the week ahead is fairly full code wise.

Time and code marches on!

javaNow, I’m honestly trying to not work on the project specifics except during the work week of Monday – Friday. Granted, like everyone else; I find a project I like; I dive in with both feet. Ironically, the average diver would probably hazard trying to go in hands first. But, then again; I’m not a diver.

What this means is that I spend the weekend trying to refine the work that needs to be done. I spend it learning technologies, experimenting with them and dreaming how they will incorporate. Despite being a holiday weekend (well, Yulishmash spill-over) I knew there wasn’t going to be much to get done. Also, with family in town, I really can’t kick them out of my home office when it’s also the guest room. (Yes, my home office has a Thinking-Queen-Sized-Bed)

So, it was down to sitting on the couch with laptop and hashing out the following. First was refreshing Java. I touched Java aeons ago. This was probably back when you could count Java’s age on one hand. Java is not yet 20, though it did become legal this year in the states. I’ve done a boatload of C and a shipload of Objective-C, and maybe a dinghy of C++. But Java was something that I kept getting pulled back from spending too much time in. Believe it or not; I’ve survived as a third-party Apple OS developer for over 25 years.

Java itself isn’t so much the problem. Object-oriented code with some syntax adjustments. Obj-C protocols are Java interfaces… sort of. The problem with most OO languages are the libraries and the build processes. In java is comes down to Packages, Jars, ClassPaths, and the like. So to learn Java I also brought in Eclipse. Eclipse is a popular Java IDE.  Well, after watching 5 horrendously painful lectures on the baby steps of Java for non-programmers, I was able to get the ever joyful “Hello World” up and running. But why stop there?!?

Next up was loading Tomcat. Tomcat is a web server that runs mini Java programs (known as Servlets). This allows me to do dynamic generation of content dependent on calls to a server. The server takes the request and passes it to the Servlet. The servlet uses java to parse the request, do stuff, and return data. So my next job was setting up Tomcat on my internal server (on the scared side of my firewall) and trying to write a Servlet.

This stage didn’t go quite as smoothly. Servlets have their own brand of packaging that goes even further into the world of Java. Thanks to some helpful folks at StackOverflow I was able to get a better handle on WEB-INF directories and my Java crashing web.xml file. Granted, after all that, the Servlet still wouldn’t run. After many hours it was sleep time.

Today, undaunted, I went back to the Servlet. I tried to figure out why the samples that came with Tomcat worked but mine belched “Resource not found” errors. Then I learned about how Tomcat Servlet paths worked and there was my happy “Hello World!” Servlet running on my Tomcat Server. (2 notches on the tinkerer’s belt)

So, obviously “Stuff” means fetching from the data store. We go to MySQL for that. This is a low effort relational database that will let me keep the data that I will pick and choose for my web requests. Client calls URL, URL hits Servlet, Servlet parses request, Servlet fetches from MySQL, Servlet pushes response out to client.

For those of you who do this all the time like it’s a piece of cake. Remember, some of us have been working on an entirely different kind of pastry. So, I salute the work you do so effortlessly. I hope to get there soon-ish.

Some fine tuning on a quick install of MySQL, a mini throw-away database and VOILA, Servlet is responding and showing a nicely formatted table. Now going back to the client; as previously mentioned I’m going to be using a data format called “JSON.” JSON has a lot of clients and APIs that can consume data in that format and turn it into something usable. So, next up on my agenda was finding a JSON library my Servlet could consume.

Remember, this is all seat of the pants, and I’m likely doing half of this all wrong. But if I can get a working proof of concept that looks good enough for seed money, then I can hire in people who do this for a living to do it right. So, I find an open source JSON java library. I even figure out how to turn it into a JAR (Java Archive) and soon was able to have a sample java program burping out my data in the much hoped for data format.

So, next up is moving this JAR and JSON code into the Servlet. Once that is there, we have an end-to-end request from MySQL JSON generator. But by then it’s the end of the weekend and it’s back to working on the client proper with the hand coded data set.

All this and I had a cold this weekend, too. It’s quite an adventure and I’m really thrilled with what we’ve accomplished so far. We being now a team of 5 contributors (including myself) even if half don’t really consider themselves contributors yet.

As we get closer to our Proof of Concept I will endeavor to get less vague.

Til next time…

Back to code!

300px-Tomcat-logo.svgWith the holidays, the usual entertainment segment of the blog has been on holiday. We do promise not one, but two post Sing Off wrap-ups. I’m pleased to announce that many of you really seemed to enjoy the Armchair Judge; so we’ll be bringing her on as permanently as she wishes to participate.

But onto the project. Code in the project itself was fairly quiet. I put in some analytics and testing libraries to allow me to start getting the alpha into people’s hands to abuse and give feedback. In doing so there’s been a lot of Product Management and Software Management going on. As always, read the following “We’s” as the pre-corporate “I” 😉

We’re now running Jenkins, Bugzilla and Tomcat on our internal servers for the purpose of building, running, and monitoring our software. We’ve added in hooks for Flurry and TestFlight to make it easy to track usage, take feedback, and distribute alphas. I have been re-doing the company’s NDA so we can send out the alphas to people. Also, we’ve put dual 1TB RAID’ed drives in place for data security as well as system backups. We’ve been running gitolite for SCM. All of this is running on OS X 10.8 + Server on a Mac Mini. So updating that to 10.9 will be an experience.

I’ve also given the app to our first Alpha tester. In the first evening we got two bug reports (S, You rock!) as well as a few unanswered feature questions. I’m more than happy to get more testers like this! Further, I did do some coding to create a data entry front end application to let me enter and validate data more easily.

So, currently I am looking for Java folks who’ve done Tomcat, general hobbyist programmers who might like to do some pre-financing work, and testers. Feel free to drop a line on this. 🙂

Well, it’s back to Tomcat for Dummies for me.

More soon!