The final part of this project incorporates a DynamoDB (NoSQL) backend, along with nodes configured to be hosted on AWS cloud. Not all parts are in public repos, but here is the Warehouse Portion.
- Download Apache HTTP Server at http://httpd.apache.org/download.cgi, and compile and install it (see
README.txt) - Download mod_jk at http://tomcat.apache.org/download-connectors.cgi, and compile and install it (path for
apxsneed to match the above) (seenative/BUILDING.txt). Make sure thatmod_jk.sois in the appropriate location, matching the one in/PATHTO/distributed-ordering-system/mod-jk/mod-jk.conf - Configure Apache HTTP Server by appending to
INSTALLEDLOCATION/apache2/conf/httpd.confthe following line:replacingInclude /PATHTO/distributed-ordering-system/mod-jk/mod-jk.confPATHTOwith the appropriate path. - Edit
mod-jk/mod-jk.confwith the appropriate path tomod-jk/workers.properties - The following ports are used in
workers.properties, and we will be configuring two instances of Tomcat to use these portstomcat1 server port = 8006 tomcat1 connector (HTTP) port = 8081 tomcat1 connector (AJP) port = 8010 tomcat2 server port = 8007 tomcat2 connector (HTTP) port = 8082 tomcat2 connector (AJP) port = 8011 - Have two copies of Tomcat in separate directories, and replace
conf/server.xmlwith the ones provided inmod-jk/tomcat1/server.xmlandmod-jk/tomcat2/server.xml, or manually change the ports to match the above, and addjvmRoute="tomcat1"to the lineand similar for tomcat2.<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
- Make sure the ports in
settings.propertiesare not occupied, and make sure the hosts match the ones you are running supplier1 and supplier 2 and orderingsystem on. ant jarto build jar files. (Optional - the jars should already have been built).- Run
Database.jar, thenSupplier1Server.jar, thenSupplier2Server.jar, thenOrderingSystem1.jar, thenOrderingSystem2.jar, inside the directory where the jars are built. (Usejava -jar Supplier1Server.jaretc) - Deploy
WAR/tomcat1/BikeShop.waron Tomcat1, andWAR/tomcat2/BikeShop.warTomcat2. - Start the Apache server, Tomcat1 and Tomcat2.
- Do not manually modify data files when anything is running.
- Go to
localhost:80/BikeShop/or whatever host and port the Apache server is deployed - Login not required for browsing bikes.
- Create a new customer by filling out the form in
New Customer. - Log in using the CustomerID and password specified.
- To buy bikes, read the item number of the bikes you want, and add them to your cart under
Lookup/Buy bikes. Your cart is not lost when navigating to different pages, or refreshing, but is restricted to current tab. - Press
Buy cartto purchase items in the cart. - Check
Customer Info/Order Historyto see your order. Total price is computed across all bikes in the same order (same Order Id). - Your order will be completed in approximately 1-2 minutes. A message will be in your inbox in
Customer Info/Order History, but messages do not persist when the OrderingSystem is shut down. All other data will persist.