FAQ

Frequently asked questions

Is Resgate free to use?

Yes, completely. Resgate is released under the permissive MIT license.

What does RES stand for?

RES as in Resgate stands for REsource Subscription.

What language is Resgate written in?

Go. The same goes for NATS Server, which is used in conjunction with Resgate.

Can Resgate turn my existing REST protocol into a realtime API?

Not just like that. You may use a service, such as rest2res, to turn your legacy API into a live API, accessible through Resgate. But in order to get real time updates (within < 100ms), your service needs to listen and respond to requests sent over NATS Server instead of directly responding to HTTP requests. It is similar, but not the same.

In addition, your service must send events over NATS whenever there has been a change to any of your resources.

Can I use Resgate for my ASP.NET / JSP / PHP website?

Yes, you can, but it will be less efficient.

Resgate works best when used in applications built with client side DOM rendering frameworks such as React, Vue.js, Angular, or Modapp.

Why not just use WebSockets?

Resgate is using WebSockets. And while WebSockets is still the most common suggestion on how to push updates to web clients, it is just one part of the answer.

There are more things to consider, depending on the use case. Resgate is a simple solution to the common problem, keeping clients’ data up-to-date, and it solves it in a way that gives you plenty of additional benefits.

Can I authenticate using JWTs?

Yes, you can.

Resgate allows most any type of authentication, but it won’t do it itself - it just facilitates the possibility. Instead, it is expected that you have a service that handles the specific JWT authentication. Look at the JWT Authentication example to learn more.

How many Resgates can be connected to a single NATS Server?

Many. Resgate and the RES protocol does not impose any limit.

Can a client connect to a different Resgate on reconnect?

Yes, it can. Resgate keeps no client state between connects.

What database must I use?

Resgate imposes no database requirements. It has nothing to do with storage, leaving you free to use whatever you prefer.

Do I have to use NATS?

Yes. But you are free to use your favorite message queue/broker for internal communication between services; NATS and Resgate is only for the front-facing API. While internal communication may also safely be sent over the same NATS server, there are no requirements to do so.