6 ms·
Looks interesting except imo the configuration makes it basically unusable. They use jinja2 templated json... and there are hundreds of lines for their "simple
by shawabawa3 10y ago
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_proxy.json https://github.com/lyft/envoy/blob/master/configs/google_com...
- bastawhiz 10y agoThe 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.
- stock_toaster 10y agoSeems 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.
- user5994461 10y agoYou can use hjson for human editable json. http://hjson.org/try.html 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.
- stock_toaster 10y agoThat actually looks pretty nice. Thanks for the link!
- wstrange 10y agoGiven Google's involvement, I am wondering why they did not choose jsonnet?
- user5994461 10y agoHopefully, it was avoided on purpose because it's a complete nightmare to use.
- wstrange 10y agoHonest question: How so? I have not used it in anger - just played around with it.
- user5994461 10y agoToo 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.
- Edmond 10y agoI 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-with-object.html 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.
- henrikschroder 10y agoI 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.
- stickfigure 10y agoSeriously. How about we just call it EJB 4.0?
- shouldbworking 10y agoJSON Server Faces™
- mentat 10y agoThat'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.
- sandGorgon 10y agoThis 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.
- stock_toaster 10y agoI 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.