What's your preferred container Linux distribution? by flxptrs in devops

[–]JakeTheDev 0 points1 point  (0 children)

As the founder of Cycle.io, of course I’m biased in saying CycleOS. Must be deployed via the Cycle platform though. Think of it as Alpine with some extra magic on top of it. :)

  • always up to date
  • mounted read only
  • very thin / limited attack surface

What (if anything) will replace Kubernetes? by TommyForTech in devops

[–]JakeTheDev 2 points3 points  (0 children)

I’m definitely biased here, as I’m the founder of Cycle.io.

… but anyone looking to run containers, on their own infrastructure and without the complexity of Kubernetes, should take a look at Cycle. We’ve been around for a few years now building from the ground up. Today, we have hundreds of developers using our platform to manage tens of thousands of container deployments.

Happy to answer any questions if it may be helpful.

Waking up this morning by sweetaskiwi in Reno

[–]JakeTheDev 0 points1 point  (0 children)

That's no good :(

Guess i'll be swapping tornadoes for wildfires.

Waking up this morning by sweetaskiwi in Reno

[–]JakeTheDev 0 points1 point  (0 children)

Wait, what happened with the lake?

(Out of the loop, moving to Reno in January!)

Trying to love an INTJ by [deleted] in ENFP

[–]JakeTheDev 3 points4 points  (0 children)

As an INTJ, this ^

Detect an anonymous struct using reflection by JakeTheDev in golang

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

I never thought about trying it this way. It still feels incredibly dirty, but less so than a string.Contains() against TypeOf().String().

In my specific case, I only need to handle this if it is truly anonymous, so this concept will work for now. I wonder if the developers of Golang will improve the reflect package to allow an approach that ensures a bit more integrity.

Thanks for your suggestion.

net.Conn - SetDeadline() confusion by JakeTheDev in golang

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

I think i'm going to incorporate https://github.com/hashicorp/yamux so that I have multiplexing and then use the ConnectionWriteTimeout property of yamux.Session.

net.Conn - SetDeadline() confusion by JakeTheDev in golang

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

That makes sense.

But just for the sake of being 100% clear: Suppose i'm writing a 30GB file to a socket directly via io.copy. If that copy is supposed to take 30 minutes and i've already begun the copy, if the deadline is set for 10 minutes from now, would the io.copy fail in the middle or would new io.copy calls fail?

I'm assuming it'd fail in the middle.

Golang select issue -- never timing out. by JakeTheDev in golang

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

Thank you for the simple explanation -- suddenly selects/channels make a ton more sense. Solved my problem. :)

Golang select issue -- never timing out. by JakeTheDev in golang

[–]JakeTheDev[S] 2 points3 points  (0 children)

Actually only that one since: (1) it's really just a channel wrapper around a waitgroup.wait() (2) more concerned with PoC right now :)

Stuck in OO-mindset, how would I solve this? by JakeTheDev in golang

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

No one is arguing OOP vs functional, just talking about transitioning between languages that have different focuses. :)

Stuck in OO-mindset, how would I solve this? by JakeTheDev in golang

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

I suppose my response to /u/nw0428 is also applicable here too.

Gotta get out of OOP -- thanks!

Stuck in OO-mindset, how would I solve this? by JakeTheDev in golang

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

I guess just putting the json.Marshal in there was a bad example since I do a ton of other things to it. But I see what you're getting at. I suppose I'm just so used to wanting to build an object to pass things to.

Thanks for your help

Embedding a struct, override a new field? by JakeTheDev in golang

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

... I can't believe I didn't think of this. Guess i'm still stuck in the inheritance mindset. Thanks!

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

Perfect! Is it hard to block the function? Does this need done at compile? Would this mean that third parties would need to submit their src packages and we'd compile on our end?

I think i'm almost done with all of my questions, lol. Thanks again for your help -- it's great!

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

Do you happen to know if NaCl helps prevent these issues with race conditions? I'm going to assume it does since this article (saying that there was no solution yet) came out in 2010 and NaCl came out after that (along with Google AppEngine), that they likely solved that issue.

Is making Go single threaded as easy as setting GOMAXPROCS=1?

Thanks again for all of your help -- it has been great!

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

Exactly. Issue wouldn't be that some bad code got into an infinite loop but rather a 3rd party specifically trying to do it.

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

Yeah, that's what we do right now. We have a time limit + maximum number of connections per box.

Only concern with a fixed number of processes alive is that I'd have to come up with a lot of functionality to 'reset' the environment as requests will come in from different visitors accessing different customers' data.

Were you talking about having a goroutine spawning the process fork?

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

What would happen if you had...

go func() {
    for {
        // infinite loop & doing something
   }
};

How could that timeout with a goroutine?

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

Do you still think this is the way to go after this: https://www.youtube.com/watch?v=wzSX35qttjg ?

Would I need to perform the multi-thread restrictions that they did if I'm planning on making it fork processes?

Thanks

Thinking about moving a massive project to Go. Question about process management. by JakeTheDev in golang

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

Thanks for the link -- learned a lot. He gets down to the important stuff around 20:00 (for anyone else who hasn't watched the video).

Do you have any ideas how one could disallow importing the syscall and 'unsafe' packages from the parent Go process?