Re: [go-nuts] Performance for concurrent requests

2022-12-02 Thread Andrew Harris
I wonder a bit about io.ReadAll versus constructing a JSON Decoder. In general, though, using pprof is the best way to start to break down a question like this. Would the actual workload involve more structured JSON, or more computation with decoded values? On Friday, December 2, 2022 at 7:31:5

Re: [go-nuts] Performance for concurrent requests

2022-12-02 Thread burak serdar
On Fri, Dec 2, 2022 at 8:13 PM Diogo Baeder wrote: > Hi guys, > > I've been working on some experiments with different web application > stacks to check their performances under a specific scenario: one in which > I have to make several concurrent requests and then gather the results > together (

[go-nuts] Performance for concurrent requests

2022-12-02 Thread Diogo Baeder
Hi guys, I've been working on some experiments with different web application stacks to check their performances under a specific scenario: one in which I have to make several concurrent requests and then gather the results together (in order) and throw them out as JSON in the response body. (T

Re: [go-nuts] gRPC for web applications with millions of users

2022-12-02 Thread 'Christian Stewart' via golang-nuts
Hi all, I've built a streaming RPC library compatible with grpc Protobuf service definitions that can do bidirectional streaming to the web browser over any AsyncIterable channel, currently using WebSockets but can also use Message channel to webassembly and other messaging approaches. https://gi

Re: [go-nuts] How can I use go with Modules

2022-12-02 Thread TheDiveO
My 2cents here. One of the most terrible examples of pre-mod repos I've encountered are Docker's engine repos, subsuming also the repos moved into the moby realm: they mostly lack module information and they break upon checking them out on master or go getting them and trying to build, even on

[go-nuts] Re: [ANN] new linter for "mixed pointer and value receivers"

2022-12-02 Thread TheDiveO
IMHO it might be of broader use to lint the cases where a value receiver is used and there are assignments to it or its fields ... or is this already caught by ineffassign? The recommendation leads to slightly "ugly" situations on a regular basis to enforce a pointer receiver on the Stringer me

Re: [go-nuts] gRPC for web applications with millions of users

2022-12-02 Thread robert engels
There are also things like https://github.com/grpc/grpc-web > On Dec 2, 2022, at 11:20 AM, 'Sean Liao' via golang-nuts > wrote: > > See also https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser > > > - sean > > > O

Re: [go-nuts] Re: gRPC for web applications with millions of users

2022-12-02 Thread 'Sean Liao' via golang-nuts
See also https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser - sean On Fri, Dec 2, 2022 at 4:46 PM Brian Candler wrote: > Just checking that you came across this already? > https://grpc.io/blog/state-of-grpc-web/ > > gRPC can't be implemented natively in browsers. You can sending s

Re: [go-nuts] Fetch pseudo-versions

2022-12-02 Thread 'Sean Liao' via golang-nuts
all pseudoversions would be a list of all commits are you sure that's what you want? - sean On Fri, Dec 2, 2022, 16:37 Marco Augusto Vitangeli < marcoaugustovitang...@gmail.com> wrote: > Hi, this question is a little bit weird, but for a project I need to list > all versions of a golang package.

[go-nuts] Re: gRPC for web applications with millions of users

2022-12-02 Thread Brian Candler
Just checking that you came across this already? https://grpc.io/blog/state-of-grpc-web/ gRPC can't be implemented natively in browsers. You can sending something gRPC-like and then convert it back to gRPC at the server. But for bi-directional streaming, I think you need to look at Websockets o

[go-nuts] Fetch pseudo-versions

2022-12-02 Thread Marco Augusto Vitangeli
Hi, this question is a little bit weird, but for a project I need to list all versions of a golang package. Currently I'm doing it with the golang proxy, and the list endpoint, but it has one issue, it does not return pseudo versions. Do you have any idea o how can I access this information? so

Re: [go-nuts] Go Memory Model question

2022-12-02 Thread burak serdar
The way I read the memory model, this program can print 01, 00, and 11, but not 10. This is because goroutine creation creates a synchronized before relationship between x=1 and x=0, so even though there is a race, x=0 happens before x=1. On Fri, Dec 2, 2022 at 6:56 AM のびしー wrote: > > I believe

[go-nuts] gRPC for web applications with millions of users

2022-12-02 Thread Sankar
Hi, I have used gRPC for some simple applications, where the server is in Golang and the client is also another golang application. I have primarily worked in the backend and have done a lot of gRPC communication among the backend services using the likes of gRPC streams and golang. Now for th

Re: [go-nuts] Go Memory Model question

2022-12-02 Thread のびしー
> I believe your example is basically equivalent to the ones in https://go.dev/ref/mem#badsync which also contains an explanation of how the memory model implies this @Wagner Thanks for your opinion, I think so too. I was not confident that my example is equivalent to https://go.dev/ref/mem#badsyn

Re: [go-nuts] Go Memory Model question

2022-12-02 Thread 'Axel Wagner' via golang-nuts
I believe your example is basically equivalent to the ones in https://go.dev/ref/mem#badsync which also contains an explanation of how the memory model implies this (or rather, how it does not imply the opposite). On Fri, Dec 2, 2022, 13:11 のびしー wrote: > Hello, I have another question regarding

[go-nuts] Re: Go Memory Model question

2022-12-02 Thread peterGo
Programs that modify data being simultaneously accessed by multiple goroutines must serialize such access. https://go.dev/ref/mem $ go run -race racer.go 00 == WARNING: DATA RACE Write at 0x0054d5f8 by goroutine 6: main.main.func1() /home/peter/racer.go:7 +0x29

[go-nuts] Re: Go Memory Model question

2022-12-02 Thread のびしー
> So the second read can observe x = 0 even if the first read observes x = 0. Sorry, I meant "So the second read can observe x = 0 even if the first read observes x = 1." here. 2022年12月2日(金) 21:10 のびしー : > Hello, I have another question regarding the Go Memory Model. > > (1) Can this program pri

[go-nuts] Go Memory Model question

2022-12-02 Thread のびしー
Hello, I have another question regarding the Go Memory Model. (1) Can this program print "10", according to the Memory Model? (2) If that is forbidden, which part of the Go Memory Model excludes such behavior? https://go.dev/play/p/Fn5I0fjSiKj ```go package main var x int = 0 func main() { go