Caching in the cuisines

With every new semester comes a new project” ;). and for this semester it was call for a Web Tech. project.I chose an entirely different concept for it ,giving cuisines and beverages against their geographical locations. It sounds weird  but that’s the challenge,so i started picking up the services which can be helpful. After 2 days i was all prepared to start working on it.With JSP and Servlets  for my webapp i choose Openshift cloud hosting and other handful of services namely Google Maps,and Yummly Recipe Search.Giving UI was not a tough task, few days of work and a good UI was there. The most difficult task was to cache in the cuisines and beverages for all the countries (there are 190 countries listed on gmaps) .After searching for an authenticated source of such information wikipedia and some other websites (with limited information) were my options. I started caching dishes by making a crawler in Java ,tweaking that crawler so many times for just one website,and soon i had 860 dishes for just 64 countries. It was not a bad start,i was really happy that investing 3 hours in this paid off but when i checked these dishes against my recipe provider the things were not the same ,recipes of many dishes were not there . I decided to make another crawler which will check the cached in dishes against the recipes. That crawler seemed to work fine for first 200 or so dishes but all of a sudden it gave me a NullPointerException which was of no meaning there, after some tweaks i ran it again but with no luck it failed again. After some more tweaks i ran it again and fortunately it ran correctly this time and it counted 587 dishes with recipes. Now was the time to save all those dishes in a  markup file ,so that i don’t have to fetch them all the time but again the crawler start giving me random shit.Keeping my fingers crossed i’m still trying to figure out the cause of exception.Wishing for good results.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s