TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Differential: Type safe RPC that feels like local functions

77 pointsby interpol_pabout 1 year ago

21 comments

valenterryabout 1 year ago
Remote procedure calls (or whatever it is called) simply can never really feel like local functions. It has been tried again and again for decades.<p>Maybe call it &quot;removes as much friction as possible compared to local functions&quot; but please don&#x27;t call it &quot;feels [exactly] like local functions&quot;. It&#x27;s simply impossible and pretending so will just cause trouble.
评论 #39652030 未加载
评论 #39652591 未加载
评论 #39651510 未加载
评论 #39655918 未加载
评论 #39651243 未加载
评论 #39652162 未加载
评论 #39651630 未加载
评论 #39652532 未加载
评论 #39651531 未加载
eqvinoxabout 1 year ago
&quot;Predictive Retries: With the help of AI Differential detects transient errors (database deadlocks) and retries the operation before the client even notices. See Predictive Retries for more.&quot; [<a href="https:&#x2F;&#x2F;docs.differential.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.differential.dev&#x2F;</a>]<p>&quot;If it&#x27;s predicted to be transient, Differential will retry the operation on a healthy worker before the client even notices.&quot; [<a href="https:&#x2F;&#x2F;docs.differential.dev&#x2F;advanced&#x2F;predictive-retries&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.differential.dev&#x2F;advanced&#x2F;predictive-retries&#x2F;</a>]<p>I… er… wat? Does that mean this behavior is nondeterministic, driven by what some extra component cooks¹ up on a per-call basis?<p>…<p>Doing this without developer input is such a horribly bad idea, and then debug it when something (not even in the RPC layer) goes wrong?<p>[Edit:] &quot;You can turn this feature on for your cluster using the Console. It&#x27;s off by default.&quot; – a breath of relief.<p>--<p>¹ I really had to resist the temptation to say &quot;hallucinates&quot; there.
评论 #39652771 未加载
评论 #39651312 未加载
pjmlpabout 1 year ago
Usually type safety isn&#x27;t the issue, rather pretending the network doesn&#x27;t exist.<p>RPC, even if running on the same machine, is distributed systems land.
JonChesterfieldabout 1 year ago
This might be an interesting project. &quot;Type safe RPC&quot; is not a great description to lead with as remote procedure calls have a large amount of negative associations that have little to nothing to do with static type systems.<p>I <i>think</i> it&#x27;s a distributed language runtime where you write functions in typescript and the runtime deals with passing data between machines.<p>The website is quite good at presenting the system as a nice thing that does nice things and you should like it and it&#x27;s all very nice. It does a very poor job of convincing me that it works properly. I&#x27;d want to know how the scheduler works and how it handles mutable state in the presence of network partitions.<p>Also just found a caveat which amounts to they&#x27;ve got the implementation wrong:<p>&gt; Arguments must be JSON serializable. This means that you can pass strings, numbers, booleans, arrays, objects, and null. You cannot pass functions, promises, or other non-serializable objects
评论 #39652788 未加载
评论 #39650566 未加载
kgeistabout 1 year ago
The site lists all those features but it&#x27;s not clear what problem it&#x27;s trying to solve. Only in the FAQ at the end of the page it&#x27;s said it&#x27;s a service mesh basically with added bells &amp; whistles, from what I understand.<p>But I&#x27;m still confused:<p>&gt;Monolithic codebases don&#x27;t have to result in monolithic services.<p>Why would I want to replace straighforward function calls with network calls in my monolith?<p>&gt;By using a centralised control-plane, Differential transparently handles network faults and machine restarts with retries, all without changing your existing programming paradigm. It is designed to be a drop-in replacement for any function call that you&#x27;d like to make distributed and reliable.<p>&quot;Centralization&quot; and &quot;reliability&quot; don&#x27;t sound like words that often come together. What if the control plane goes down? Unless they have a cluster? It&#x27;s all self-imposed problems anyway: if we don&#x27;t have network calls in the monolith, we don&#x27;t have all those problems in the first place (which need to be solved with retries etc.)
评论 #39652905 未加载
CipherThrowawayabout 1 year ago
How does the idempotency work? I don&#x27;t understand how functions can be made idempotent without changing or instrumenting their implementation for end-to-end idempotency.
评论 #39649614 未加载
评论 #39649821 未加载
评论 #39653548 未加载
eqvinoxabout 1 year ago
If it &quot;feels like local functions&quot;, how do you handle errors from the RPC layer &#x2F; network?
评论 #39650396 未加载
评论 #39650477 未加载
nextaccounticabout 1 year ago
Is this just like trpc? <a href="https:&#x2F;&#x2F;trpc.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;trpc.io&#x2F;</a><p>Or like rspc (in Rust) <a href="https:&#x2F;&#x2F;www.rspc.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.rspc.dev&#x2F;</a>
评论 #39653043 未加载
评论 #39650164 未加载
评论 #39650155 未加载
EdSchoutenabout 1 year ago
The downside of an approach like this is that it limits you to a single programming language on both the frontend and backend. This is exactly the reason RPC frameworks like gRPC use an IDL.
评论 #39657297 未加载
评论 #39651756 未加载
emilehereabout 1 year ago
I&#x27;m curious if people&#x27;s qualms around abstracting the cloud&#x2F;network also apply to the <a href="https:&#x2F;&#x2F;modal.com" rel="nofollow">https:&#x2F;&#x2F;modal.com</a> product. Differential seems like a similar project at its core, just focused on the Typescript + microservices ecosystem.
rco8786about 1 year ago
It&#x27;s an interesting&#x2F;useful concept and most big tech co&#x27;s I&#x27;ve worked at have some form of this internally.<p>But I think it&#x27;s a little dangerous to market this as &quot;feels like local functions&quot;. It glosses over a lot of really important technical considerations (like, the network and all the dragons that come with it) which will eventually bite people who <i>don&#x27;t</i> understand that, and will immediately turn people off who <i>do</i> understand that.<p>I&#x27;m not a marketing or copy expert by any means, but what might be a neat product is (rightfully) getting criticized in the comments here for the positioning.
评论 #39653203 未加载
moltarabout 1 year ago
How would this work in a serverless scenario where handler side runs in a Lambda for example?<p>It seems a bit of a chicken and egg in this case.<p>A service needs to register itself with a control plane. But for the service to start it needs to get a request (via lambda invocation).
评论 #39653150 未加载
lunarcaveabout 1 year ago
One of the authors here.<p>Ok, this blew up, and I appreciate the engagement. We will attempt to get to all the questions.<p>We are still polishing the initial offering, so if the documentation seems lacking, it&#x27;s because it very much is so. Honestly, we did not anticipate having this many eyes on the project this early.
jahewsonabout 1 year ago
Ok… but how does it work? Too much magic.
评论 #39653214 未加载
评论 #39649867 未加载
bugbuddyabout 1 year ago
The key word here is “feels.” I would not trust feelings when it comes to software systems’ reliability.
评论 #39655467 未加载
mblodeabout 1 year ago
Huge congratulations on the launch!
评论 #39653627 未加载
novoreorxabout 1 year ago
Is it suitable to use in the browser-server architecture? I think the documentation lacks scenarios or use cases, which should also be included on the home page.
评论 #39652943 未加载
ushakovabout 1 year ago
How is this a company?
评论 #39653170 未加载
评论 #39652530 未加载
syngrog66about 1 year ago
The feature pitch is one long case of loltears. I needed the chuckle<p>&quot;Kids , get off my lawn.&quot;
syngrog66about 1 year ago
<i>phone rings</i><p>&quot;Sir, its The Fallacies of Distributed Computing for you, on line 1!&quot;
评论 #39657323 未加载
danlugo92about 1 year ago
REST is enough
评论 #39653640 未加载