Resgate client for Go

We’re evaluating Resgate in one of our projects. An early requirement in that project is to use Resgate, as a client, from go. I understand from reading the roadmap that a go-client is scheduled for Q3 this year.

As we have an interest to perhaps speed this up, I wonder if any work has been done on a go-client yet and/or if there’s a chance to help out with the implementation? Doing so seems like a much better idea than accessing Nats directly (which would force some client-like code to be written anyway).

Glad you are considering using Resgate.

The Q3 placement of the Go client is mainly because it hasn’t been a strong requirement for any of the companies I’ve been in contact with, nor any of the projects in which we’ve used Resgate. But we also know it is just a matter of time before it is. And if you are considering using it, and is willing to give some input on your use case and how you would need to use it, I can surely prioritize it differently. Even more so if you are also willing to help out in creating the implementation. That is very welcome!

Just a question: You are talking about accessing NATS directly as an (unwanted) alternative?

I see these two types of clients:

  1. an internal application that connects directly to NATS to fetch data from services using a (Go) client for inter-service communication (Scheduled Q1 for Go… a.k.a, working on it :slight_smile: ) . This client will not be under access control, but may access all resources and methods freely, as long as NATS credentials permit it.
  2. an external application (eg. browser app) or an internal app accessing a backend that is made available through Resgate. No access to NATS available. This client would need a (Go) resclient library, and the client would be under access control.

In your case, is it 2 that fits best?

Best regards,
Samuel

To answer your question regarding accessing NATS. I don’t mind that the Resgate client does that. What I meant was the client that we will implement on top of the Resgate client, should use a Resgate API, not a NATS API. If we were to implement such a client today, we would be forced to use the NATS API, because the Go Resgate client doesn’t exist yet. That in turn, would very likely lead to us writing a lot of code that is much better suited to be in the resgate client.

Our end goal is to write an external application but if the API doesn’t change much, then I think we could start by treating it as internal. We don’t plan to have it production ready for some time yet and what we’re doing now is more of a proof of concept.

I can spend time helping out with this but I’m not sure where to start or how much effort that is needed so I’ll need some guidance to get started.

Regards,
Thomas Hallgren

I can sure help you out here, getting a go-client project started, and participate in implementation.

Effort wise, we have both API design and the implementation part to consider. Once the API design is done (I am still not sure about this effort), implementing the protocol should be fairly simple, maybe with some exception of handling cyclic resource references.

A rough estimate would be 2 weeks for a single developer, using the effort of creating the javascript ResClient as reference.

I’ll write you a mail, and we can discuss further how best to collaborate.

Best regards,
Samuel