text stringlengths 0 2.35k |
|---|
**Johnny Boursiquot:** But pretty much everything that you ship, the moment it touches your network, then it's all Go all the way down, except of course for the Haskell stuff. This sounded like some sort of abstract syntax tree, with a new creation or something like that, trying to figure out what the shape of these AP... |
**Anthony Alaribe:** Precisely. |
**Break:** \[30:14\] |
**Natalie Pistunovich:** So talking about APIToolkit, you probably saw a lot of APIs, you've probably complained about a lot of APIs in general as you were coming up with the idea for this... |
**Anthony Alaribe:** Who hasn't? \[laughs\] |
**Natalie Pistunovich:** So from seeing so many APIs, and probably writing a bunch, what are some good practices that you see, that you follow, and what makes them good? |
**Smile Egbai:** So being a mobile developer, I probably consume more than I create. I don't create so much per se, but, one thing that always ate me, I know this might rupture some feathers, or something, but actually it's a bad practice. I'll just have to be brief... \[laughs\] When you are sending an error -- I sent... |
\[32:03\] So if I request a resource that's not there, it gives me a 404. If there's a problem on the server, it gives me one of the 500s. 501, depending on what depending on what server it is. If the resource has moved, or something, I think it's a 301, or something... But don't give me a 200, then now give me a JSON ... |
I think that's one of the worst bad practices, and even when they are written in JSON, returning a number as a string; it's a small thing, but... It doesn't make sense. If it's a number, let it be a number. But don't put a number inside a string, or don't mask a JSON body in a string. It happens a lot, I see it a lot w... |
I think for me those are one of the pet peeves when you're talking about API best practices in relation to mobile development. |
**Anthony Alaribe:** I just remembered one issue Smile was ranting about some time ago... I think he spent some time investing some issue; I think there was a field that -- if the field doesn't exist, it would be a null. He was checking for this null... Maybe you wanna tell the story better... \[laughter\] |
**Smile Egbai:** Yeah, so there's this weird third-party provider we have, and when field doesn't exist instead, they always sent a null. But now, when the field doesn't exist, I don't know what they do or how they do it, they just don't send the field. If we are not decoding that JSON, it crashes the adaptor. |
**Anthony Alaribe:** You were telling me about a situation where they were sending this null, but as a string. |
**Smile Egbai:** Oh yeah, so that's the thing, they've fixed it. They've fixed it into sending a string, and they unfixed it into now sending the null. It's a stack of issues. So it seemed like for everything I complained about, they fixed it, and I don't know what really happened on the testing side, I don't know how ... |
I just feel things like these are terrible API designs. I mean, most times, ideally, if you're going to send in a value which is a string as a null, that's fine; we could always check that. But removing the field completely? No. It just makes it hacky. Then bringing it back and instead of sending a null, you now send i... |
**Natalie Pistunovich:** Yeah. They should be sending like a string to a URL of an image of a meme that says, "Null" |
**Smile Egbai:** Look, and the part that killed me the most... I remember it now. They sent the null as a string. You know when you put a null in a string? So instead of sending null, you send me null as a string... |
**Natalie Pistunovich:** Was there like a dot after the null? \[laughter\] |
**Johnny Boursiquot:** End of sentence... |
**Smile Egbai:** Our users were literally getting null. They were getting null; when you displayed the text, you were getting null. And I saw these things and I was like, "How...?!" I didn't believe I made that kind of mistake, and I could not for the life of me understand why I was displaying null null. I just couldn'... |
**Johnny Boursiquot:** That did not live up to your namesake. It did not put a smile on your face. \[laughter\] |
**Smile Egbai:** \[36:12\] Oh no, it didn't. |
**Johnny Boursiquot:** Oh, man... Given that you're probably receiving a lot of the data you need to process in JSON - correct me if I'm wrong - how is it dealing with JSON in Go? Do you find that the standard library works just fine, or have you had to use something else? |
**Anthony Alaribe:** Go actually handles JSON quite nicely. Unfortunately, most programming languages in the world are not written in Go, so this makes it quite difficult to work with. For example, in the dynamically-typed ecosystem it's very common to have one field that can be three things; maybe it's an object somet... |
So this problem -- it kind of makes it harder to consume APIs in Go. It's really nice to produce in Go, because every language who consumes an API that was made in Go would get something very consistent. But if you as a Go service is the one consuming, then you need to be prepared to deal with these things that are ver... |
Unfortunately, we outsourced a lot of these kinds of problems to Haskell... The language just exists to solve these kinds of parsing problems, and it's just more mature in solving these kinds of parsing problems than Go. Definitely, these things can be done in Go. You can save it into an interface and have a cast a Go ... |
**Johnny Boursiquot:** Right. So I'm assuming that in the next iteration of the product, where you do have a separate - let's just go with the term 'sidecar' for now, but... You do have a separate collector, if you want. Then the constraint really becomes how fast can you show the results of your analysis, of your anom... |
**Anthony Alaribe:** So what we are doing actually -- I mean, you can divide the problem that we're solving into two things. One is that we're building a model that represents the API, and the second thing is that we get a stream of APIs and we're comparing each item in this stream against this model. So this is kind o... |
Processing the stream is where a lot of the anomaly detection happens, because you wanna go to the traffic in real-time, and if there's an issue, you want to alert someone. But in terms of building the model and displaying it on the dashboard, that's something that -- there's no real time constraints. I mean, there is ... |
**Natalie Pistunovich:** \[40:24\] The APIToolkit is available, it's open source on GitHub, right? |
**Anthony Alaribe:** Well, right now-- |
**Johnny Boursiquot:** He's like, "Well, what happened was..." \[laughter\] |
**Anthony Alaribe:** You know, it's a business. The core middleware is on GitHub, but we are just slowly rolling things out. Actually, right now APIToolkit is in a closed beta, where we're testing with a few companies. We're just going to gradually test with more companies on our waitlist. There's a waitlist people can... |
Over time, we're sure that we can handle whatever our customers throw at us, because if you think about it -- we need to be able to handle the sum of the traffic from all our customers. So if we have one customer making a million requests per second and another making two million requests per second, we need to be able... |
**Johnny Boursiquot:** Unless you sample, baby. You've gotta sample. \[laughter\] |
**Anthony Alaribe:** Yeah, that's a problem... I mean, we eventually would encourage sampling, but we need to be able to handle situations where there is no sampling... Because you never know where an issue would be. The issue could be in the requests you sample out. So that should be a decision which the users of APIT... |
**Johnny Boursiquot:** Yeah, that sounds like a business decision. You can kind of punt that down the road a little bit. Cool. So given that your project has no open source components, how would you say the community can help you, if at all? Or is it not at the stage yet where you can get the help from anybody? |
**Anthony Alaribe:** Yeah, I think it's actually not so much at that stage yet. We are gonna get to a point where we would need clients for most languages out there... |
**Johnny Boursiquot:** You need help with getting clients? \[laughs\] |
**Anthony Alaribe:** I mean, that's something that we would figure out when each new language that we need a client for comes up. But yeah... |
**Johnny Boursiquot:** Okay. So clients for languages, not customers-clients. |
**Anthony Alaribe:** No, no, no. Clients! \[laughter\] Collectors, precisely. |
**Johnny Boursiquot:** Got it. |
**Anthony Alaribe:** I mean clients as customers - that is always welcome... \[laughter\] No one says no to clients. But yeah. |
**Natalie Pistunovich:** Fun. Okay. |
**Johnny Boursiquot:** Is it that time, Natalie? |
**Natalie Pistunovich:** It is. It is that time. |
**Johnny Boursiquot:** Here we go. |
**Natalie Pistunovich:** Time to invite... Mat. |
**Jingle:** \[42:49\] to \[43:07\] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.