Proc is an all-in-one toolchain for building, deploying, and calling custom behavior from any website or app. We'd like to take a couple minutes to summarize the months of thinking that went into designing Proc, but here's the bottom line:
- We want you to ship interesting things to the web faster than you can today.
- Proc gives you superpowers to do just that.
How Proc Works
Proc lets you build custom behavior in the language of your choice and run it in our serverless platform. Behavior is built by composing endpoints from the Proc Standard Library into compositions. When called, the composition is evaluated within the Proc Platform and resolved to a final result.
Compositions are written locally, but evaluated remotely within the Proc Platform. Unlike writing code for other platforms, building compositions feels more like stacking building blocks than it does writing code.
Here's a simple composition that increments a number:
Setup
require "proc"
client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
authorization=PROCAUTH
client.math.add(value: 1).call(41)
client.math.add(undefined, {value: 1}).call(41);
curl "https://proc.run/math/add?value=1" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/json" \
--data "41"
42
When called with a value of 41
, the composition is evaluated within the Proc Platform and resolves to the expected
result of 42
. All of this happens transparently in a single request.
Compositions can be deployed to a custom, fully-managed endpoint in milliseconds:
Setup
require "proc"
client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
authorization=PROCAUTH
client.proc.create(name: "adder") {
client.math.add(value: 1)
}.call
client.proc.create(undefined, {name: "adder"}, () => {
return client.math.add(undefined, {value: 1});
}).call();
curl "https://proc.run/proc/create?name=adder" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/vnd.proc+json" \
--header "accept: text/plain" \
--data '[["$$", "proc", ["{}", ["()", "math.add", ["$$", "value", ["%%", 1]]]]]]'
true
Deployed compositions are immediately callable from through the lib
package:
Setup
require "proc"
client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
authorization=PROCAUTH
client.lib.adder.call(42)
client.lib.adder.call(42);
curl "https://proc.run/lib/adder" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/json" \
--data "41"
42
Custom endpoints are deployed in less than 15 milliseconds on average. This brings full portability to your custom behavior—you can deploy behavior from your backend stack and immediately put it to use in a JavaScript component running in a browser.
Why Proc?
We set out to create a simpler alternative to existing serverless platforms like AWS Lambda, Google Cloud Functions, and Azure Functions. While the fundamentals behind serverless show great promise, every serverless provider has the same flaw: their platforms are built for use-cases that don't really benefit from a serverless approach.
Amazon wants you to run your entire app in Lambda. The development story behind Lambda is designed around this goal, making it too complicated for the small teams and indie developers that have the most to gain.
Proc is designed to integrate into your current stack. It isn't the place to deploy your entire app, but it's the perfect place to run one-off scripts or custom behaviors that don't quite fit in your current stack. Reach for Proc when you need to ship something fast and trust that it'll just work.
What's Next?
The Proc Platform will continue to grow and expand over the coming weeks and months. In the meantime, here's a few links to get you started using Proc today: