View Single Post
  #28   Spotlight this post!  
Unread 10-09-2014, 15:01
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is offline
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: Team 254 Presents: Cheesy Arena

Quote:
Originally Posted by Andrew Schreiber View Post
Pat, how'd you like implementing a real web service in Go? Any things you found worked well and things that didn't?
It was an amazing experience. Go is very well suited to this sort of thing -- HTTP handling is built in and easy, network communication is a breeze, and performance is awesome (Cheesy Arena uses only 1-2% of the CPU even when running a match). Built-in unit testing and single-binary deployment are also huge plusses.

This was the first project I've used Go for so I struggled a lot with the non-object-orientedness and how to organize the code and minimize repetition. The final result isn't ideal and I need to keep working on it -- all the code is in the same "main" package, there's a lot of shared global variables, and the WebSocket handlers are more repetitive than I'd like.

Overall, though, I'd highly recommend Go for any web service work.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com
Reply With Quote