Sinatra with WebSockets

WebSockets are a hot topic now a days with the HTML5 push, even though they are not officially part of HTML5 spec. If WebSockets are new to you, they are a way of being able to keep a connection open from the client’s browser to the server. It will let you push data back and forth, think AJAX but without the need of pulling for new data over and over. WebSockets give you the ability to push, which gives you a very close to real time update on the client’s side.
Read more →

Using Redis to sort World of Warcraft’s Auction House data

If you have read some of my other postings you know by now that I enjoy using the data from World of Warcraft in my projects. In my mind it’s a good amount of data that I can easily understand having played World of Warcraft for many years now. If you look at the Blizzard Community Platform API Documentation you will see that there is an Auction Resource that will return a link to a JSON file you can download that will show you all the auctions for a given server.
Read more →

No Fluff Just Stuff - Boston 2012

Last week was a busy week for me, I’m just getting time right now to sit down and write about my take a ways from No Fluff Just Stuff. For the people that are not familiar with No Fluff Just Stuff it’s a conference based around Java technologies. It takes place allover and happens on the weekend which makes it an easier sell to your managers or higher ups. I’ve been lucky enough to have gone to 3 of them and I always learn about great new things.
Read more →

MongoMapper with Sinatra Example

If you have worked with Ruby on Rails Activerecord before you know how it makes working with databases very easy by giving you objects to deal with communication with the database. MongoMapper is an Object-Document-Mapper (ODM), it takes a lot of ideas from Activerecord and in turn should be very familiar. I found MongoMapper a good fit for people that want to use Sinatra ,because you are able to simply make your model classes right within the application file.
Read more →

Loggly Archives into MongoDB

Loggly is a great cloud service for managing log files from servers or many servers. It’s also an add-on for your Heroku hosted app. Loggly comes in different tiers from a free to monthly service based on how much data you store on Loggly servers. Being cheap, I have picked the free tier for amscotti.com as it’s not a mission critical app and I don’t have tons of logs. One of the coolest things I like about Loggly is they do ‘Log Archiving’ on Amazon’s S3 for you.
Read more →

MongoDB, added Ruby in to the mix

To keep with the previous posting I made with MongoDB, I am going to show some Ruby code of how to connect and push data in to your database. If you take a look at the MongoDB driver page you see that there are a good number of programming languages that are supported by MongoDB.org along with tons that are supported by the community. My languages of choice is Ruby. It’s a Supported language from MongoDB.
Read more →

Getting started with MongoDB

I’m a big fan of CouchDB. I enjoy how they go about doing things and how you are able to use it without the need of drivers as its all RESTful based. As long as your language of choice has the ability to make RESTful calls and read JSON data then you’re all set. But before I really started to use CouchDB I did start looking at MongoDB, another Document data store.
Read more →

My experience with Heroku

I haven’t done too much publishing of web applications for my own stuff. At work we have an Ops team that deals with setup and deployment of our code. I have used Rackspace cloud and AWS for setting up servers before but mostly just for testing and nothing for production. As a developer I want to focus on the code and not fine tune an application server. I want to be able to write code, push it out and scale without putting much thought in to it.
Read more →

LinkedIn authentication with Sinatra

To take the authentication with Sinatra a bit farther you may want to use another service to do your authentication against. This is some sample code adapted from a Rails example. This code takes use of the linkedin gem from Wynn Netherland to do the authentication and also make some calls to the LinkedIn API. There are other gems that just do authentication for many services like Facebook and Twitter but for this sample I wanted to be able to make additional calls to the LinkedIn API.
Read more →

Authentication with Sinatra

One of the things I’m heavily looking in to is Sinatra, it’s a micro-web framework which I feel gives you more freedom over your project and lets you rapidly prototype things out. You are able to keep a full app in one file which is perfect for use with Github’s Gist. Sinatra lets you quickly build web apps in a short amount of time with less complexity then a Rails app.
Read more →