Sunday, August 10, 2008

Site updated, latest source in SVN

I've updated the site with a couple of bug fixes.  Mainly smallish things that make using the site more difficult than it needs to be.

The more exciting news is that I've finally committed the latest version of the site.  The source in SVN is almost a complete rewrite of the original release.  It's now using Monorail+AspViewEngine+Gaia.  I believe it's the only site out in the wild using Gaia with Monorail.


Saturday, August 2, 2008

Uploading bugfix release today

Well, no new features but there are a few bug fixes that are going to hit the site today.   Yay bug fixes!  This will probably be the last release until Mono 2.0 is released, at that point I'll probably do a big update, pushing some new features, the latest version of Gaia and Mono 2.0 (Right now I am using a locally patched version of Mono :-s).

Other than that, I'll probably be focusing on content creation for the next little bit.  The site seems to be in pretty good shape, but it's hard to tell how well things will handle lots of content.....so I guess that means I need to create lots of content, or convince lots of people to little bits of content, or more ideally, convince lots of people to create lots of content.

Sunday, April 20, 2008

Roadmap Tweaking

Last night I finished reading Building Scalable Web Sites: Building, scaling, and optimizing the next generation of web applications. Definitely a useful read and I will be using some of the books advice on Grurrah.

Google code's wikis are down right now, but later today I plan on adjusting the Grurrah roadmap a little bit. The main thing I will be doing is pushing back the initial release until right around the 1st of may and creating another release mid may. I'd like to push the initial release back so I can focus on some security issues and I would also like to upgrade Grurrah to the Gaiaware Glory Release. It will be nice to use Glory's improved menu bar for adding search to Grurrah and I'd like to try using it for the WYSIWYG editor as well.

I'll also push back the facebook integration a little bit, just because facebook is a wild animal and I am afraid of unleashing it on my servers before I am sure things will scale well. I think Grurrah should be able to scale out pretty well, since I am (now) avoiding a lot of the common problems people have when trying to scale.

Saturday, April 12, 2008

The Comments control

Not in SVN yet but I am pretty happy with the state of the comments control. My goal was to make things super simple for users. No edit, no delete (although, I might add delete) and no replies. Just a nice little stream of consciousness on the bottom of pages. Inspired by the simplicity of twitter.

The more I think of it, the more I feel comments might be the most important part of Grurrah, since it gives people a way to communicate about Grurrahs.



Everything is nice and AJAXy thanks to Gaia. There are ten comments per a page displayed, and you can go to older/newer comments without a page refresh. Also adding a new comment doesn't cause a page refresh. Oh, and the Add Comment textbox thingy hides and expands without refreshing. Definitely makes the user experience a lot nicer than your standard click and wait webpage. Plus reduces strain on my webserver, which is pretty important considering the resource limited environment I am running in right now.

Friday, April 11, 2008

Lions, Tigers, and Bears

There is a little something of everything in the upcoming Grurrah code drop. I've rectified some performance issues, fixed some stability issues, ammended some minor UI issuelets, cleaned up some code, added some new backend enhancements AND implemented some new features.

Here's a quick rundown of the more exciting stuff:
1. User pages. A user page will display what Grurrah's a user is doing and which one's they want to do. Users will also be allowed to upload profile pictures which will be used in:

2. Comments! Users will be able to add comments to each Grurrah.

3. Search!!!! The indexer has actually been running on the server for a week now. I've had it running in the background so I could figure out if there are any disastrous side effects to having the indexer running. Doesn't seem to be any so far. Soon grurrah.com will sport a search box in the menu bar at the top of every page.

4. Memcached. OK, not sure if everyone finds this exciting but I do. Grurrahs are now cached in Memcached which should greatly improve performance once grurrah is under heavy load. Going to save a lot of strain on the DB.

Less exciting stuff:
Fixed the JS for the ratings control to be a lot more useable (you don't get the hand icon when you mouse over the stars after submitting a rating)

Cleaned on MySqlConnections, we aren't leaving any open anymore.

Fixed bug where clearing tags wouldn't let you set tags anymore

Cleaned up a lot of the object model code, getting it out of Visual Studio style and putting it in Jackson style.

When will you get to see this stuff?
Everthing should be in SVN tomorrow. I can't push it to grurrah.com yet, but I am thinking about setting up a dev.grurrah.com that is always running the latest and greatest. It really depends how much time it will take me to set that up. I only have so many cycles, and I don't want to dedicate too many of them to server administration when there are still a bunch of important features to implement.

I'd like to have these new features live on Earth day, but that might not be possible.

Monday, March 31, 2008

Getting started on search

Spent an hour tonight playing with Lucene.Net. I've got a real simple command line version of search going. I also think I came up with a good idea for queueing indexes. Hopefully this weekend I'll have time to hack on that. For now search seems like an easier problem than I expected though.

Here's my real simple indexer and searcher:



using System;
using System.Configuration;
using System.Collections.Generic;

using Lucene.Net.Index;
using Lucene.Net.Documents;
using Lucene.Net.Analysis.Standard;

using MySql.Data.MySqlClient;


namespace Grurrah.Tools {

public class Indexer {

private static readonly int GrurrahIdColumn = 0;
private static readonly int GrurrahNameColumn = 1;
private static readonly int EntryTextColumn = 2;
private static readonly int TagNameColumn = 3;
private static readonly int RatingAvgColumn = 4;

private static readonly string QueryString = "SELECT Grurrahs.id, Grurrahs.name, Entries.text, Tags.name, AVG(user_grurrah_ratings.rating) FROM Grurrahs " +
"RIGHT JOIN Entries ON Grurrahs.id = Entries.grurrah_id AND Grurrahs.entry_index = Entries.entry_index " +
"LEFT JOIN tag_map ON Grurrahs.id = tag_map.grurrah_id LEFT JOIN Tags on tag_map.tag_id = Tags.id " +
"LEFT JOIN user_grurrah_ratings ON Grurrahs.id = user_grurrah_ratings.grurrah_id GROUP BY Grurrahs.id, Tags.name";


private static MySqlDataReader reader;

public static void Main ()
{
LoadData ();
IndexData ();
}

private static void LoadData ()
{
ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings ["Read"];
MySqlConnection con = new MySqlConnection (cs.ConnectionString);

con.Open();

MySqlCommand cmd = new MySqlCommand (QueryString, con);
reader = cmd.ExecuteReader ();
}

private static void IndexData ()
{
IndexWriter writer = new IndexWriter ("Indexes", new StandardAnalyzer (), true);

while (reader.Read ()) {
if (reader [GrurrahNameColumn] == DBNull.Value)
continue;
writer.AddDocument (IndexGrurrah ());
}

writer.Optimize ();
writer.Close ();
}

public static Document IndexGrurrah ()
{
Document doc = new Document ();

if (reader [RatingAvgColumn] != DBNull.Value)
doc.SetBoost (reader.GetInt32 (RatingAvgColumn));

doc.Add (new Field ("name", reader.GetString ("name"), Field.Store.YES, Field.Index.TOKENIZED));
doc.Add (new Field ("text", reader.GetString ("text"), Field.Store.YES, Field.Index.TOKENIZED));

return doc;
}
}
}




using System;
using Lucene.Net.Search;
using Lucene.Net.Documents;
using Lucene.Net.QueryParsers;
using Lucene.Net.Analysis.Standard;



namespace Grurrah.Tools {

public class Search {

public static void Main (string [] args)
{
if (args.Length < 1) {
Console.Error.WriteLine ("You must supply a query parameter.");
return;
}

IndexSearcher searcher = new IndexSearcher ("Indexes/");
QueryParser parser = new QueryParser ("text", new StandardAnalyzer ());
Query query = parser.Parse (args [0]);
Hits hits = searcher.Search (query);

for (int i = 0; i < hits.Length (); i++) {
Document doc = hits.Doc (i);
Console.WriteLine ("{0}: {1} -- {2}", doc.Get ("name"), doc.Get ("text"), hits.Score (i));
}

searcher.Close ();
}
}
}

It's official, Grurrah.com is open source

Just checked the first source code drop into svn.

Sunday, March 30, 2008

New WYSIWYG Editor

Tonight I worked on a new WYSIWYG editor for Grurrah. It was a pretty simple task since I am using the gaia RichEdit control and the MultiView. I wish I had known about MultiView before, since I've basically done a manual version of the multi view all over the place in Grurrah. I'll clean that up sometime soon, removing a bunch of manual setting of controls visibility and using MultiView.



The hardest part of making the editor was finding icons. I'd like to add list support to the editor, but tango doesn't have list icons. I will also be adding image support soon, I just need to think through the details of image upload first.

I also want to add support for linking to other Grurrahs, but I'll need an icon for that. I'm planning on using the gaia:AutoComplete control for the link to other Grurrahs window, filling it in with the most popular Grurrahs, and maybe eventually I'll fill it with related Grurrahs.

Developing and Deploying Grurrah

Grurrah.com is run on a single linode virtual server. The virtual server is running open suse 10.3. I am using apache2, mod_mono, mysql (with the MySql .net connector), and memcachedto actually run the site. I am also using a couple of open source libraries. For all the AJAX support I am using Gaia Ajax Widgets, for authentication I am using a MySqlMembershipProvider and MysqlRoleProvider, and I am also experimenting with the UrlRewriterNet.

I haven't deployed the UrlRewriting stuff yet because it required that I add a missing property to Mono's System.Web, and it's a bit of a deployment hassle. I think it's best to forget about url rewriting for awhile, since it's side effects will slow down development. Url rewriting is a feature I have been planning from the beginning though, I think one of the best things about wikipedia is that I can just type what I want right in the firefox address bar, and go where I expect. I plan on something like grurrah.com/grurrahs/Compost working in the future.

With the exception of the one little issue with UrlRewriterNet, I've been able to download, compile, develop and test on Windows and deploy straight to linux/mono without any problems. Normally I don't develop on windows, but for this project it just made sense to use the Visual Web Developer. Once things are a little further along and more of the development effort is focused on backend stuff, I hope I'll be able to go back to developing on Linux, since it's much more familiar to me.

I remember when I first started working on Mono, one of our main goals was to make development on Windows using third party libraries and deploying to Linux possible. Five years later, it's not only possible, it's easy.

Saturday, March 29, 2008

A very soft launch

My goal was to launch Grurrah.com and announce it's presence to the world during earth hour. It would have been a beautiful moment, sitting in the dark, conserving energy while uploading my website that will hopefully teach people how to conserve energy.

However, I ran into a bit of a speed bump with url redirecting. It was one of those deals where you spend hours trying to fix something, running into and fixing issue after issue until finally you hit a show stopper and realize that there is no way you can get around it.

Luckily, it's earth hour somewhere. In fact, I managed to launch during west coast earth hour, and all my lights were off.

So Grurrah.com is now up. I've decided to not announce it too heavily for a few more days, since there are still some issues to iron out and I am not sure how well my linode can handle the load. So no big press release, no blog entry on monologue, not even announcing the site on facebook yet. My soft launch consisted of one SMS conversation with my sister that went something like this:

jackson: are you near a computer?
lindsay: i am at dinner
jackson: checkout grurrah.com, it's a new website i just launched

Hopefully the server can withstand the load.

Wednesday, March 26, 2008

Hot? Or Not?



Tonight I wrote a little rating control using the gaia ImageButton. Pretty simple to do the client side stuff, for some reason it took me awhile to get the SQL right. My SQL definitely needs some serious optimization work but everything is working fine for now.

Sunday, March 23, 2008

Screenshots

The Main Page:


The Grurrah Page:

Trimming

Today I decided I just have to trim back some features if I want to move forward at all. I have had very little time to hack on Grurrah lately and the little time I have had, I feel like I have just been tinkering with my discussion control, trying to make it fit into the main Grurrah page. This is difficult for two reasons 1) The main page isn't even done and 2) I am a horrible designer.

So for now I have decided to drop my discussion control. It's too bad because it's my neatest control, but in the interest of getting the site up and running. I am going to go discussion-less for awhile, and have that be one of the first features added once the site is up.

I purchased my linode.com space today. Not sure how long it will take before I can access my node. I am hoping that it's 48 hours max. I really really really want to have _something_ posted by Wednesday morning.

Stay tuned, the home page is looking pretty nice and I will be posting a screenshot later today. HAH! Stay tuned, as if anyone is reading this blog but me.

Sunday, February 3, 2008

Some object model work


I got to spend some time tonight hacking on the Grurrah object model and database stuff. Kinda exciting to actually save and query for Grurrahs in the database finally. Grurrah descriptions are versioned (like wikipedia text) so that I can revert changes to the descriptions and have a general history of things. I think I came up with a nice simple table structure for doing this. I am not storing diffs, I figure this just adds more complexity than is needed right now. Each history entry will have it's complete text stored, kinda wasteful if only a few things change, but it's something that can easily be changed later.

Mini roadmap

I don't want to go too crazy with planning on Grurrah, but I think I am at the point where I need to lay down some milestones so I know what to focus on. So here we go:

Milestone One: A read only version of Grurrah. To be completed in this order:
  • Grurrahs page
    • Discussion
    • Description
    • Resources
  • Main page
    • Tag Cloud
    • Newest list
    • Popular list
  • User profile page
    • Grurrahs list
    • Created list
  • About page

Milestone Two: Deploy readonly site

Milestone Three: Add data entry

Milestone Four: Add search

Saturday, February 2, 2008

The discussion control

I had absolutely zero time to work on Grurrah during the week, but today I was pretty productive. I built a very Google Reader like control for Grurrah discussions. The control extends a Gaiaware Accordion control, basically removing the "close all other accordions when one accordion opens" functionality, so you can have more than one open entry at a time. The first five entries are opened when the control loads, and then five more collapsed entries are loaded.



I could use a better name for the discussion control. I am envisioning something in-between blogs and message boards. So you can post on your progress on a particular Grurrah or you can reply to people....I guess all blogs are like that, but I'm hesitant to use the term blog, since each Grurrah will have it's own discussion.

Hopefully tonight I can get a little more work done on the user interface side of things, leaving tomorrow for some desperately needed "backend" work.

Monday, January 28, 2008

Register Control

Well, I only had about 15 minutes to hack on grurrah tonight, but in that short amount of time I was able to add a very simple captcha control to the register control. I followed this simple tutorial to create my captcha control. This is a pretty easy captcha to break, but in the future I'll jazz it up a bit, it's just not worth the cycles right now.

So here you go, the register control in a window.



Not sure if I will have any time to hack on grurrah tomorrow, but my next task is to create a discussion control. On my drive home from hockey tonight I was thinking about this control and I think it will be pretty easy. It's basically just a data grid. I was thinking about using a tree, but nested discussions are always kinda difficult to read. Also I am envisioning grurrah discussions being more like mini blogs than a message board.

Sunday, January 27, 2008

The Sign In Control

dun dun duuuun!! My first Grurrah screen shot. This is my Sign In control in a Gaiaware AJAX window. I am very pleased with myself for actually creating user controls for this and not just hacking the controls all into one page.

All the controls are AJAX controls, so login can happen without refreshing the page.



How you like them apples?

(excuse the artifacts, those are from jpegedness)

Domain names purchased

I just purchased all the Grurrah domain names. I used network solutions for the .com and go-daddy for the others, seemed to be the most fiscally responsible way of doing things.

My hope is that next week I have enough work done to at least upload the site and maybe get some feedback from friends and family. My plan is to probably use a linode running Suse and Mono for the hosting. I haven't done any hosting setup yet though.

Day One (well actually two)

So yesterday was the first real day of development on Grurrah. For the last couple weeks I have been fiddling around with mysql and doing a little bit of class design, but yesterday I finally got to start writing some code.

Most of the day was spent getting used to the improvements in asp.net and web development in general. I haven't done any web development for about three years now. When I was working on asp.net in Mono, we were totally focused on 1.1. Master pages are pretty sweet, they are definitely going to help me out a lot. That's pretty much the only new feature I've run into though. I hope that I don't miss out on any 2.0 sweetness because of my ignorance.

The other new technology I have been getting used to is AJAX. Holy crap Gaiaware's AJAX controls are sweet! Totally simple to get up and running, and so far they haven't required that I know anything at all about AJAX. No javascript either!

I'm trying to use AJAX in as many places as possible right now. Partly because I want to learn how to use it and partly because I think it will make the site a lot nicer.

My main task for today is to create the login and signup stuff, and hopefully get some time to update my data models to reflect some ideas I've had this week. I'm doing my best to avoid feature creep but at the same time I want to allow some feature creep, since those are usually the nicest features. Maybe next week I'll come up with a concrete roadmap for the next couple months.