
Show HN: Coherence API – Modern Serverless Code. Pass a func and it runs online - bthornbury
https://www.coherenceapi.com
======
weego
The entirety of the docs talk about how easy it is to set up a job, run job,
have a recurring job and then pricing is in compute Gb hours. I've literally
no idea how those two things relate to each other in real world use. Its a bit
of a cognitive disconnect that I'm sure makes a lot of sense having built it
but not to me as a possibly interested developer.

Some examples of how many job iterations would use 1 Gb hour would help, or
maybe I'm missing them?

~~~
bthornbury
This is great feedback, and initially I had a calculator for this. We removed
it because we felt it would be intuitive but you're right we built it and it's
easy to lose that outside perspective.

It's really just the running time of your program (you control this) plus a
less than a second of setup / tear down time. If your job is set to consume
1GB that's it, you've consumed that many GB-seconds. If it's a 128MB job, then
you've only consumed 1/8th of that many GB-seconds.

Let me know if this example is getting it across, it's a simplified version of
the pricing of other serverless platforms.

~~~
slig
Any plans to have pre-paid credits?

~~~
bthornbury
Hey, we could do this but I'm curious why you would prefer this? More solid
payment expectations?

~~~
xkcd-sucks
For me to evaluate something, the amount I'll be billed _must_ have an upper
bound that I control. So yes, more solid payment expectations.

~~~
tedmiston
Same ^

I really need to guarantee controlling unbounded costs. I would think most
people have similar expectations.

------
bthornbury
Hey HN, I've been eager to share this with you. I've finally released and I
think this is going to be very useful for a lot of devs who are like me.

Coherence API is a twist on serverless that lets you deploy and run code the
same way you call a local function. It integrates with the programming
language so you can just pass a func and it's getting run. No need to change
your workflow or toolset.

I'll be here to answer any questions.

~~~
politician
If I build 92 of these things and they communicate with each other over
sockets, files, streams, or messages, how does Coherence (a) help me visualize
and debug that network, (b) transition the processing graph to a new state
safely (blue/green deployments to one or more collaborating components)?

The problem that I have with these Serverless stacks is that they all demo
pretty well for the trivial case of "it sends emails / transcodes video / puts
files in S3" but then jump to "run your entire business on this" without
clearly showing how its possible to do that with a complex system.

Is your solution different?

~~~
bthornbury
Hey, help me understand how you envision Coherence could help you debug that
network.

I'm moving over some of my own services to Coherence so it's very much
intended to "run your whole business".

~~~
politician
There is so much more to running a cloud system than running a function -
monitoring the function (billing, errors, throughput, latency), scaling the
function, moving data between two functions, storing data, signaling a
function, upgrading a function, downgrading a function, upgrading the stored
data, authorizing the function to run, upgrading and downgrading stored data
and functions while taking customer traffic with zero downtime without data
loss.

"Backend-as-a-service" businesses need to check all of those boxes.

~~~
bthornbury
I'm going to decompress part of your comment here:

\- scaling the function

This is where we've invested most of our effort. We're envisioning a load test
demo soon.

\- monitoring the function (billing, errors, throughput, latency)

This is something which we will need to invest more in. Great feedback here.
We don't have much in the way of monitoring yet, but everything is there and
we just need to expose it to the users.

\- moving data between two functions, storing data

Traditional solutions like Redis and Postgres seem like a good solution here.
You can't host them on Coherence yet, but it's something that we're working
on.

\- signaling a function, upgrading a function, downgrading a function

Versioning is particularly interesting here. A lot of time we've thought of
these functions as ephemeral.

Send me an email (bryan at coherenceapi . com) I'm really interested to talk
more about the use cases you're envisioning.

------
avip
I've made this comment before (and was subject to public ridicule and mass
downvoting for it) - I'm reluctant to try new products and services if it
requires me to enter CC details. This is not a rant, I know you have a
business to run and it'd better sustain itself. I really want to try this
service, yet I won't.

And, btw, I don't even own a CC.

~~~
bthornbury
I'm aware this is going to turn a significant number of people away.

The fact is in the early stage, this will help restrict fraud and bring in
more engaged customers to ensure their expectations are met.

It's not something we plan to require forever.

~~~
avip
Sure, the reasoning is clear, we're in a "fraud first" world. Still yet, if
there was some sandboxed setup I could use, I'd happily do that. And if it
works, I'd happily hand in (my employer's...) billing info thereafter.

~~~
bthornbury
Can you describe what are the limitations you might be willing to live with on
a frictionless sign up?

For example, if you only had 2 compute hours, would it be enough for your
evaluation?

~~~
avip
Absolutely! 1 hour would suffice, and any computing/IO resources could be
limited to a near zero.

~~~
bthornbury
This is common feedback I'm getting for those interested in hobbyist tier.

I'm thinking we'll put something in place for free frictionless small
evaluation after we think about fraud management a little bit.

Thanks for the feedback here everyone this is really invaluable!

------
justboxing
Congrats on shipping!

I see that you worked on .Net at Microsoft, + supported languages at present
are Python 2,3 and .Net Core.

So.... How different is this from Azure Functions?
[https://azure.microsoft.com/en-
us/services/functions/](https://azure.microsoft.com/en-us/services/functions/)

Cos I can create a Serverless API using Azure functions also, right?
[https://docs.microsoft.com/en-us/azure/azure-
functions/funct...](https://docs.microsoft.com/en-us/azure/azure-
functions/functions-create-serverless-api)

~~~
bthornbury
Hey Thanks!

This is the most common question! Other FaaS solutions require your code or
your workflow to be structured in some way to fit in with their system, not to
mention requiring you to use their tools.

Coherence integrates with the programming language to make it a lot simpler on
the developer. Just pass a func and it's getting run. Structure your code
however you like and use your favorite tools!

EDIT: One example, it's going to be a lot easier to run your web crawlers on
Coherence.

EDIT 2: Yes I worked on .NET Core and am a python enthusiast for over 9 years.
This is why they are the first supported languages.

------
lux
Congrats on the launch!

I'm curious what your cold-start times are like (knowing that build sizes and
languages affect that too). Also, any plans to support Go?

~~~
bthornbury
Thanks!

Our cold-start times have a way to go, they're around 1 minute on the first
invocation of some set of binaries and less than 20 seconds on subsequent
invocations.

We've done a lot more work on optimizing the subsequent invocations time,
including even running a forked version of docker (it reduces docker save time
by 100x or more)

This is a primary scenario for us though and there's a lot of room for further
optimization. We'll be posting figures and progress regularly post-launch.

EDIT:

I missed some of your questions, we need to upload your project's binaries
only (not package manager binaries). So languages with larger binary sizes
will have longer cold start times. Overall this comes down to the factoring of
the project though.

We should be able to support Go since the binary is static linked, but it has
less portability than other managed languages so we've targetted those first
as lower hanging fruit.

~~~
lux
Awesome, thanks for the detailed reply!

------
buraksarica
Once there was picloud doing the exact thing just for python. I'd always
dreamed of a .net port. Well done!

