Picolang
A functional programming language for pico services
Disruptive Technology
Continious Delivery with Containerized Microservices
Evolution
- Monolithic - large, powerful, but indivisible.
- 2005: SOA
- Mini - I guess I missed this
- 2012: Microservices
- 2014: Nano - AWS Lamdas (Deploy in miliseconds + Live for seconds)
- 2015: Pico
You say tamato, I say
Advantages
- Loosely Coupled
- Formal Interfaces
- Bounded Context
- Polyglot
Loosely Coupled
- You only need to redeploy the service where the bug was fixed.
- Developers can work and ship in parallel.
- Conway's law:
- "organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations"
Everybody Loves Raymond
I would like to compile my code without my mom and dad holding my hand.
Distance to Parents
Formal Interfaces
Limiting code size with static interfaces makes code in dynamically typed languages maintainable
Static Types
Microservices are the best way to get your python, ruby and node programmers to start declaring static types.
Bounded Context
Zookeeper Global Variables and DI
OOP meets FP
Limiting Side Effects
Polyglot
- HTTP REST Services are the new C libraries
- Developers can work in any language
- World Peace
Concern:
Maintenance Overhead
- Versioned Dependancies (Thank you Docker)
- Deployment (Fig?, Fleet?, Salt?, etc)
- Choose the size of your service (You are on your own)
Programmer
- I want to write code
- dependancies are a means to an end.
- deployment ugh?!
Picolang
- Every function is a service
- Compiles down to Web services in Dockers
- Function pointers are URLs
import inc "github.com/awalterschulze/picolang/funcs.Inc"
let a = inc(2)
println(a)
package funcs
func Inc(i float64) float64 {
return i + 1
}
import map "github.com/awalterschulze/picolang/funcs.Map"
import inc "github.com/awalterschulze/picolang/funcs.Inc"
import add "github.com/awalterschulze/picolang/funcs.Add"
import reduce "github.com/awalterschulze/picolang/funcs.Reduce"
let b = map(inc, {1,2,3,4})
let c = reduce(add,0,b)
println(c)
Demo
Next Steps
- Compile down to Fig
- Curried functions
- Structural Typing (schema specifications)
- HTTP Caching for functions without side effects
Devops should write the compiler
Thank you
https://github.com/awalterschulze/picolang
Picolang
By Walter Schulze
Picolang
- 1,990