Pok's Journal
Skip Navigation LinksHome

Advance Options

Advance Options

Rss Feed


Category Filter


Sort By

Submit
Final Overview


Games:
  • High score list for 1945 game
  • Uploadable maps for lark game
  • Uploadable images for puzzle game


Rss:
  • Created RSS 2.0 library for reading and editiong rss xml documents
  • Used custom .net control on homepage which reads rss feeds
  • Item editor allows editing rss feeds on the server
  • Custom caching library use to cache rss feeds


Web Services (Details):
  • Called web services in both .net and javascript (aka AJAX)
  • Created Pookle, which uses only javascript to call and parse google web search api
  • Created a router for Pookle to route soap messages
  • Created PokSearch, which searchs google, yahoo, and msn
  • Added threading to PokSearch


I've created some screen capture demos of all the stuff on the website. Requires WMV9 to play these files. The *.demo.wmv files are the demo files where I show off the functionality, and the *.code.wmv files are the files where I talk about the code behind the website.

You can also download the zip of my entire visual studios solution folder. Open the file /web/web.sln to open the entire solution. I commented almost all cs files, so I hope it is not too hard to read.

*Final Note: See my posting titled "Google Search API Issues" in my journal which relates to PokSearch. Google still having some issues so if a search term does not work in PokSearch, try another.






PokSearch Now Multi-Threaded


The PokSearch is now multi-threaded. The old code looks something like this:



The new code now spawns a new thread for every web request, so it now looks something like this:



If you like diagrams, see the download the full page diagrams here. The google search also does something similiar when it makes its batch requests to the google search api. Each batch request gets its own thread. The response time from when you click the search button to when the user sees the results is noticable faster to me. This is probably the last thing I am going to do for this code. I wanted to implement some sort of caching for the search request, but I don't think I will have time to do that.






Plans For PokSearch


I am going to update PokSearch to use multiple threads soon. The current program uses a single thread, so the flow goes something like this:
  1. Make call to Yahoo's web service
  2. Wait for Yahoo to return results
  3. Make call to Msn's web service
  4. Wait for Msn to return results
  5. Make call to Google's web service (get results 0-10)
  6. Wait for Google to return results
  7. Make call to Google's web service (get results 11-20)
  8. Wait for Google to return results
  9. Make call to Google's web service (get results 21-30)
  10. Wait for Google to return results
The plan is to use mutliple separate threads to make each web request. For example, if each web request takes 200ms, the above code will take 1000ms to complete. If we spawn a thread for each request, the code will only take 200ms to complete. This should speed things up significantly.






Google Search API Issues


Certain search terms will cause Google's search api to return a soap fault as described here. I ran into this issue myself, and spent a while trying to debug it until I found this page. The problem is with google's server apparently. So if you use PokSearch and get no results from google, that is why. Either try another search term or wait for google to address the issue.






Tcp Trace


Here is the tcp tracing program I was referring to in class, it basicly is a router that you send messages to and it records and routes your message to your destination. It works with soap and almost any http/xml protocols. This will let you see what wsdl generated code is doing behind your back. The link is http://www.pocketsoap.com/tcptrace/






Search Algorithm Update


I updated the ranking algorithm with fixes we found in class. Thank you everyone for pointing them out. So the moral of the story is, don't change you ranking algorithm the night before the presentation. :)






PokSearch Updated


Updating the PokSearch page. I tweak the ranking algorithm a bit and make the gui look nicer. I also fixed some minor issues with the code. The google web service seem to be a bit flakly last couple days, once in a while it times out. The code now handles these errors a bit more gracefully now. If the search api cannot be accessed, it will skip that search engine and continue with the rest of the code.






PokSearch Now With Msn


I've added Msn search to the searching page. Now PokSearch uses Google, Yahoo, and Msn to search.






PokSearch


I've uploaded a new page called PokSearch. It combines the google search api and the yahoo search api into one search engine. The results from both search engines are gathered, analyzed by my own ranking algorithm, and displayed to the user. This is done in C# instead of javascript, since manipulating xml in javascript was as much fun as watching paint dry on a wall. It is still early in development. I am planning on adding the msn search api to the mix when I get some more time.






Service Works Now


Web service is working, I just mistyped the url. Stupid me.






Soap Stuff


I've uploaded some soap stuff that I have been working on, go to the sitemap on the right. For some reason, the service does not work on the server...maybe IIS on the server isn't configured for asmx pages? I don't know, I will look into it.






Search and Sort Feature


I've added a search and sort feature, look at the top right of the page for a downward arrow, click on it to show the advance options.






Plans (Week of Feb 13)


I got some search and filtering features for the rss reader I plan to roll out this week. I'm getting bored with rss for now, so I want to dive into something else. I am still playing around with the databases, looking for something interesting to do. I also want to look into that ajax stuff that was presented today, seems interesting enough.






Rss Cache Info


I am testing out a cache for my rss reader. Instead of downloading the rss feed everytime it is requested, feeds are cached and saved in memory for future use. This saves network time of download the feed and cpu time in parsing the xml document. Right now, I only save the last 2 feeds in memory, so it won't blow up the server. The Rss Cache Info page will show you which items are currently cache. The page is useless on its own, it's just for the curious.






Rss Item Editor


Look at the right navigation pane, you will see a new link that points to the Rss Item Editor. This lets you edit any rss feeds that are hosted on the server. You won't be able to edit the main feed that this page uses, but there is a public feed for anyone who wants to try this feature out.






New Rss Reader


I converted my old journal software to use standard RSS 2.0 format. The main page is just a generic rss reader that points to my rss feed. You can also use it to read other rss feeds. Here is couple examples you can try:
If you want to try other feeds, go to the Rss Page and enter your own feed url. Currently, the only feature I enabled are filtering by category. If the rss feed has category assigned to the items, you can filter by clicking on the category name that will appear in the bottom right corner of every entry.






Plans (Week of Feb 6)


I want to work on my journaling software some more next week. I want to change the way entries are saved in the xml format. Right now, it is stored in a xml file called Default.xml which uses a proprietary schema. I want to convert that code to use a more widely used schema, something like rss. I will also look into the sql database for data storage in the future.






PuPuPuzzle


New game called PuPuPuzzle is available. You can upload your own images to the server and play with your own images. Don't upload something you don't want other people to see, because anything you uploaded is public!






JS Scroll X/Y Location


I spent the whole day trying to figure this one out. I was trying to get the scroll x and y location of the page using javascript. It sounded easy enough. It turned out that for IE, getting the scroll x and y value depends on whether there is a doctype declared! See the Js Window Scroll experiment and see for yourself.

Here are two links that will better explain things.






Uploaded Some Experiments


I uploaded some experiments I was doing. The Image Manipulation is just testing that the System.Drawing.dll is on the server. The Js Drag Drop was a fun way to demo drag and drop capabilities using JavaScript.






New CSS Style


Change the default css style for the page, you can play around with the style sheets on the top right of the page.






Current Contents


Be sure to check out the game section where you can play some of my old games. I've added some sort of server interaction for all the games. For example, 1945 has a aspx high score list, and the lark game allows you to submit your own maps to the server for everyone else to enjoy.

1945
Click to play

The 1945 game requires Java 1.4+ and the Lark game requires Java 1.5+ (since it uses the new standard xml libraries). Enjoy.






New "Journal" Software


Horray, I create and added a "journal" like software so I can update this page without editing html files. As you can see at the very bottom of the page, I added a "post entry" link. Of course you won't be able to post unless you have a password. I plan to add more features to this journal software when I get some more time, for example, feature to edit and/or delete an entry would be useful.

FYI: I don't like the term "blog", it is too trendy, so I think I will call this a "journal" instead.






Current Plans


Right now, I am refreshing my head on how to do javascript. Just playing around with javascript and css right now. I plan to make some interactive server component that let users upload custom images onto the server, and do some fun stuff with drag/drop.




Rss was loaded from cache, last updated on 11/23/2008 5:43:04 AM
© Pok-Ching Lee 2006