Thursday, April 3, 2014

Sonatribe Alpha

Alpha = release to friends and family!

Sonatribe has been a long time coming! We started the project as FestivalStar around 2009 in a kind of accidental, off the cuff development. Back then it was an iPhone app that supported multiple festivals which did quite well on the AppStore. Since then we've scrapped the iPhone app (for now) had a change of direction, a complete redesign and after about 4 iterations (and 5 years!) later we're about ready for an alpha release! Sonatribe is built by Chris, Stu and myself. We've been hacking away at this in our spare time so it's been a long and windy road.

The alpha that we're releasing is by no means the end product. We've got the project to a state where we have a small, manageable set of features we hope will be useful to festival goers. Sonatribe development is a constant ongoing thing and we'd like to generate a feedback loop from our users where by we shape the site and it's features based on this feedback loop. At the moment we have the skeleton to be able to provide you a small set of tools to socialize and plan your festival experience. By using the site we can get an idea of your likes in terms of music genres and can provide you recommendations for bands/DJs and events you might not have heard of before.

We've teamed up with clashfinder.com to provide lineup data (we have our own lineup designer in the backend too which we feed back to clashfinder). We've also integrated with Last.fm to provide artist information.

So what do you get? Like I said, it's early days but at the moment you can browse festivals, see the lineups for the festivals, create your own schedule, view act information (where they've played, where they're playing, bio, images etc), create a "campsite" and invite friends to it. When you have a campsite you get a private place to chat and a group schedule. You also get a (at the moment - very simple) profile page like any social network with private messaging.

We've built Sonatribe from scratch to be exactly what it is - a social network for festival lovers. We've not shoehorned any blogging platform to create it. We have complete flexibility in it's future direction and a metric ton of ideas for features and goodies. There's no advertising and we have no intention of splattering the site with any. We're not sure how the site will pay for itself as yet but we want to keep it as clean and user friendly as possible.

At this stage sonatribe.com is an alpha release and so you shouldn't expect it to be a complete and finished product. There will be some workflows that could be better, some of the site may seem a little slower than we'd like and somethings might just fail! There might be some features you'd like to see and some you'd like to tweak. All of your feedback is valuable and will help shape the project as it matures.

How to provide feedback: On the right hand side of the site there is a tab you can click to provide feedback. If you want to be notified of progress via email you can join the sonatribe-users email list: https://groups.google.com/forum/#!forum/sonatribe-users
How to access the site: You can get to the site at: [You'll be provided the super secret URL!] - you will need a Twitter, Google or Facebook account to login.

Rules of the road:
  • You can invite some friends, we'd like to get some real world usage. 
  • We might have to cap new members at some point while we work out the inevitable creases but for now we'd just like to get the site working through it's paces. 
  • If you're going to a festival that isn't listed just pop us an email, get in touch using the "Feedback and support" tab.
  • This is an alpha, things might go wrong for you, if anything dodgy happens please let us know and we'll be able to make the site more stable using your feedback.
And finally, we aren't affiliated with anyone, nor do we claim to. If you're a festival organizer we'd love to hear from you. Our intention is to provide a means for users to discover your events and help build your community. We're building tools to help you manage your events and interact with your community which we aim to provide for free.

Looking forward to receiving your feedback!

Wayne, Chris, Stu

Monday, October 28, 2013

Xamarin Android 3G helper

Managing 3G connectivity in Xamarin Android is a nause - you have to mess about with JNI and a host of other gruff. I've created this little helper to make it easy:


RavenDb tip – deploying unstable builds regularly [REPOST]

When significant updated builds to RavenDb are posted to the Hibernating Rhinos build page (which is fairly frequently – a good thing) it means I need to deploy the updated DLLs to the servers. We currenty manage 8 instances of RavenDb – 1 for each service that supports sonatribe. That can be an aruous task – especially as we host 4 isntances on 1 server and 4 on another.

I’ve been playing about with PowerShell recently and thought this would be a good opportunity to get my teeth into it. I was initially trying to get the WebDeploy stuff to work scripted but that was a massive nause.

I ended up just going with a script i can run on each server. Here are the steps I needed to accomplish:

stop iis
remove the old files from the db folder including the bin and all it’s contents but excluding the Data directory and the web.config and log4net.config files
copy the contents of the deplyment folder (which i set up to include the plugins needed) to the database directory
restart iis
Simples.

Here’s the script:



Nice and simple. Just create an array of strings containing the paths to the folders where ravendb is hosted. Loop through them deleting and copying. Restart IIS.

This saves me about an hour a week and also guarantees that I don’t accidentally miss something. It’s a shame the web-deploy stuff in msdeploy didn’t work – we host the databases in IIS so it would have been a suitable solution and would have meant i could deploy from my dev machine without even needing to log onto the server. I expect I’ll try and tackle that at some other point.

w://

Taking a stab at generating strongly typed Facebook Graph C# classes for .Net/Asp.Net (My attempt) [REPOST]

The facebook API is flakey to work with at the best of times. However as Deap mentioned on his blog post: facebook documentation requires login (showstopper) it’s gotten even worse if you want to automate the process by scraping the docs. I’ve managed to take a stab at this using a different method to retrieve the docs – this method allows us to 1st login to the FB docs and then scrape away – building up the strongly typed objects on the way. Here’s my branch: FacebookSdk-contrib on github. This is using HtmlUnit – a Java project – so we’re also using a wrapper to use it under the IKVM runtime. It’s nearly there. Just some final bits to iron out. w:/

Replication predicates in RavenDb [REPOST]

Replication in RavenDb is pretty fekin sweet. I helped Oren by submitting bugs and testing it out in sonatribe dev by pushing it in a real world usage scenario. One of the features I asked about was the ability to filter out parts of the namespace for replication – instead of the ‘all or nothing’ approach used by default. Oren (as you’d expect) simply replied with a request for a patch. So here is my patch.


My fork is here: https://github.com/wayne-o/ravendb
Basically – my aim is to allow the developer to set replication filters – so only a part of a namespace is replicated – rather than the whole db. To do this I’ve added a ReplicationPredicate class in the Raven.Bundles.Replication.Data namespace. this is used when initialising the db:

it’s a work in progress but i’m finding it hard to get the time to commit to it due to the new baby. if anyone fancies lending a hand – there’s a test in the SimpleReplication.cs file Can_filter_replication_using_replication_predicates
w://

Asp.Net Mvc action selector – with list support [REPOST]

Here is my updated AcceptParameterAttribute class with support for data bound lists:

some sample code to use this updated version:

decorate the action with something like:

and then the buttons in the list can have the following format for the name:

hth

Thursday, October 24, 2013

Installing Solr in Apache on Windows

I've been messing about with Solr a lot recently and although the finished setup is great at what it does, getting it setup in the first place is a complete nause - especially on Windows. Anything to do with Java is going to be an XML configuration nightmare so to help myself in the future and whoever else stumbles into the same issues I had, I'll document the process here.

First up you want to ensure you have the latest install of the Java SDK installed. Grab that from Oracle and do a standard install. http://www.oracle.com/technetwork/java/javase/downloads/index.html

Next up you want to get Apache installed as a Windows Service. I installed the latest to date (Tomcat 8.0.0-RC5 (alpha)) - grab that from here: http://tomcat.apache.org/download-80.cgi and follow the instructions.

I'm not going to go into the details of installing the packages above as they are standard installations and you should accept the defaults in most cases.

Now that we have Tomcat installed and running we can use it as the container to host the Solr instance. Grab the latest build of Solr from their website (http://lucene.apache.org/solr/).  This is where the install gets a little interesting. Getting Solr running for your requirements will mean altering a lot of config XML files. It's obviously very handy to have those XML files under source control so keeping the config files inside the default locations withing Solr is not going to work. In this setup we'll want to point Solr to a home directory other than the default so we can keep the config files under Gits control.

Once Solr has downloaded unzip it and grab Solr***.war (where *** is the version number) file from the solr-4.5.0\solr-4.5.0\dist folder and place it inside the lib (C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib) folder in Apache - rename it so that it is called Solr.war. Now grab all of the jar files from solr-4.5.0\solr-4.5.0\dist\solrj-lib and solr-4.5.0\solr-4.5.0\dist folders and place them inside the same lib folder in Apache. It might not be necessary to install all of the jar files but incrementally adding them by deciphering Solrs exceptions takes an age and I doubt it has any negative impact.

As I mentioned before, we want to store the config outside of the normal Solr installation so that it can live in the main repo folder along with whatever other supporting code you may have. To do this we need to tell Apache where to find our Solr home. To do this we need to place some XML inside Apache's conf directory (mine is at C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost). Here is an example which points Solr to c:\solr



Now restart the Apache service. If everything has gone well, navigating to http://localhost:8080 should bring up the Apache homepage. Navigating to http://localhost:6161/solr/ will bring up  an error complaining about collection1 not being available. This is to be expected as we haven't given the core config yet.

At this point, if you're seeing other isuses you're going to need to start using the logs directory in Apache to debug whatever issues you may have. If you have reached the same point as me then you can carry on the installation as follows.

Inside the Solr download folder there is an example installation. Grab the solr folder from inside the examples: (\solr-4.5.0\solr-4.5.0\example\) and copy all of the files to c:\solr - or where ever you have decided your config home directory is. You'll need to open solr.xml and replace the contents with this:


Rename the collection1 folder to test-solr as that is what is specified in the solr.xml. Restart Apache and reload http://loalhost:8080/solr. You should now see Solr's homepage (all be it with a warning like: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate)!!

SearchComponent is a contrib to the Solr project. For this example I have no need to go into getting that working so I'll just remove it form the config. Edit the solrconfig.xml file to look like this: https://gist.github.com/wayne-o/7140242 (linked not previewed as it's huge).

Now restart Apache and refresh the solr homepage. You should now be able to select the new test-solr core in the UI!

As a final note - Unless you want to keep the solr index (you don't) I would add the data folder to the gitignore file - or svn ignore it - whatever SCC you use.