No video

Give your Go app superpowers with an Embedded NATS Server

  Рет қаралды 4,159

Synadia

Synadia

Күн бұрын

One powerful, but lesser known feature of the NATS server is that, if you are using the Go programming language, you can embed the NATS server directly into your application.
Not only can you bake a NATS server directly into your application binary, but you can even connect to that NATS server without going through a network interface, making NATS an awesome choice for building modular monoliths, or for simply the foundation for any programs connectivity, or a data layer with lots of options for storing and moving that data.
Check out our example code here:
github.com/syn...
00:00 - Intro
01:04 - Why embed a NATS Server?
05:35 - Use Cases
07:28 - Example: Embedding NATS Server
13:50 - Configuring In Process Connections
18:40 - Benchmarking In Process vs localhost
19:44 - Enabling JetStream and Leafnode to Synadia Cloud
26:10 - Wrap up!
Don't want to host NATS yourself? Sign up for Synadia Cloud for free: cloud.synadia....
NATS is a connective technology powering modern distributed systems, unifying Cloud, On-Premise, Edge, and IoT.
Join the NATS Community on Slack: slack.nats.io
Learn More about NATS at docs.nats.io/

Пікірлер: 22
@thecodegangsta
@thecodegangsta Ай бұрын
What does everyone think of this feature? What's a cool way to use it that I haven't thought of?
@ffbrownie
@ffbrownie Ай бұрын
A while ago I had a issue up related to using embedded servers as part of a cluster. Didn’t manage to get it working but I’d be interested what a working setup could look like. Using a leaf node may even be the answer for me
@Mauro-l3s
@Mauro-l3s Ай бұрын
Great video! This is the exact use case we have, but for our business model the price per leaf node connection in NGS is sadly not feasible. What would you suggest in this case?
@user-vu6io8lk1q
@user-vu6io8lk1q Ай бұрын
I have been using embedded nats server for a couple of years now. It is one of the great features of nats. What I was missing was how to connect it to a nats cluster and your video answered my question very nicely. Thanks. It is a very powerful construct that can replace a lot of infrastructure setup and have microservices talk to each other in a clean transparent unified way. Thanks!!
@idearat0
@idearat0 Ай бұрын
My target design is effectively a blend of this and Natster where you end up with a peer-to-peer desktop application mesh of sorts. We'll see how that works out over the coming months.
@chmod0644
@chmod0644 Ай бұрын
Embedding lets you write software that scales from the small to the large. If you are writing a NATS-based API, your users can start with a single static binary, and move to HA with clustered+embedded, then scale out to externalized nats-server clusters. Giving people a way to try stuff out with minimal infra is a killer feature, imo. It's kind of like how Gitea (git server) or Prosody (xmpp srever) support sqlite. It's sufficient for small/medium deployments, and that's the proving ground for introducing new tech into your organization. Etcd supported embedding early on, too, and while it's hard to measure I think that partially accounts for its success.
@BarakaAndrew
@BarakaAndrew 29 күн бұрын
This is very powerful, I like modular monoliths, spinning my API servers globally with nats included makes life so much simpler, comes with unified KV store, literally input one key on one API server it syncs in all. Life has never been easier.
@hasanerken9604
@hasanerken9604 Ай бұрын
Thanks for your fantastic tutorials and videos on NATS and golang
@evertonfernandes143
@evertonfernandes143 24 күн бұрын
Thats is really cool
@brettinternet
@brettinternet 24 күн бұрын
Great demo!
@GabrielPozo
@GabrielPozo Ай бұрын
Thanks for this tutorial!! It's a great video!!
@derekperkins
@derekperkins Ай бұрын
What does it look like if I want to deploy an embedded NATS server in an autoscaling k8s environment? Is there a leader? How does the cluster get bootstrapped? My idea is that we'd autoscale the pods, and the leader would poll for work to be done, distributing work via a queue group
@Optimusjf
@Optimusjf Ай бұрын
Você é muitos bom nessa tecnologia
@chris-malek
@chris-malek Ай бұрын
Really cool demo 😀
@daviddesmarais-michaud4345
@daviddesmarais-michaud4345 Ай бұрын
This is awesome. I've mainly been using embedded servers as a way to do local development and testing. I hadn't thought of using it to do offline-first applications. My thinking was: local -> embedded server production -> remote server Do you have more content on leaf nodes and their applications?
@pauvilella
@pauvilella 14 күн бұрын
I would be very curious to know the NeoVim configuration you have setup, do you have it public? 🙂
@chriwas
@chriwas Ай бұрын
Thanks for the great video. Would it be possible to embed the NATS server with other languages, such as Java or Rust?
@SimonVallebro
@SimonVallebro Ай бұрын
Is there a way to control when/if the server connects the leaf node connection. We have a use case that need to control when we connect to the back to sync data.
@spartan_j117
@spartan_j117 Ай бұрын
T F is nuts server?!
JetStream KV: A fascinating alternative to Redis...
35:13
Synadia
Рет қаралды 11 М.
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 35 МЛН
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 42 МЛН
小丑把天使丢游泳池里#short #angel #clown
00:15
Super Beauty team
Рет қаралды 30 МЛН
Event-Driven Architecture (EDA) vs Request/Response (RR)
12:00
Confluent
Рет қаралды 134 М.
Connect ANY Auth System to NATS.io with Auth Callout
31:44
Synadia
Рет қаралды 2,3 М.
The World Depends on 60-Year-Old Code No One Knows Anymore
9:30
Coding with Dee
Рет қаралды 737 М.
NGINX Tutorial - What is Nginx
14:32
TechWorld with Nana
Рет қаралды 87 М.
Stream processing: the easy way (with NATS and Benthos)
37:17
The cloud is over-engineered and overpriced (no music)
14:39
Tom Delalande
Рет қаралды 539 М.
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 268 М.
HTMX Sucks
25:16
Theo - t3․gg
Рет қаралды 117 М.
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 35 МЛН