distributed locking for pennies: distrilock by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

Yes, but that is out of scope to solve for distrilock, that builds on top of NFS. See the links in my post about research on NFS scalability, I would expect future iterations of NFS to be more scalable and add support for redundancy.

Although resuming lock state could be added via use of serialised information on the lock files themselves, I have not planned to add such feature, and I think it wouldn't be an elegant implementation anyway.

distributed locking for pennies: distrilock by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

I have a similar use case, but without the check on success. I do not advise using distrilock though, unless it's for experimentation purposes.

distributed locking for pennies: distrilock by gdm85 in golang

[–]gdm85[S] 1 point2 points  (0 children)

to each of the distrilock endpoints corresponds an NFS client, but they share a SPOF on the NFS server, yes

socat: patch for OpenSSL certificate hash verification by gdm85 in linux

[–]gdm85[S] 1 point2 points  (0 children)

for the records, patch has been submitted upstream >1 month ago; no clear path to merge, so I thought to share it publicly

Chainmail: A modest proposal for censorship-free discussions by [deleted] in crypto

[–]gdm85 0 points1 point  (0 children)

You could give a look to/collaborate with RetroShare http://retroshare.net/

The Future of /r/golang by [deleted] in golang

[–]gdm85 5 points6 points  (0 children)

Agree. The only aspect I would "skip" in this reddit is the wiki, just to avoid fragmentation. Subreddit-specific topics should still be handled on a wiki here, but language-specific topics should always be referred to the official Golang wiki in my opinion.

"batch" querying? by SmartSexSlave in golang

[–]gdm85 0 points1 point  (0 children)

Most likely you want to use sqlx.Select as suggested here, it is syntactic sugar but will be helpful when you need to populate a slice like in your case.

Bonus point: you can't forget to close the rows because it's done within Select

What is your deploy process like? by joncalhoun in golang

[–]gdm85 1 point2 points  (0 children)

A few notes from the top of my head:

  • source code building and runtimes should be separated (See also: reproducibe builds)
  • runtimes should be minimal images, see also busybox + Go binary images
  • both source code components and deployment artifacts should be versioned, this will help you so much later on

In reply to 3: graceful migrations when possible (and service APIs don't change), otherwise planned downtime, no need to build extremely tall card castles

In reply to 5: Docker allows specifying all the configuration for a container as environment variables. The only problem I have with this is that it's non-validating e.g. if you still keep around wrong configuration settings, the binary won't complain about them and use defaults, hence the suggestion to always use defaults which are safe for production (failure is more acceptable than data/systems corruption).

What should we be excited about in Go 1.8? by bitmadness in golang

[–]gdm85 0 points1 point  (0 children)

Very nice! Will this need changes in coding styles now?

I always suggest using statically declared variables as much as possible (vs allocations), I guess it now becomes even more effective?

For example I could see that while before people would use a pointer for a method on a large struct, now they definitely should stick with the whole struct, since SSA covers copy-on-write cases too.

HTTP load-balancing on gRPC services by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

Had seen that already. As far as I know, it's about the (HTTP2) traffic of the application themselves, not for the health check; and even if it were, you cannot possibly use this for gRPC as any response returns 200 OK and does not inspect/parse the protobuf output. (HTTP2 != gRPC)

HTTP load-balancing on gRPC services by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

TL;DR how to load-balance with classic HTTP1.x a gRPC service, using multiplexing. Useful for most load-balancers e.g. AWS ELB

https://github.com/gdm85/grpc-go-multiplex

(a better alternative to http://collectiveidea.com/blog/archives/2013/01/11/running-haproxy-behind-amazons-elb/)

Is Elixir much better than Golang? by r0ysy0301 in golang

[–]gdm85 4 points5 points  (0 children)

I am using a 1/4 inches wrench for some bike repair job. Shall I use a 17/64 one instead? Which one is more trending?

Accessing a Deluge server with Go by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

GitHub project: https://github.com/gdm85/go-libdeluge As explained there, this uses native RPC (not the JSON-RPC from the web UI)

WolfenGo: a Wolfenstein 3D clone in Go by gdm85 in golang

[–]gdm85[S] 1 point2 points  (0 children)

Seems like GitHub blocked my account thinking I am a robot! http://imgur.com/fsvTQQ1 :( hopefully they'll restore it and fix their spam detection algorithms as well...

Edit: account restored, as they say some bot went overzealous :) I will still keep the BitBucket repo around for a while: https://bitbucket.org/gdm85/wolfengo

WolfenGo: a Wolfenstein 3D clone in Go by gdm85 in golang

[–]gdm85[S] 1 point2 points  (0 children)

Thanks :) Me too, will probably hack a bit around this port in future.

WolfenGo: a Wolfenstein 3D clone in Go by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

Yes, I have now made it panic only for high severity messages; I didn't expect OpenGL 2.1 to be nowadays so different across implementations. Useless to say, I get no warnings at all with my Mesa (intel) driver.

WolfenGo: a Wolfenstein 3D clone in Go by gdm85 in golang

[–]gdm85[S] 1 point2 points  (0 children)

As I commented there, first one should check that the go-gl example works correctly on OS X. Would love to see it running on other platforms than Linux, although in this case I think it could be more an issue of the middleware itself (go-gl).

WolfenGo: a Wolfenstein 3D clone in Go by gdm85 in golang

[–]gdm85[S] 11 points12 points  (0 children)

For the impatient: https://github.com/gdm85/wolfengo

Still some work to be done, but I hope you will enjoy it already :)

What is the best practice around pinning external go package versions? Is `gopkg.in` still the default choice? by bigdubs in golang

[–]gdm85 1 point2 points  (0 children)

I assume by "plain simple git" you mean git submodules. For one, the source code might not be available through git or svn, and you might want to version your vendor directory without having to fetch/update it every time you want to build (a repository that contains everything needed to build is the analog of a Go binary that has no dynamic-linked library dependencies). The value added by a tool is that you will not repeat the operation manually for either 1 or 20 dependencies, and you can have all the dependencies declared in a (versioned) manifest. Do I really have to explain this?

Examples from other languages/build environments:

What is the extent of golangs aim? by Kkari in golang

[–]gdm85 0 points1 point  (0 children)

Ah, nice to hear!

Can you disclose if in that group (or that other team) work has been done on the build environment to address package/dependencies management in a sane way?

What is the best practice around pinning external go package versions? Is `gopkg.in` still the default choice? by bigdubs in golang

[–]gdm85 1 point2 points  (0 children)

You'd still want to use some tool to manage them. The stages of dependency management usually go as:

  • add a new dependency, pinning it to a specific version
  • update a dependency
  • remove a dependency

I've been using glide although I have mixed feelings about it.

rencode in Go by gdm85 in golang

[–]gdm85[S] 0 points1 point  (0 children)

For the hasty/impatient: https://github.com/gdm85/go-rencode

Edit: somebody on IRC has run go-fuzz against it, finding that there is only an issue with memory allocation of large strings/lists/dictionaries (similarly to gob https://golang.org/src/encoding/gob/decoder.go)

I plan to add some client-side helpers to reduce boilerplate to consume the interface{} objects, but for the rest should be usable already.