This is a continuation of the previous post titled
Application/Search Server - C++.
Where we left off...
Configuring the Boost library with CMake can yield some errors. Not to worry. For anyone who has done any coding you'll know that half the battle is with dependencies and configuration. The best option for me was to install Boost 1.47 from
MacPorts.
$ sudo port install boost
From my install directory I cloned the Wt git repository.
$ git clone http://www.webtoolkit.eu/git/wt.git
Then, cd into your Wt directory create a build directory and configure with the Boost library.
$ cd wt
$ mkdir build
$ cd build
$ cmake ../
The small miracle of CMake begins and likely ends with a number of errors relating to the optional dependencies. From there you begin to build the Wt library.
$ make
The only errors I received here had to do with some deprecation warnings for the Android/SSL configuration. From there you can install the library.
$ make install
You might see an error related to write permissions on a directory to be created. For example -
file cannot create directory: usr/local/share/cmake-2.4/Modules. Yeah. You can sudo into admin and go at it.
Once you've got that under control the fun begins. Build the examples from Wt.
$ make -C examples
Work your way around the examples. I think you'll find that they offer a glimpse at the a number of important things. For sake of simplicity I'll start with
hello.
The following instructions relate to the wthttpd server included in the library. Naturally, you can
configure Apache as well.
For wrhttpd -
$ cd ../examples/hello
$ ln -s ../../resources .
$ ../../build/examples/hello/hello.wt --docroot . --http-address 0.0.0.0 -http-port 8080
You'll notice that the resources are linked along with a call to start the web server. You can include those docroot and web server arguments in your build config in your favorite IDE, if you'd like. It will streamline a number of things later in the project.
Once the server gets kicking you'll see:
And, there you go. You now have the Wt C++ Web Toolkit - hello example running. So, enter your name and...
I'd suggest you try a couple of the other examples. I think you'll find they're rich with possibilities.
So, how does this apply to PackRapt.com?
In consolidating the services used by PackRapt I now have the foundation for a C++ app that will be able to handle indexing, searching, authentication, etc. All-in-one. My goal is to make the search fast and decisive. I know, every search implementation says that they want fast and decisive. Without a disparate set of services like I have currently with PackRapt, however, it's much more likely to meet my expectations.
As such, the outline for building the new PackRapt.com will be:
- Prologue
- Wt Configuration and experimentation
- Library integration with Eclipse CDT
- Experiment with Wt Examples
- Examine the Wt ORM - Wt::dbo
- Integrate Wt::dbo locally
- Prepare Wt::dbo for deployment
- Create public Git repository
- Manymoon setup
- Getting into it
- Search
- Creating a local index
- Searching local data
- Authentication
- Local
- Remote
- Integrate with external sources:
- Google Apps
- Facebook
- Dropbox
- Box
- LinkedIn
- Twitter
- Access external services for data
- Index external data
- Search external data
- Internal and External Index Migration
- Full Search Integration
- Decision Engine
- Create
- Test
- Implement
- Getting out of it
- Style
- Layout and Style
- JavaScript Implementation
- ExtJS
- Finalize UX/UI
- Deployment
- AWS Setup
- EC2
- Elastic IP
- S3
- Test
- Deploy
- Sell! Wishful thinking again, eh?
That is a rough overview of the PackRapt plan. It'll be a ride for sure.
There are a couple of ways you can follow and contribute to the mess. I've setup a project on
Manymoon. If you'd like to follow along with the project let me know and I'll invite you. Please let me know if you're willing to contribute. I'll send you tasks to complete, as such. That would be great. I'll also create a git repository that'll be hosted on GitHub. Soon!
Well, here we go. I'll see you all soon.
Thank you,
Aaron