Hi Tom,

The short answer is that you want to send your table as Arrow IPC and
let the libraries do most of the work serializing and deserializing.
That said, what this looks like in a real world scenario like yours
isn't currently well-documented but that is rapidly changing. Ian Cook
has been working with the community to build examples and there are
now examples for Go on the server [1] and JavaScript on the client [2]
you might want to look at.

[1] 
https://github.com/apache/arrow-experiments/blob/main/http/get_simple/go/server/server.go
[2] 
https://github.com/apache/arrow-experiments/blob/main/http/get_simple/js/client/client.js

On Wed, Mar 27, 2024 at 6:43 AM Tom Houghton <[email protected]> wrote:
>
> Hi,
>
> I’ve created an API and backend in Golang that accesses our database, and 
> I’ve built a frontend in NextJS with Typescript.
> I would like to send data from my backend to my frontend in the form of API 
> requests, using Apache Arrow’s standardised format.
>
> The trouble I’m having is that I can’t find any way to send this data.
>
> I’ve tried creating a record batch and turning it into a byte-array (which 
> seems to be the recommended method for Go), but from what I can see the 
> Javascript package on frontend only supports converting JSON to a table? And 
> from what I can tell, Go doesn’t support serialising table into JSON at all?
>
> I’m certain that I’m missing something big here, but could someone point me 
> in the direction of the documentation I should read to figure this out, or 
> tell me what format is best for transferring data between a frontend and 
> backend?
>
> Thanks,
> Tom.

Reply via email to