Features
We've packed Unison Cloud full of goodies.
Deploy web services in seconds
Describe HTTP and WebSocket deployments with a single function call. No building containers, managing VMs, or other cloud infra management. Spend your time writing service logic, not fixing YAML.
helloWorld.logic : HttpRequest ->{Exception, Log} HttpResponse
helloWorld.logic = Route.run do
name = route GET Parser.text
info "request for greeting" [("name", name)]
ok.text ("π hello " ++ name ++ "\n")
helloWorld.deploy : '{IO, Exception} ()
helloWorld.deploy = Cloud.main do
name = ServiceName.named "hello-world"
serviceHash = deployHttp !Environment.default helloWorld.logic
ServiceName.assign name serviceHash
Microservices, without the overhead
Make inter-service calls with a single line of code, without serialization or networking boilerplate. Get the benefits of a microservice architecture without the headache.
Reduce deployment risks with programmatic rollbacks
All service deployments are immutable and get a unique content-addressed hash. Named services have a stable URL and can point to any service version. Easily promote a deployment to production or rollback to an earlier version.
Typed and transactional data storage
Getting data into and and out of storage is usually a tedious layer of boilerplate in your application. With Unison Cloud, any value may be saved in our transactional storage layer. Your access to storage is statically typed and checked by Unison's typechecker.
counter : Database -> Table Text Nat -> HttpRequest -> HttpResponse
counter db userCounts = Route.run do
(user, amount) = route.pair POST (s "increment" / text / nat)
count = Storage.modifyGet db userCounts user 0 (x -> x + amount)
ok.text (Nat.toText count ++ "\\n")
counter.deploy : '{IO, Exception} ()
counter.deploy = Cloud.main do
db = Database.named "counter-service-db"
env = Environment.named "counter-env"
Database.assign db env
h = deployHttp env (counter db (Table "counts"))
ServiceName.assign (ServiceName.named "counter") h
Programmatic log management
Logs produced by your services or batch jobs are consolidated and easily viewable in the Unison Cloud UI. You can also stream or filter your logs with the full power of a programming language.
Batch compute jobs
Run your ETLs, data aggregations, or other batch jobs on elastic cloud resources.
Secrets and config management
Upload secrets and config to our securely encrypted vault; access them easily from your services.
Painless promotion from dev to prod
Just swap a single function call and your service is running in the cloud
instead of locally. We made Unison Cloud as easy to run on localhost
as
it is to run in production.