Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Shaggar
Apr 26, 2006
urls are as much a part of http as custom headers (more so, imo).

also im not denying you can route it w/ haproxy, im saying you wouldn't have the option to not route it w/ haproxy (other than having a single service app for all versions). there are just more options with versioned urls and more chance that people do it wrong w/ headers.

making the version optional via url would just require a static url pointing to the current version. not that that would be a good idea cause then tons of idiots will rely on not sending a version and when you update it will break all their stuff. (u'd have the same prob w/ headers if no version assumes current)

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

Shaggar posted:

making the version optional via url would just require a static url pointing to the current version. not that that would be a good idea cause then tons of idiots will rely on not sending a version and when you update it will break all their stuff.

lots of idiots will keep polling dead URLs 3 years after you've taken it away no matter what because they forgot they had code running somewhere and the contact account is inactive or whatever.

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

fwiw I am dead serious in that I would like to get your (and anybody else's) opinions on implementation ideas for protocols. I personally designed none of these and got the fun maintenance task. It would be sweet to get ideas for the next thing given it should:

- maintain long-lived connections (reconnecting is always slow)
- allow for multiple sessions/connections between any two endpoints (i.e. a service provider should be able to receive data on behalf of many different users from the same node)
- allow processing timeouts (infinite timeouts are a bad thing)
- support control flow mechanisms (we can drop messages, but must be able to know about it to report the losses)
- allowing for retries/retransmissions is a good plus, but not vital (we turn ambiguous case in reported losses)
- batching is useful given the nature of logs (throughput > low latency)
- optionally encrypt data for safe transmission over unsecured networks
- be supported by as many platforms and languages as possible (who gives a poo poo about a thing nobody can use)
- be conceptually simple enough, for the same reasons as above
- the protocol should be extensible, but at this point this is just a plus
- can unambiguously represent string data -- encoding can be agreed upon if standard, though
- compression is a plus, but not necessary
- be CPU-efficient so that a single user doesn't make CPUs spin 100%
- be memory-efficient for the same reason
- be bandwidth-efficient, for the same reason
- etc.

Things like MQTT looked particularly interesting, but is gonna be harder to get adoption for, and has nothing for crypto being baked in.

you have a ton of deeply difficult-to-reconcile goals here. you can't have everything. you're gonna leave some stuff on the table, every time. and that's a good thing. layers of abstraction help you out

e.g. when you worry about moving over untrusted networks, it's time to implement vpn, not add complexity to your protocol. why on earth would you handle every concern in one place?

Nomnom Cookie
Aug 30, 2009



semantic versioning for apis

/v2.4.5/boners/69/stroke
/v2.4.x/boners/69/stroke
/v2.x.x/boners/69/stroke

so x is interpreted as "latest"

what u do is set up a maven repo with a bunch of jars that run in cgi. when a request comes in, mvm exec the version indicated to serve the request. its horizontally scalable

MononcQc
May 29, 2007

Notorious b.s.d. posted:

you have a ton of deeply difficult-to-reconcile goals here. you can't have everything. you're gonna leave some stuff on the table, every time.

for shipping log strings around, as it turns out, syslog over tcp is a really nice solution. go figure that something tested over 20 years works well. it's simple and does about half the things in your grab bag

Which is why we support it (and supported it first, as mentioned in my earlier post), and it's where the majority of our traffic is going, too.


Notorious b.s.d. posted:

when you worry about moving over untrusted networks, it's time to implement vpn, not add complexity to your protocol. why on earth would you handle every concern in one place?

We use more than one protocol. In this case, HTTPS was nice enough because 1. every language deals with HTTP 2. certificates exist you don't need to implement any of that poo poo yourself 3. It doesn't require having you to set up thousands and thousands of VPNs for all the customers you have. 4. If you support HTTPS, then HTTP is there for free so hey, offer that too.

In this case, if you're a customer, you then have the choice to use many different protocols based on the log stream you have and how sensitive it is, and choose yourself the balance you want in all of the requirements listed above.

I guess it would be nice to at least support TCP Syslog over an SSH connection as a simple addition to the stack.

But at this point you can go ahead and still call it a shitshow. It'd be nice to know how you would un-shitshow it though.

MononcQc fucked around with this message at 03:39 on Sep 17, 2013

Shaggar
Apr 26, 2006

MononcQc posted:

lots of idiots will keep polling dead URLs 3 years after you've taken it away no matter what because they forgot they had code running somewhere and the contact account is inactive or whatever.

yeah nothing you can do to stop it. we've had clients continue sending patient data over various endpoints after they've termed. it just dies, but its so hipaa violation. eventually the endpoint will move and some server out there will go from getting 403s to 404s

Shaggar
Apr 26, 2006

Nomnom Cookie posted:

semantic versioning for apis

/v2.4.5/boners/69/stroke
/v2.4.x/boners/69/stroke
/v2.x.x/boners/69/stroke

so x is interpreted as "latest"

what u do is set up a maven repo with a bunch of jars that run in cgi. when a request comes in, mvm exec the version indicated to serve the request. its horizontally scalable

this is web scale

MononcQc
May 29, 2007

make all APIs return 100 Continue for ever and confuse all clients. Never stop doing it, never officially fail.

Shaggar
Apr 26, 2006
error 420 you are confused, go home

Nomnom Cookie
Aug 30, 2009



oh are you working for loggly or something? exposing a log api to customers? use protobuf

all software architecture questions answered in 10 words or less or your money back

JewKiller 3000
Nov 28, 2006

by Lowtax
design your own api? sure. design your own protocol? nope. someone smarter than you has already done that

this also applies to programming languages (you know, what this thread is about)

Nomnom Cookie
Aug 30, 2009



someone has to be the smartest and design the protocols (its me im the smartest)

MononcQc
May 29, 2007

Nomnom Cookie posted:

oh are you working for loggly or something? exposing a log api to customers? use protobuf

all software architecture questions answered in 10 words or less or your money back

Working for Heroku. That stack I'm describing is logplex, which sits behind every single instance of every single app in the platform and is used to redistribute logs around to the required endpoints (CLI, consumable APIs, tcp-syslog, syslog over https (and http), etc.)

The syslog-over-HTTP(s) stuff is basically just TCP-syslog where you gather a bunch of messages together as an HTTP request instead of sending them buffered per-packet. You add headers for things like checksums, quick reporting of losses, message counts, etc. so that services that build on that router can do poo poo like efficient live-reporting or filtering, too. Again, SSH could be a decent option there to provide the security without the overhead of HTTP.

Not sure there'd be a lot to gain over using protobuffs to represent log messages. We used them at my previous job (Real Time Bidding stuff) and it kicked everything's rear end in terms of volume given how quick it was to parse and transmit complex data structures compared to HTTP bullshit and JSON piles of crap (that always decoded wrong because who the gently caress respects UTF-8 in JSON anyway!)

I'd still like to see more ASN.1 (BER/CER/DER), use given how dumb and simple it is. Binary poo poo is the best.

MononcQc fucked around with this message at 03:58 on Sep 17, 2013

Brain Candy
May 18, 2006

MononcQc posted:

In this case, if you're a customer, you then have the choice to use many different protocols based on the log stream you have and how sensitive it is, and choose yourself the balance you want in all of the requirements listed above.

giving customers choice is bad. seriously. people pay other people money to solve specific problems, not to give them options. on your side you want to be able do all the things, they want ONE thing. a solution.

every time you give someone an airplane control console instead of a toaster, you are being bad at design. every time you make your drooling customer move their tiny little tyrannosarrus arms 'cause why the hell can't they do a tiny little of work so this other thing is less worse you are forgetting why you are paid.

MononcQc
May 29, 2007

Brain Candy posted:

giving customers choice is bad. seriously. people pay other people money to solve specific problems, not to give them options. on your side you want to be able do all the things, they want ONE thing. a solution.

every time you give someone an airplane control console instead of a toaster, you are being bad at design. every time you make your drooling customer move their tiny little tyrannosarrus arms 'cause why the hell can't they do a tiny little of work so this other thing is less worse you are forgetting why you are paid.

look, you want to save logs somewhere central, so you tell them how to set up rsyslog with the thing and they do it if they want, and it's free. They can also use it like tail -f but over entire clusters. But then the dev decides he wants to do it over some other log provider, so they install an add-on to do that and pay whatever is required (if at all) to whoever is in charge and it takes one command ($ heroku addons:add <name>) and there you get your logs piped to whatever front-end you want.

So what you do is you create an API where you document easy simple defaults, let people do that. Hide some use cases behind a simple command line that they can learn in under 10 seconds. Then if they want more, you can sell that service, or expose different data formats that may be more appropriate for what you want to do. Or anyway, that's one way to do it.

It's not because you have a toilet that a toddler can use that you require plumbing that a toddler can put together.

MononcQc fucked around with this message at 04:25 on Sep 17, 2013

unixbeard
Dec 29, 2004

MononcQc posted:

I'd still like to see more ASN.1 (BER/CER/DER), use given how dumb and simple it is

:catstare:

unixbeard
Dec 29, 2004

I'd like to see more m4

Brain Candy
May 18, 2006

MononcQc posted:

So what you do is you create an API where you document easy simple defaults, let people do that. Hide some use cases behind a simple command line that they can learn in under 10 seconds. Then if they want more, you can sell that service, or expose different data formats that may be more appropriate for what you want to do. Or anyway, that's one way to do it.

and these people deserve to do more work, because gently caress them, they are the edge cases, why can't they help me out a little to make the world a better place. right?

MononcQc posted:

It's not because you have a toilet that a toddler can use that you require plumbing that a toddler can put together.
c'mon son, I'm talking about customer interaction and you think I'm arguing this?

Max Facetime
Apr 18, 2009

MononcQc posted:

Using HTTP mechanisms you can try more than one over many calls and discover what works or not.

this isn't done for real because it's just cathedral and bazaar all over again․  as in the cathedral is right in the middle of the bazaar and you're not sure if with all the ruckus the priest is even hearing your sins․  then you go home with a rug․ 

MononcQc
May 29, 2007

Brain Candy posted:

and these people deserve to do more work, because gently caress them, they are the edge cases, why can't they help me out a little to make the world a better place. right?

c'mon son, I'm talking about customer interaction and you think I'm arguing this?

man at this point I honestly don't know what would be simpler than doing '$ heroku addon:add <thing>' where you have <thing> be 'loggly' or 'papertrail' and you get some basic logging done for free, outside of making that decision for them in the first place. The basic logging offered stores ~2000 lines ('heroku logs') and can stream them, and anything else is documented -- the page I linked to is literally what the 'features' page links to under 'Heroku Logs'. And you have to visit that page to at least know how to write logs (write to stdout) and whatnot.

So what would be a better solution to you, outside the the google-like approach of "we're just gonna store all your poo poo for free forever" ? What's the behaviour you want to see there?

MononcQc
May 29, 2007

Max Facetime posted:

this isn't done for real because it's just cathedral and bazaar all over again․  as in the cathedral is right in the middle of the bazaar and you're not sure if with all the ruckus the priest is even hearing your sins․  then you go home with a rug․ 

so if I implement it, it gets to be real world and then your argument is done right? :madmax:

Nomnom Cookie
Aug 30, 2009



mononcqc the heroku routing mesh is an instance of haproxy with a 10 MB config file c/d

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Max Facetime posted:

this isn't done for real because it's just cathedral and bazaar all over again․  as in the cathedral is right in the middle of the bazaar and you're not sure if with all the ruckus the priest is even hearing your sins․  then you go home with a rug․ 

much better than what eric raymond wrote, regardless

Brain Candy
May 18, 2006

MononcQc posted:

man at this point I honestly don't know what would be simpler than doing '$ heroku addon:add <thing>' where you have <thing> be 'loggly' or 'papertrail' and you get some basic logging done for free, outside of making that decision for them in the first place. The basic logging offered stores ~2000 lines ('heroku logs') and can stream them, and anything else is documented -- the page I linked to is literally what the 'features' page links to under 'Heroku Logs'. And you have to visit that page to at least know how to write logs (write to stdout) and whatnot.

So what would be a better solution to you, outside the the google-like approach of "we're just gonna store all your poo poo for free forever" ? What's the behaviour you want to see there?

Mmmm, rtfm. Excuse me if I don't do that for a thing I don't care about.

MononcQc
May 29, 2007

Brain Candy posted:

Mmmm, rtfm. Excuse me if I don't do that for a thing I don't care about.

Then don't, and get the default behavior of logs. It should be a sane behavior given you don't care about it.

Nomnom Cookie posted:

mononcqc the heroku routing mesh is an instance of haproxy with a 10 MB config file c/d

d (a 10mb config file only would be a dream)

MononcQc
May 29, 2007

we are actually using a bash-based reouter that uses netcat and awk over text files to do dispatch to the proper endpoints!

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

MononcQc posted:

we are actually using a bash-based reouter that uses netcat and awk over text files to do dispatch to the proper endpoints!

:shepface:

Shaggar
Apr 26, 2006

MononcQc posted:

we are actually using a bash-based reouter that uses netcat and awk over text files to do dispatch to the proper endpoints!

heh

double sulk
Jul 2, 2010

do people actually use heroku for anything that isn't basic testing

rap genius are the only notable site i know that use it and they got pissed because of the dyno poo poo and i'm unaware if the people at heroku actually fixed it

Shaggar
Apr 26, 2006
my routing layer is full of unicorns, cats, and awks

double sulk
Jul 2, 2010

Shaggar posted:

my routing layer is full of unicorns, cats, and awks

you forgot racks

big ones

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

gucci void main posted:

do people actually use heroku for anything that isn't basic testing

rap genius are the only notable site i know that use it and they got pissed because of the dyno poo poo and i'm unaware if the people at heroku actually fixed it

tons of places, and rap genius' problems were mostly their own

you'd know this if you were any good at keeping a job or networking

double sulk
Jul 2, 2010

Cocoa Crispies posted:

tons of places, and rap genius' problems were mostly their own

you'd know this if you were any good at keeping a job or networking

lol sorry i never use it at my job i guess?

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

gucci void main posted:

lol sorry i never use it at my job i guess?

it's web app hosting, not a deep fat fryer

Shaggar
Apr 26, 2006

Cocoa Crispies posted:

tons of places, and rap genius' problems were mostly their own

you'd know this if you were any good at keeping a job or networking

yeah their problem was they decided to use heroku

Posting Principle
Dec 10, 2011

by Ralp
i'm bad at networking because i'm deeply unpleasant

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

Which is why we support it (and supported it first, as mentioned in my earlier post), and it's where the majority of our traffic is going, too.


We use more than one protocol. In this case, HTTPS was nice enough because 1. every language deals with HTTP 2. certificates exist you don't need to implement any of that poo poo yourself 3. It doesn't require having you to set up thousands and thousands of VPNs for all the customers you have. 4. If you support HTTPS, then HTTP is there for free so hey, offer that too.

In this case, if you're a customer, you then have the choice to use many different protocols based on the log stream you have and how sensitive it is, and choose yourself the balance you want in all of the requirements listed above.

I guess it would be nice to at least support TCP Syslog over an SSH connection as a simple addition to the stack.

But at this point you can go ahead and still call it a shitshow. It'd be nice to know how you would un-shitshow it though.

Brain Candy is right: I would un-shitshow it by fixing what you offer to customers. Offering a menu of complex possibilities is bad/stupid/evil.

Making twenty things available creates an impossible set of intersecting requirements. The fewer things you set out to accomplish, the fewer nasty things have to be reconciled, and the more time you can spend on goal-oriented activity instead of fixing up impossible conflicts in your requirements.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Shaggar posted:

yeah their problem was they decided to use heroku

and not s3 for big static images and javascripts and css files

Notorious b.s.d.
Jan 25, 2003

by Reene
btw i stand by not wanting to work where you work mononcqc

solving the wrong problem is way the gently caress worse than solving the right problem sloppily. i would rather unpick self-modifying php all day than deal with idiot requirements

Adbot
ADBOT LOVES YOU

Notorious b.s.d.
Jan 25, 2003

by Reene

Cocoa Crispies posted:

tons of places, and rap genius' problems were mostly their own

you'd know this if you were any good at keeping a job or networking

yeah relying on heroku's load balancer to conform to heroku's documentation is definitely their fault

how dare they design a system around advertised features

a bunch of novice developers didn't empirically verify the infrastructure they didn't construct or understand. their problems were mostly their own :smug:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply