Date post: | 02-Jul-2015 |
Category: |
Software |
Upload: | dmytro-ovcharenko |
View: | 464 times |
Download: | 0 times |
Go Revel Gooo..
dovchar 2014
✦ 8 years in IT
✦ 4 years in SoftServe
✦ 1.6 years Application Architect
✦Main language: Javascript
✦ Hobby language: Go
✦ Pacemaker conference
✦ Script’n’Code meet-up
✦Open source (typescript grails, clio
go, sonar qunit, kojak, jspro)
do
vch
ar itw
ee
ke
nd
20
14
About
me
✦ I love my project :)
✦ Technology stack / toolset
✦ Cloud Infrastructure
✦Monitoring
✦ Choose another lang/framework
✦GO lang
✦ Performance/Memory/Concurrency
✦ Revel
✦Questions
do
vch
ar itw
ee
ke
nd
20
14
Agenda
✦Medical Start-up
✦ Connects Patients and Providers
✦ 5 people
✦ 9 months development (super part time :)
✦ Budget: 235$
✦ SaaS
✦ Public cloud
✦ Single page application (SPA)
do
vch
ar itw
ee
ke
nd
20
14
About
Pro
ject
do
vch
ar itw
ee
ke
nd
20
14
Tech S
tack
do
vch
ar itw
ee
ke
nd
20
14
Clo
ud
do
vch
ar itw
ee
ke
nd
20
14
Monitoring
do
vch
ar itw
ee
ke
nd
20
14
Node.js you were my favorite toy…
do
vch
ar itw
ee
ke
nd
20
14
Bra
insto
rmin
g
Go lang
do
vch
ar itw
ee
ke
nd
20
14
«Go, also commonly referred to as golang, is a programming language initially
developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
It is a statically-typed language with syntax loosely derived from that of C, adding
garbage collection, type safety, some dynamic-typing capabilities, additional built-
in types such as variable-length arrays and key-value maps, and a large standard
library.»
Wikipedia
do
vch
ar itw
ee
ke
nd
20
14
Perf
orm
ance
You can find benchmarks comparing Go to a bunch
of other languages at the Computer Language
Benchmarks Game site
do
vch
ar itw
ee
ke
nd
20
14
Mem
ory
Go doesn't have a virtual machine
or interpreter to load up, so it
starts fast and small. Right now,
our production servers are running
at ~400 MB. A few months in,
we've never had a memory leak or
problems related to memory.
do
vch
ar itw
ee
ke
nd
20
14
Concurrency is a huge part of Go with some high
level constructs that make it a breeze to use. Go has
goroutines for concurrent operations and channels
for communicating between them.
Concurr
ency
do
vch
ar itw
ee
ke
nd
20
14
Reliability in a language is kind of hard to quantify.
We had a problem only with go-socket.io package.
Relia
bili
ty
do
vch
ar itw
ee
ke
nd
20
14
Go compiles into a
single, static binary
file so deployment is
simply putting the file
on a server and
starting it up. No
dependencies
required. No runtime
required (you don't
need to install Go on
the server). And it's
small.
Deplo
ym
ent
do
vch
ar itw
ee
ke
nd
20
14
Tech S
tack
Revel
do
vch
ar itw
ee
ke
nd
20
14
Revel enables you to get going really quickly, it has nice
defaults put in place that enable rapid development, and
high productivity; as advertised on the project page. Is
known for its flexibility in live environment, like code
reloading and such.
What is Revel?
Featu
res
do
vch
ar itw
ee
ke
nd
20
14
✦ Hot Code Reload: Edit, save, and refresh. Revel compiles your code and templates for you, so you don't miss a beat.
✦ Comprehensive: Revel provides routing, parameter parsing, validation, session/flash, templating, caching, job running, a testing framework, and even internationalization.
✦ High Performance: Revel builds on top of the Go HTTP server, which was recently benchmarked to serve three to ten times as many requests as Rails across a variety of loads.
✦ Synchronous: The Go HTTP server runs each request in its own goroutine. Write simple callback-free code without guilt.
✦ Stateless: Revel provides primitives that keep the web tier stateless for predictable scaling. For example, session data is stored in the user cookie, and the cache is backed by a memcached cluster.
✦ Modular: Revel is built around composable middleware called filters, which implement nearly all request-processing functionality. Developers have the freedom to replace the default filters with custom implementations (e.g. a custom router).
do
vch
ar itw
ee
ke
nd
20
14
Get S
tart
ed
install go
set up your GOPATH and GOROOT
install git and hg
get Revel
Build the Revel command line tool
do
vch
ar itw
ee
ke
nd
20
14
Get S
tart
ed
do
vch
ar itw
ee
ke
nd
20
14
Get S
tart
ed
do
vch
ar itw
ee
ke
nd
20
14
Get S
tart
ed
do
vch
ar itw
ee
ke
nd
20
14
Get S
tart
ed
do
vch
ar itw
ee
ke
nd
20
14
Ne
w S
tart
ed
do
vch
ar itw
ee
ke
nd
20
14
Ne
w S
tart
ed
do
vch
ar itw
ee
ke
nd
20
14
Ro
ute
r
do
vch
ar itw
ee
ke
nd
20
14
Co
ntr
olle
r
do
vch
ar itw
ee
ke
nd
20
14
Se
rvic
e
do
vch
ar itw
ee
ke
nd
20
14
Mo
de
l
do
vch
ar itw
ee
ke
nd
20
14
Init
do
vch
ar itw
ee
ke
nd
20
14
So
cke
t.io
do
vch
ar itw
ee
ke
nd
20
14
Ha
nd
ler
Conclu
sio
n
do
vch
ar itw
ee
ke
nd
20
14
Lin
ks
do
vch
ar itw
ee
ke
nd
20
14
✦ node.js
✦ sonarqube
✦ grunt, bower, yeoman, gulp
✦ pacemaker, script’n’code
✦ sails.js, revel
✦mongo, mgo
✦ newrelic, digitalocean, aws
Facebook Twitter Linkedin Gmail
Questions?
do
vch
ar itw
ee
ke
nd
20
14