News for hackers. Stuff that matters.
Re:Envoy: 7 months later by shawabawa3 on Tuesday April 25, 2017 @01:00PM (#14195577)
Looks interesting except imo the configuration makes it basically unusable.

They use jinja2 templated json... and there are hundreds of lines for their "simple" examples.

Even the "hello world" type example of proxying to google is a mess https://github.com/lyft/envoy/blob/master/configs/google_com...

Re:Envoy: 7 months later by sandGorgon on Wednesday April 26, 2017 @12:18AM (#14200399)
This is a battle that repeats itself ever so often. Same deal with kubernetes config files.

It's the same opinionated positions of puppet vs chef/ansible. Building the tooling in the form of an embedded programming language (lua for nginx, python for ansible) is so much better.

But that is a much more polarising position to take. It's politically untenable. Ruby engineers will say no to python and vice versa... So you start arriving at Json or XML based configurations which are a programmatic neutral ground.

IMHO lua-jit occupies the same political neutrality as XML.

Re:Envoy: 7 months later by henrikschroder on Tuesday April 25, 2017 @03:35PM (#14197198)
I love how history repeats itself.

I remember everyone complaining about Spring and similar having these massive XML configuration files, and then people said "never again!", and moved to very simple JSON formats for their frameworks. And then everyone adds a little bit to the best practices, and over time we get this, again.

Re:Envoy: 7 months later by stickfigure on Tuesday April 25, 2017 @06:30PM (#14198742)
Seriously. How about we just call it EJB 4.0?
Re:Envoy: 7 months later by shouldbworking on Tuesday April 25, 2017 @07:22PM (#14199129)
JSON Server Faces™
Re:Envoy: 7 months later by stock_toaster on Thursday April 27, 2017 @09:14PM (#14216202)
I tried to give it a try, and gave up for now.

1. quite hard to "give it a spin" without using docker (vomit). I eventually found some random github repo that had centos7 compatible build scripts, and it took quite a while to compile it on a test vm since it had to build gcc and a ton of other stuff. Not sure why they can't just supply a static binary "release".

2. The config really is a mess. I managed to get something almost working (only / requests went through the proxy, but nothing else for some reason, even though I was using a prefix config). There aren't really any good example configs I could find either. There is a weird config builder script with json templates in the configs dir, but it just seemed to spew out some preconfigured madness.

I am sure it works great and has more tunables than you can shake a stick at, but for now it seems to be only usable by people who have lots of time to invest in trying it out.

Re:Envoy: 7 months later by mentat on Tuesday April 25, 2017 @11:32PM (#14200226)
That's how they use it, that's not how you have to choose to use it. It is one of the most tedious aspects of the tool but all the different aspects exist for a reason, there just needs to be an easy mode for people starting off.
Re:Envoy: 7 months later by bastawhiz on Tuesday April 25, 2017 @01:40PM (#14196086)
The example you linked isn't so bad. Perhaps a bit verbose for a simple example. The formatting of the json is ugly though, and I think they would do better to not collapse the whitespace inside arrays.
Re:Envoy: 7 months later by stock_toaster on Tuesday April 25, 2017 @03:44PM (#14197284)
Seems like they could have used something a bit nicer to work with too (yaml, libucl, hocon, etc). I am honestly getting tired of editing fiddly json (no comments, last element in list can't have a comma, etc) all over the place.
Re:Envoy: 7 months later by user5994461 on Tuesday April 25, 2017 @05:15PM (#14198096)
You can use hjson for human editable json.

http://hjson.org/try.html

Human editable json, with comments, and doesn't kill you for a lack of trailing comma.

Available libraries in tons of languages.

Re:Envoy: 7 months later by stock_toaster on Thursday April 27, 2017 @10:15PM (#14216437)
That actually looks pretty nice. Thanks for the link!
Re:Envoy: 7 months later by wstrange on Tuesday April 25, 2017 @05:33PM (#14198270)
Given Google's involvement, I am wondering why they did not choose jsonnet?
Re:Envoy: 7 months later by user5994461 on Tuesday April 25, 2017 @07:06PM (#14199034)
Hopefully, it was avoided on purpose because it's a complete nightmare to use.
Re:Envoy: 7 months later by wstrange on Tuesday April 25, 2017 @07:49PM (#14199319)
Honest question: How so?

I have not used it in anger - just played around with it.

Re:Envoy: 7 months later by user5994461 on Wednesday April 26, 2017 @04:16AM (#14201335)
Too much indirection.

You get big files filled with variables, loaded from other big files also full of variables. It's hard to know what you are setting after a while or where it comes from.

After a while playing with configuration systems, I'm starting to think that configuration should just be hardcoded once and for all.

Re:Envoy: 7 months later by Edmond on Wednesday April 26, 2017 @01:37PM (#14205162)
I would rather contact you directly but your profile is empty.

I would like to introduce you to HiveMind described here: http://blog.crudzilla.com/2016/10/managing-configurations-wi...

It addresses the issues that JSSONET does without inventing a new templating language.

I am happy to give a skype demo, email me if interested.