Wednesday, September 14, 2011

Application/Search Server - C++

I'll be documenting the redesign of my precious PackRapt.com. It will likely range from interesting banter to weepy regret. That said, however, what good is a challenge without little pain?

The redo will include implementation of a C++ Web Framework called WebToolkit.eu. If that doesn't sound painful, I don't know what does. It's quite popular and you can find a number of useful tools related to it on GitHub.

Previously I developed my PackRapt.com on the Rails 3 Framework. There is, as many of you know, a tremendous amount of community support for Rails and a slightly less amiable but ample community of Ruby devs to exploit. I do, however, enjoy a challenge and a Web Framework in C++ seems like the perfect dare.

The why...

My existing implementation of PackRapt.com relies on a disparate model of search, storage, and processing. In a feeble attempt to curb my curiosity about performance I'd like to consolidate the services as much as I can.

This is a very rough look at the existing architecture of the application:


Ideally, what I'd like in its place:


Now, I know that Heroku is hosted on Amazon Web Services and, as such, there is limited latency in the previous architecture. I thought, however, that I could try to do better. What do I know? The real question is whether I can pull it off. The cure for the insatiable curiosity of a novice is not failure, but success.

Well, let's get started with Wt and see how mad I really am. To start, let's talk about installing Wt.

Dependencies

As with any great C++ roll, the dependencies for Wt are near. The ubiquitous C++ boost library is requisite along with the lovely CMake. There are also a few optional dependencies for PDF Support (Haru) and image support (GraphicsMagick). If you've already got the ImageMagick fork installed you'll be fine - I think. I love ImageMagick, however, and I've been using if with RoR for some time. This installer for ImageMagick is mind-boggling in its simplicity. Kudos to Jon Maddox.

After you have your way with these guys the installation is as follows...

Create a build directory into your Wt root and configure the library with cmake.

$ cd wt-x.xx
$ mkdir build
$ cd build

$ cmake ../

It probably won't work. It never does, huh? If that's the case you can refer to the documentation to guide you through the cmake arguments that might suit your specific setup. It might be a bit painful but we all survive.

Now that we have gotten this far let's take a break. Goodness.

I'll chime in later this week or early next week. We'll tackle the Wt example and get into the design/architecture of PackRapt.com. We'll see...

See you in a few days.

Thank you,

Aaron

No comments:

Post a Comment