Overview

About this video

What You'll Learn

  1. Manage a chat-enabled flag through a Git PR, then watch Flipt detect the merge.
  2. Use percentage variants and stickiness so the same user keeps one chatbot persona.
  3. Bundle feature flag state into an OCI artifact and run Flipt against it.

Mark Phelps and George MacRorie show how Flipt manages feature flags as code, syncing flag state from a Git repository (Gitea) and OCI registries. Demo covers variants, stickiness, gRPC and REST SDKs (Node, Python), and bundling flags with ttl.sh.

Chapters

Jump to a chapter

  1. 0:31 Introduction to Rawkode Live and Feature Flags with Flipt
  2. 1:21 Guest Introductions (George and Mark from Flipt)
  3. 3:08 Motivation for Building Flipt: Problems with In-house Feature Flag Solutions
  4. 7:30 Why Flipt? Comparing with Existing SaaS and Self-Hosted Options (Focus on gRPC)
  5. 11:22 Flipt Tech Stack and Supported Backends (Go, TypeScript, DBs, Git, S3, OCI)
  6. 19:43 Flipt Labs Demo Setup (Docker Compose with Flipt and Gitea)
  7. 26:27 GitOps Demo: Enabling a Feature Flag via Git PR
  8. 30:50 Feature Variants and Rollout Strategy
  9. 33:25 Variant Assignment and Stickiness Example
  10. 35:18 Developer Workflow: Modifying Flags via Git
  11. 38:12 Flipt SDKs and Code Integration (Node.js and Python Examples)
  12. 48:49 OCI Backend Demo: Building and Pushing Feature Flag Bundles
  13. 57:41 Discussion on OCI Backend Benefits (Monorepos, Scaling, Security)
  14. 59:11 OCI Update Strategy and Tagging Discussion
  15. 1:00:54 Summary of Flipt Features and Benefits
  16. 1:02:04 Roadmap and Future Plans (Client-side Evaluation, Rust, Wasm)
  17. 1:07:35 Conclusion and Farewell
Transcript

Full transcript

Generated from the English captions. Timestamps jump the player to that moment.

Read the full transcript

0:31 Introduction to Rawkode Live and Feature Flags with Flipt

0:31 Hello, and welcome back to the Rawkode Academy. I'm your host, David Flanagan, although most people know me as Rawkode across the Internet. Today is an episode of Rawkode live where we take a look at open source software to see how it can help make our day to day lives a little bit easier and what is a vast, evolving, and complex ecosystem. Today, we're taking a look at feature flagging using feature flagging. Feature flagging is an a project called Flipt, and I am joined by Mark and George. Hey, guys. How's it going? Hey. Hey. Good. How are you?

1:05 Oh, thanks. Nobody ever does that. Yeah. Do they know? Yeah. I'm I'm actually doing alright. I've been a little bit stressed this week because I missed a few days food poisoning. But, you know, it's nice to be back in front of our camera playing with some pretty cool software again. Now for the people watching, before we even talk about what a flag on a feature is, can you both tell us a little bit more about you? And let's just do it clockwise. So we'll start with you, George. Off you go. Cool. Yeah. Cool. Hey. I'm George. I work

1:21 Guest Introductions (George and Mark from Flipt)

1:36 on Flipt, unsurprisingly, with Mark. I'm based in in The UK in a city called Brighton, just South of London. Yeah. I've been working with working with Mark on this for last year. And yeah. I used to work with Mark some years ago, that's how we came together again to to tackle feature flags. Yeah. That's me. Alright. Thank you very much. Mark? Yeah. So I'm Mark. I'm the founder of and I am based in Raleigh, North Carolina on the East Coast US. And so as George alluded to, we have been working together on this for about a

2:21 year. I worked on it for a few years before this, kind of a as a side project. Before going full time on Flipt, I was at GitHub for about three years. And then before that, I was at a company called Code Shift, which is where George and I worked and met. We worked together for about two and a half years, I think. Wow. So you're, like, moving up the stack instead of down the stack. Right? So you did CICD, then you went to get hosting, which I guess is down the stack, and now you went, no. Fuck

2:54 that. Let's go to feature flags and you've been straight back up the top. Yep. Just all of it. All of the best. Well, I'm assuming, you know, user engineers, she's a smart people, you find problems you like to solve them. So I'd love to learn more about how you got into, like, the position where you were sitting there and going, you know, tea, coffee, beer, whatever it may be. Let's fix feature flags. Like, me a bit about the background. Yeah. I had, like, always been kind of enamored with feature flags ever since I, like, learned

3:08 Motivation for Building Flipt: Problems with In-house Feature Flag Solutions

3:27 about them. You know, it's not one of those things that they taught in university or at least they did when I went, to university. And, you know, I really was introduced to them kind of midway through my career, at another startup I worked at. Anyways and I realized, like, the power of feature flags and how, like, you can just, you know, basically separate your releases of your software from deployments and easily respond to incidents and, you know, test things and production and all that good stuff. And, you know, one thing I I realized as my career progressed

4:02 was, you know, I saw these companies starting to use feature flags. And another thing I saw, though, was that everyone was kind of reinventing their reinventing the wheel and and writing feature flag software themselves. And so I think at three or four of the last companies I worked at, each one of them had an in house feature flag solution. And I thought, you know, this is kinda crazy. Like, why would everyone like, I realized, you know, from the outset, feature flags don't seem that complicated. So it's like, okay. We'll just put something in the database,

4:37 and, you know, it's just an if else statement, and we'll just create some APIs. But as time progresses, you know, people build up features on top of these feature flag solutions, and they just kind of lead to sprawl and a lot of a lot of extra things that you don't think about from the start. And I was like, it doesn't make sense to me that companies are spending their engineering resources on implementing their own feature flag solution when that that's not even what the company sells. You know? That's not what their bread and butter is. Right? So

5:11 it just seemed like wasted effort. And even at GitHub, hopefully, I'm not giving away any secrets, but, GitHub, you know, as big as it is, you know, it's at the end of the day, a big Rails monolith. That's what you see when you log in to github.com. Obviously, there's all these external services now, like Codespaces and Copilot and GitHub Package Registry and all this stuff, but they still interface with the monolith for getting feature flag data. And the solution that GitHub uses or at least they used when I was there was a Ruby gem called Fliptr

5:46 that they built on top of throughout the ten plus years that GitHub has been around. And so they basically built their own feature flag solution, but in order to make it scale and make it accessible for all these external services, they had to end up, like, creating internal APIs, poking holes in firewalls, and creating clients in all these different languages now that GitHub uses. And I just thought that's crazy that there's this group of engineers who maintains this feature flag solution at GitHub when they could be doing, you know, a lot of a ton of other different things.

6:24 And so that was kind of the impetus for Flipt. I know that was a very rambling answer. But, basically, I thought, you know, why don't we build a feature flag solution that is meant for engineers that they can just kind of get up and running and works in their stack so they don't have to maintain it themselves. Nice. Awesome. That's a pretty comprehensive overview of of why you've done this. So let's let's come at it from a different angle. Right? Like, I think we understand the importance of future flags. We understand some of the challenges. Definitely

7:01 understand why people should be building their own solution for this. Right? It's it's one of these problems domains. It seems from a naive set of eyes really simple. But actually, once you start building out a real production like feature flagging system, I imagine those complexities really start to surface themselves. And I'm sure we're gonna get into that as we talk about what Flipt is and how it delivers and all that stuff. But let's again come at it from another angle. I'm gonna try not to just ramble at, you know. But you've decided to write. I've seen this in GitHub.

7:30 Why Flipt? Comparing with Existing SaaS and Self-Hosted Options (Focus on gRPC)

7:32 We wanna solve this problem. You must have looked to see if there were other open source projects out there. What was the the point, the inflection point where you're you know what? These don't do what I wanted to do, and we need to build something else. Like, what was happening at the time, and what did you think could be different with a potential solution? Yep. Yeah. I mean, I guess back you know, this was several years ago. I was a bit naive myself, and, you know, I briefly looked at, what other solutions were out there.

8:04 And at the time, the big player and still is, I think, launched Rawkode. Right? And so that is what everyone knows or everyone thinks of when you say feature flag solution. Yeah. They have all the big bucks, the big marketing dollars. And, you know, to me, a SaaS tool, or a SaaS feature flag solution never didn't make a lot of sense for what I thought feature flags were used for and should be used for. And that's mainly because of the latency that's involved from, you know, making requests from your applications to this this external SaaS that you

8:38 don't control. And, you know, especially when you think about where feature flags are embedded in your code base, they're usually in hot paths, like request paths. And so any downtime in the your feature flag solution means that your code then, you know, fails. And so to me, a SaaS was not was a nonstarter. Right? And so and GitHub felt the same way. That's why they didn't use a a SaaS tool. And so I looked at, okay, what self hosted feature flag solutions are out there? And I believe at the time, there was Unleash. I'm try this was a few years ago.

9:18 And, hopefully, I'm it's cool to just name drop these things. Yeah. No. Of course. Okay. I don't wanna yeah. So, you know, there was Unleash, and, you know, I think there are there are obviously others now. A lot of them to me, look like they are more focused on product, managers to try to do things like AB test, try to see which version of the dashboard converts better and all that stuff. To me, they they didn't seem like they were meant for engineering teams that were, you know, are interested in hooking up their, you know,

9:58 telemetry tools or their observability observability tools, things like that. And, also, I noticed they were all implemented using REST. And I think, you know, obviously, REST is a great technology. Everyone uses is familiar with REST APIs. But at the time, gRPC was relatively new and or at least new to me. And I thought, you know, this seems like a perfect use case for gRPC where it's, like, you know, meant to be low latency. It's meant to run, you know, for in your application in your data center, to do server to server communication. So I said, okay. There's no there didn't

10:37 seem to be a feature flag solution implemented with gRPC. Let me see if I can build one. And you're seeing all the right things. So that developer focus, open source feature flag and library that runs over issue to p two gRPC. I mean, that's got performance characteristics over it that I I like and have struggled with in the past with feature flagging. Especially the SAS angle, I've never understood why people are willing to accept that. We're in trip time to just query a flag and, of course, they batch them now at the start of the application, all this other stuff. But

11:11 obviously in the wild for me and maybe not as wild as the lunch darkly pricing, but I don't wanna get into that. So Yep. Yeah. Alright. That's awesome. So why don't you give me a I'll throw this one to you, George. I've not heard your voice in a way. I'm starting to miss it. Yeah. What's what's the the tech stack? We've heard GRPC. Tell me a little bit more about what Flipt is built upon. Totally. Yes. Obviously, gRPC, Flipt is written in Go primarily, although we also, embed a a front end application, which is written in TypeScript and React.

11:22 Flipt Tech Stack and Supported Backends (Go, TypeScript, DBs, Git, S3, OCI)

11:51 Previously, we were using just JavaScript and Vue, if I remember early, but we recently like, in the last year, we sort of switched to TypeScript and React. And then Flipt is really quite extensible in terms of what you can run Flipt in front of, and we we support a range of of back ends. So, historically, Flipt from day one has supported, like, relational database back ends. So SQLite, Postgres, MySQL, and then eventually we had CockroachDB as well. I think now we we support Terso as well. So we have those back ends. And then also more recently, we've been working on some slightly

12:37 different back ends to support more, like, GitOps friendly workflows. So we support going direct to your local file system to some just to a set of files. We go direct to git. You can go to object storage like AWS s three or very recently, literally Wednesday, we added support for for OCI registries as a source of truth. So you can plug this into a number of these these back ends that can be that can be your source of truth. And then we also have a a bunch of sort of, like, ancillary technologies that we we connect into.

13:13 So we we're fully instrumented with OpenTelemetry. I think we also have a native one straight to Jaeger if you don't wanna use OpenTelemetry. I forget what else. I think maybe that is all the pieces of the puzzle. There are lots of pieces you can pick and choose. Again, you're you're you're saying all the right things. Right? I hear tracing and OpenTelemetry. I hear Go. I mean, I'd love to hear some rest, but, know, I'll take I'll still take go. I still love go. Yeah. Yeah. You know, TypeScript is always I know we should do in front ends. I think

13:47 TypeScript is a phenomenal language. You know, this is a modern tech stack for a modern open source library and that's, you know, great. The only thing I'd love to see you just throw it in for the next really damn hell of it would be about WebAssembly, but maybe that's for a future stream. We we we we have played. Yeah. Played with Rust. We're playing with Rust. We have a Rust client. We Mark's been playing with a client side evaluator in Rust. That's sweet. We've played with WASM on a different sort of project on the side, but we're thinking, no.

14:22 If it's new and shiny, we we love it, I think. Always experiment. Awesome. Well, thank you both for sharing all of that. I think we should get a screen shared and maybe try and show people how they can get started with Flipt. Unless there's anything you want to cover before we get onto the hands on component of this. No. I don't think so. I have a little bit of a demo prepared if if you want me share. Okay. Please. Yeah. Throw it up. Let's Do you hopefully, it doesn't make me restart because we're using a new tool. Let's see. Yeah. Oh,

15:03 got it. Sorry. I'm just gonna enter my New search. Password. Oh, it's gonna make me quit. So is it you could just say later, and normally, it still works. Nice. Hacks. Okay. Alright. Let's share screen. Now it says Google Chrome has lost permissions to share screen. Oh, you can restart and jump back in there. I'll Okay. I'll tell the joke to George. No, George. You tell the joke. Cool. I don't have any jokes to that. You got my dad? I actually I came up with some like, I spent half an hour, maybe not even as much

15:49 as that, at Halloween googling jokes from my five year old daughter to tell her she was going to her dream. And they were all absolutely terrible, but the best part of it was is that she started trying to make up her own jokes, but she doesn't really understand why the jokes are funny. But she I mean, she laughs at any joke I tell her. But then she tries to tell a joke and she says something like, why did the chicken cross the road to get his dinner? And you're like, yeah. I don't think you quite understand the

16:13 structure of the joke. Yeah. And Rawk's just like, what the fuck? That was a good joke. God. Alright. It's still saying I can't share. Let me try one more time. Yeah. Sorry. No rush. Take your time. Screen recording. Because I don't normally use Google Chrome, maybe that's why. I'm not typing. Tell me a dinosaur joke for a five year old and to chat GPT. Why did the dinosaur bring a ladder to the party? I don't know why. Because it heard the drinks were on the roof. That's terrible. Wait. What? Alright. Tell me a Linux container joke.

17:35 Why did the Linux container go to therapy? Don't know why. Because it had a severe case of separation anxiety. Man, Chad GPT should not give up his day job. He should not. Hey. I see a screen. There we go. Alright. Sweet. Alright. Let me close that. Yep. Alright. Can you all see? We can. I'm gonna do the obligatory. You're gonna have to triple tap zoom on a couple of these things, but other than that, Let me increase the is that any better? I'd go one more on each. I know it feels so big on your

18:16 side, but the audience will thank you. Yeah. Let me my mouse went away now. So that's fun. Okay. I cannot find a mouse. What is happening? Didn't practically demo gods. Yeah. If you wiggle it fast enough, did Mac not make it jump out of the screen? Big old big old mouse. I really don't know where it went. I'm gonna hook up a USB mouse. This is wild. Cool. I'm in the room. An old channel says, thanks for putting this together. We need more get ups. Yeah. We always need more get ups. Nice. I always feel that with the we've worked

19:10 folks, mister Trick, by calling it get ops and not commit ops. Like, they've tied it Mhmm. Rate to one thing. And I think commit ops just turns a bit nicer. Alright. I'm ready now. I don't know if can you still see my screen? No. It's been unshared. Okay. It's probably for the best. Alright. Thanks for coming. We'll see you later. Alright. Alright. Good. Good. Cool. Found my mouse. Everything's good. Alright. So we, so this is our documentation. Right? You just go to Flipt.i0/docs, and it puts you in this getting started page. And the demo that I'm gonna do is

19:43 Flipt Labs Demo Setup (Docker Compose with Flipt and Gitea)

19:54 based off of what we call, Flipt Labs, and it's this little repository put together to kinda demonstrate, like, what you can do with Flipt. Because one of the challenging things that we found when, you know, trying to show this tool off is that it requires integration with an application to really be useful. Right? Like, it's not really useful in itself. Like, I mean, you can run it via, you know, very simply very easily via Docker, but then you load the dashboard and it's like, okay. I can create some flags and create some segments, but what do I do

20:29 with that? And so to kinda solve that problem, we created this re this repo called Fliptlabs. And so we created a couple, like, demo applications, to to show it off. And so the one I'm gonna demo demonstrate is called chatbot. And so let's see. So I have it running locally, and it's basically a kind of a live tutorial, that you can kind of, run through, you know, on your on your own. And so we have, like, three different sections of it. We have, like, a basic, advanced, and a GitOps. I'm gonna fast forward through the git to

21:11 the GitOps because I think that's probably more interesting to people. The basic is just kinda like what are flags, why would you use them, that kind of thing. And so this this example is basically gonna show you how you could roll out a a chatbot for your application, to a subset of users, and so you can kind of test it in production. And then it's gonna show you how you can change the runtime behavior of that chatbot using feature flags without having to do a code redeploy. And it's gonna do all that with, serving a feature flag data from Git. And

21:50 so that's kind of the GitOps aspect of it. I guess, any any, questions or anything before I start? Or Nope? Nope. Cool. Please hang on. Alright. David's saying something, but I can't hear you, David. Can you hear me, Mark? Yeah. I can hear you now. Yep. Alright. I'm gonna see I don't I don't really have any questions. Right? There was something really cool that you said at the start. I wanna kinda emphasize instead of a frame, right, for people who are gonna see this demo. And you said that, you know, feature flags allow us I can't remember your exact phrase.

22:32 Right? But to make two things distinct, deployment and feature delivery. Really? Exactly. And, you know, feature flags are such a great way of you know, especially as people are doing proper continuous integration and we are account based development, any of these things where they're constantly working on new things, they're always in production, and feature flags allow you to toggle them on, off, release them to subsets, do alpha beta testing, a b 10, all this other stuff. Really, it reduces a lot of the anxiety and fear that people have from continuous deployment or deployment pipelines. So, you know, keep that in mind as

23:06 you look at this demo and then you go into it and just understand how much flexibility, stability, and performance power, all of that stuff you can get. So no pressure, but you're live up to all of that now. Yeah. Yeah. Yeah. One, I guess in that in that vein, one quote I came across recently from, Rich Hickey, the founder of Closure, I believe, said all bugs in production, pass testing, which I thought was interesting because it's like, you can't, you know, you can't test everything. Right? So, like, testing in production is, in my opinion, you know, one of

23:38 the best ways to to handle, things that you can't catch in test. So yeah. Anyways, let's, let's get going. So we this all runs, with Docker Compose. And so I have the repository checked out locally. I'm in the chatbot folder. Here, let me increase the font a little bit. And so it just, it's gonna kind of give you an overview of what's gonna happen, but I'm just gonna copy and paste these commands. And, hopefully, this should all work. I tested it yesterday. So, basically, what this is doing yeah. What this is doing is spinning up

24:18 an instance of Flipt in a Docker container, and it's also spinning up an instance of git GITI GITIIA. I'm not really sure how to pronounce it. Probably gitea, which is an open source, you know, git, like, GitHub kinda clone. And so that's gonna allow us to demonstrate the the GitOps part of it. And so what we're gonna do okay. It looks like everything's running. So we're gonna go to yep. Alright. So this is, it's going to ask us to log in. I probably should've opened that in a different tab. Yep. So we're gonna log in with username

24:57 Flipt, password, password. And so let me also just kinda demonstrate Flipt while we're here. So this is the the Flipt dashboard, once you, you know, once you get it up and running. And so here, you can see we have a flag called chat enabled, and this is the flag that is going to guard our chatbot that's gonna show up in this tutorial. Spoiler. And so right now, it's disabled. And one thing you can see is that Flipt is running in read only mode, and that's because it's backed by our our GitOps back end, backed by Git storage.

25:39 And so, normally, if you're not running in in one of these declarative with one these declarative back ends, you know, you can it's a basic CRUD, you know, web app. Right? You can click on things, create things, all that stuff. But because we're now serving your feature flag data from Git, you know, obviously, you can't there would be a a mismatch if you were able to create things in UI and also create things in Git. I mean, that's something we eventually wanna solve is to allow you to, you know, use the UI, and then that gets

26:11 still gets persisted to whatever back end you're using. But right now, if you're using one of our declarative back ends, it puts flipped in this read only mode. And so, yeah, you can see that the flag is disabled right now. But we're gonna change that by taking a look at so here's the the YAML file, the declarative format that Flipt is is reading from, which defines that flag and defines its state. And so right now, it matches what you see in the UI. And so we're gonna go continue with the tutorial here. And yep. So, basically, it's saying, okay. You know,

26:27 GitOps Demo: Enabling a Feature Flag via Git PR

26:54 you're at the point where you wanna enable this chatbot, and here's how you would do that. So, you know, everything I just said, it's in the disabled state. Says, luckily, one of our colleagues has already prepared a PR to enable this flag. So we're gonna go here and uh-oh. Colleague has not prepared the PR. Let me re let me restart this. Nothing like a live demo. Sometimes this, demo doesn't work, every time, so you have to recreate it. I blame George. Yeah. It's definitely my fault. Yeah. There we go. Alright. So, now we can see that our

27:49 helpful, colleague has prepared a PR to change, the feature flag from false to true, and so we're gonna merge that. Oh, it's gonna make me sign in again. Alright. Okay. So merged. And now hey. Now our little chatbot shows up, almost instantly. Because what's happening in the background is Flipt is polling that GitHub repository, watching for changes, and it saw that, okay, the flag went from enabled false to true. And so now your application can query that flag and get the value of true. And so here's our little chatbot that that showed up. And so

28:42 this this doesn't really matter for the demo, but this chatbot is actually, trained on our, on our own docs. We actually went and embedded our documentation in a into a vector database and doing all that OpenAI, business. So you can actually ask this chatbot questions about Flipt itself. And you say, like and, yeah, we can give you a somewhat helpful answer, of where Flipt runs. And so, yeah, I guess I'll pause here for any any questions, before I before I go on or any anything you wanna talk about. I can't hear David, I think you're muted. Or

29:42 Can somewhat hear you. Oh, okay. You hear me there? Yeah. Yeah. I I don't know what happened there, but the Mac changed for them to be iPhone. Oh. And I don't know why, which explains why I was saying the best jokes in the world just like five minutes. Nobody was laughing. That's Anyway, I I said blame George, and then you said blame George. And I was like, hold on a minute. I just missed it. My joke. No. That's usually cool. Keep going. I do have questions, but I think, you know, I I wanna see the the DX of this,

30:30 the clip perspective, but let's keep going just just now, and then I'll come back to that. Okay. Cool. So, yeah, so I just refreshed Flipt, and you can see that it's enabled here as well. And so let's continue on. Okay. Already did that. Already did that. Okay. And so, basically, what I just showed is, like, how most people, I think, think of feature flags, kind of that boolean state, like, on or off, either features enabled or disabled. And so another another cool thing you can do with Flipt and most other feature flag tools is they

30:50 Feature Variants and Rollout Strategy

31:05 have the idea of variance. And so it's not just a typical on off, but you can also return other values. And you can say, okay. I want these to be distributed at different, percentages. So you could say, you know, I want 5050% of my users to get the value blue, another 50% to get red, and you can change that over time, right, without redeploying your app. And so we're we're kind of trying to demonstrate that here, where where we added another feature flag called chat personas. And so what we wanna do what we wanna demonstrate

31:37 is, you know, we're testing like, put your mind, put yourself in the shoes of an engineer who's trying to deploy this chatbot for real, and maybe they wanna test out different personas of that chatbot. So, like, the default is, like, friendly. Maybe they, you know, they're feeling sassy, and the they wanna test out a sarcastic chatbot. And then, you know, just for kicks, they wanna test out one who who tells you, like, BS. Right? Who's a who's a liar. And so we we try to demonstrate that with another pull request here where we How annoying would it be for

32:19 me to ask that we change one of the personas just for laughs? Can we have an Ace Ventura persona? We can we can try. Yeah. Let me let me merge this Yeah. I'll let you know and then we can matters in the works. Right. Actually, because yeah. Because because in in the next step, we're actually gonna modify this file and push it up. And so, yeah, we we can we'll get there. So let me go ahead and merge that. Alright. And so let's see what happened in Flipt. So now there's two flags. Right? There's chat enabled and

32:59 chat personas, and you can see it created those variants that I was talking about. And then we have the rules defined which say, okay. Which percentage of requests are gonna get which, variant? And so they're all set at a third right now, right, where default's, slightly, favored. And so continuing with the tutorial oh, it would scroll up to the top. So enable sorry. In order to kind of test this, we need we need something that is distinct. So in this example, we're choosing, a username. Right? But it could be anything like an IP address or, you know, user ID or

33:25 Variant Assignment and Stickiness Example

33:38 whatever. But we need something to determine, okay, the stickiness. So we always wanna make sure that the same user gets the same variant of chatbot because it would be weird if, like, you know, all of a sudden you're talk you know, you're talking to a friendly chatbot, then all of a sudden he starts to get all, like, sassy. Right? And so the the way we're demonstrating that is via this username field. And so I'll just say my username is David, and then I'm gonna ask the chatbot questions like yeah. So first, you got the the liar chatbot,

34:27 but, actually, he is telling the truth here, so, ignore that. But let's try let's try George and see which version George gets. And so flip sorry. George got the sarcastic one. So what database is done with support? So you're pretty much covered. And so we're just trying to show, like, you know, that you can different users will get different variants, but George will always get the sarcastic one. David will always get the liar one who's not necessarily lying. And so the way that you're controlling that is via PRs, and contributions via Git. And so I think what might really bring

35:18 Developer Workflow: Modifying Flags via Git

35:19 it home is if we can show, like, okay. As a engineer, as a developer, how would you actually make a change to you know, if you didn't have a PR prepared? So let's do that here. And then we're going to clone it. And so now we're actually gonna change that, that percentage. So say we wanna say, okay. We want everyone to get the sarcastic, chatbot. Actually, you've been done and not again because all my key findings are off. So, basically, what I'm doing here is I'm setting all the other variations to zero and the sarcastic one to 100%.

36:28 And I'm gonna close it, and I'm gonna commit it and push it up. Are you running fake in your terminal? Yes. I was late seeing other people's terminal set. They sound quite chunky. Oh, yeah. Trying to remember which keyboard. I got it from WASD keyboards. It's like Cherry MX clears. Nice. Yeah. I do like I don't know if it's WASD or WASD or whatever you're supposed to pronounce, but I do like their keyboards. Yeah. Yeah. I had a code keyboard from forget who. Maybe it's them. I really like that one. But That's not what it's actually

37:15 was at, but it was the Stack Overflow team that Yeah. Yeah. Yeah. Yeah. That's come back a while ago. Like, what, 2010, I think, when they first came out. Yeah. That explains why why it was crusty, and I had to get a new one. Yeah. It's a pretty old one. They still sell them. I think they sell really well. So Nice. So, basically, yeah, what I did is I just kinda YOLO'd this commit and pushed it to main. And now, hopefully, everybody should be getting the the sarcastic chatbot regardless of who they are. And, yeah, this is just me testing the same

37:54 thing. But, anyways, we can go back to Flipt and see that now that variant is at a % without you making any changes in the UI. Cool. And that's, I guess, really ultimately what we're trying to demonstrate there. Alright. Can we've just seen the house to kind of configure the flags with Flipt. What does it look like from the SDK point of view? Like, how do I put this into my code? Yeah. George, do wanna take that one? Yeah. Do you want to see an actual, like, example in code? I can share my screen. Would that be helpful? Or Well, yeah.

38:12 Flipt SDKs and Code Integration (Node.js and Python Examples)

38:40 I'm assuming this website uses some sort of SDK to request the chatbot persona. So, you know, if we could just take a look at that code and see, you know, like, I want developers to be able to understand. Okay. I can create a flag, push them to get all those reloading for me, but at runtime, at code time, how do I get this value? Yeah. I can I can show that real quick? Just for this example labs demo, if that's what Let's see. So yeah. So I guess a broader answer to your question is kind of what SDKs do

39:18 we support, and then I can talk about, like, which one the demo's using. And so as I as I alluded to earlier, Flipt supports both REST and gRPC, and so we have a combination of both SDKs. We have our REST SDKs available in, like, five or six different languages, you know, Node, TypeScript, Python, Go, Rust, Java. We just added a PHP rest SDK because of a amazing contributor contributed that. And so that's currently in beta. And then as far as gRPC, obviously, with gRPC, you can anybody can generate their own SDK setup or any anyone can generate their own

40:01 clients. That's one of the beauties of gRPC. But we have a couple that we already went ahead and generated for you and published just to kind of remove that extra step. And so we have them for Go, Ruby, and.net, and we're currently working on publishing a Java one. And then finally, we have we are supporting this project called Open Feature, which I don't know if you've heard about, but it's kind of like the open telemetry for feature flags where they got a bunch of feature flag vendors together and said, you know, let's come up with

40:36 a common interface, a common API that we can all, you know, conform to to enable our to enable end users to basically have one one SDK, but then be able to switch out feature flag providers. So it doesn't matter if you're using LaunchDarkly or Unleash or Flipt. You don't have to change your s your your code. You can just swap out a different provider. And so, it's actually a CNCF, project, and, you know, we have two different providers right now, Go and Java, and then we're we have the PHP one on the way. And so I guess

41:20 I can I can continue with the the chat chatbot example and show the actual SDK code there Yeah? If you want. Or okay. And another thing to mention, sorry, before I get to that, is we also publish our open API definition. And so you can generate your own REST clients as well if you want, but they're not as, you know they're they're kinda hit or miss on which ones are idiomatic. We have we have a Rust SDK. We have we have a Rust Rust SDK. Yep. Yeah. There you go. Alright. So let's go let me just show you real quick what

42:04 the chatbot is using think it's here. Yep. Me just search. Sorry. I wasn't. No more code search. I know that. Sorry. I should have been more prepared. Is it here? Here it is. Alright. Sorry. So, here, we're importing our node, SDK, and it's called Flipt API client. And, basically, you give it the environment or the URL that Flipt is available at. In this case, it's just local host. And then we're just, using a use effects, React hook to basically do check this flag. Default here is the namespace, and I'll I can talk about that in

43:23 a second. But the the flag is called chat enabled, and so it's just, you know, whenever you refresh the page, basically, saying, okay. Check and see if this this actually, sorry. Not when you refresh the page. Just checking every five seconds. If it's checking to see if this flag is enabled. And so that's that's pretty much it. It's just a single line to to get the flag here. Yeah. Nice and easy. Cool. Yep. I think as well in this project, we've got the correct me if I'm wrong with me. The the part that has the LLM is in

44:01 Python, and do we that is a Flipt client. So we have a Python SDK in here too being demonstrated. Yes. Good point. Right. I yeah. So I just showed the the front end flag, and then we have on the back end, as George just said, we have a Python REST SDK as well. And so that one is doing all the the variant checking to determine which persona the chatbot should should should respond with. And so let's get down here. Yeah. So Flipt can be used from a consumer point of view in a handful of ways.

44:44 I would say most probably 99% of people use our evaluate API, and that's what this SDK is using here. And so that's taking that context, which in the lab example was the the username, and it's sending it to Flipt, and it's saying, okay. Give me what I should what variant I should use return to this user. And so that's this evaluate call here. And so here you can see it's building up that evaluation request, and, we use we use a, number called entity ID because we didn't want to kind of force you to you to think about feature flags as

45:26 only a user facing thing. And so, you know, a lot of, feature flag tools use the the nomenclature of user ID. Well, I mean, you can use feature flag for pretty much anything like, you know, rate limits or, you know, log levels or, you know, things that aren't aren't necessarily driven by a user's action. And so that's why we just call it into the ID. But, anyways, that's the that's the username here. It does a call to evaluate, and it returns the variant. And here, you can see we're actually using, another field from the variant, which is an attachment,

46:05 and that just allows you to to put arbitrary JSON in the variant response. And that's where we're actually getting the prompt from is that that JSON response. So you can actually change the well, if it wasn't in re only mode, you could actually change the the prompt within Flipt without having to redeploy your application, which would then change the behavior that the that OpenAI is getting. Nice. So yeah. Alright. Anything else to demo, or what goes back into Big Facebook? I don't know. George, did you wanna demo the OCI or do I don't know. I

46:52 mean, I could do I could do a quick run through of sort of running Flipt with, an OCI registry instead. That's Happy to see it. Yeah. Let's do it. See it. Let's do it. Alright. Bear with me. Make sure I'm on the right screen. Okay. Let me share my screen. Yeah. So as we said, it's gonna make me I'm gonna have to go through that same dance sign that Mark did, obviously. Bear with me. I'll get the joke. So I'll be right back. I've asked OpenAI to tell me a joke about feature flags for a five year old.

47:39 Are you strapped in? Ready? Yeah. Why why did the computer go to the circus? Because it wanted to see amazing feature flags perform their magical trick. No. That's I don't I don't get it. Open AI. I'm sorry. Yeah. I I don't think it under undersized jokes. Yeah. Much like my five year old daughter. Can you can you hear me? Yes. We can. I see. I can't hear David now. Sounds weird. But I can see that you can hear David. This is very confusing. How can it's wild. Do you want me to translate? Or Yeah. You relay.

48:27 Oh, yeah. Relay. There you go. That's it. Can you see my screen? I can't see anyone. Yes. So let me move it a bit smaller. Then maybe I can see other people. I know because then I get the horrible Yeah. Like, horrible windows. Can you, yeah, increase it? Let's go big. Yeah. That's good. And then let me go I'm gonna create my own directory just to demonstrate this. So, yeah, as I said, we recently added an OCI back end for Flipt. The purpose here was so as we said before, our Git back end, it will sync your source repository in order to,

48:49 OCI Backend Demo: Building and Pushing Feature Flag Bundles

49:18 like, materialize its state. And that's great, especially for, like, getting Flipt up and running, really quick because all you need is a GitHub repo and Flipt as a container, and then you're, like you've got everything you need, with the clients to sort of build your end to end setup. But, like, where that might eventually, like, you know, have some issues with scale is if you're constantly cloning your repository and say you want to have your feature flags defined in line with your code in a site like a Monoreto repo setup. Obviously, Flipt's performance starts to do a grade

49:57 with the sort of scale of the repository there or something. So if that repository gets really big, then it takes a little bit longer for Flipt's to have to, like, start up and clone initially. And then if you've also got, like, a large sort of flow of contributions into that Git repo, then then all of that becomes work that has to go through to keep in sync that might not be relevant. And also maybe from, like, a security perspective, maybe you don't wanna give Flipt an entire repository and all of its contents. Maybe you're really

50:28 interested in just giving it, like, what it cares about, which is, flag state. Can you hear me yet, George? So OCI kind of presents a nice way to sort of solve your own problems. And it obviously requires an extra component. You need, like, an OCI registry. But once you add that, Flipt comes with all the pieces you need to, like you'd leverage that registry. And now that registries are so prevalent and so available, especially for folks that are already, you in containerized environments, they've got you've usually got access to one. It's probably not a big ask to to then start leveraging

51:13 it for for your feature flag state as well. And so as I said, we've we've added some extra commands to the Flipt binary. So this is the same binary that is the server for Flipt, and these commands are all nestled under a sort of sub command called bundle. And this allows you to turn a directory full of feature flag state into it's like an OCI bundle that you can push to to some registry and then run Fliptover. So I'll just quickly create one of those files you've already seen, like a features dot YAML file. I'm just gonna make a flag called, like,

51:59 awesome feature. Probably doesn't matter. I'll turn it off for now. And I'm gonna, like, turn that into into a bundle. So let me just build that. I'm just gonna call it my bundle. Gonna give it a tag. So there is a command to, like, look at all your bundles. This just builds a bundle that's local to your machine. You can actually run Flipt over local bundles, the two, if you want to, rather than having to go through a registry, but I think that doesn't really explain anything. You can see a bunch of other bundles I've built. This is very sort of familiar

52:40 if you're, you know, if you're used using a tool like Docker and Docker build and things like that. Okay. So I'm gonna now push that to a registry, and and then I'm gonna run Flipt and use that to sort of source it. So I'm gonna use if anyone's familiar with TTL, which is like a femoral ephemeral registry, I'm gonna use that to sort of host it nice and quickly. TTL. Shir asks that you give them a random UUID to to push to push to. So I'm gonna push that bundle and just give it the UUID, and you can

53:31 give it a time limit, sort of self destructing self destructing bundle. So the next ten minutes will be available once once I get it there. It's taking a while. It's a lot quicker normally. Promise. And now I'm gonna I'm gonna run Flipt. So I'm just gonna quickly run it locally. You just need to tell Flipt that we're gonna use the OCI back end, and then we need to tell it, like, what repository we want to follow. So I'm gonna tell it to follow this, like, ten minute repo. I tell you what it is. I've just

54:14 got too many instances of flips running. I've made that mistake before. Okay. Wow. That was bold on the street. And if I You still got here. Think I said go. Yeah. You come back over here. You go up to Chrome. Sorry for the infinite infinite window. Cool. So we can see that we can see that flag. We could Let me zoom in a little bit. Zoom in here. So we're back here in there. Let me change my name. Maybe it'll help him here, mate. We could re we could, you know, we could update this bundle.

54:53 Let's do that. So they have feature flag. Can you hear me, George? Let's let's build the bundle. Maybe I should restart Chrome. And Flipt is configured at the moment with a thirty second polling interval, so it might take a minute. You know? Well, not a minute, but half half a minute to to see that update, but you can obviously bring that that polled interval down for eventually, see this come through. That's there. So yes. So now you've got, like, the CLI for building bundles and distributing them. We think that, yeah, this might help with scaling out the GitOps

55:40 sort of workflow for flags. Alright. And also you Or do have questions when he's ready? We intend to use the leverage tags for doing things like pushing sort of different versions of flags for different environments. So you might use tags for, like, you know, long lived staging environments, or you might tag them with the commit that they're built from and use that for preview environments or the branch that you're building on. So, yeah, lots of Good George. There. Yeah. David says you look great, and he has questions when we Amazing. Yes. Alright. So that I don't have

56:17 to translate everything I say through you, Mark. If you could ask George maybe just to leave and come back and see if it helps before we meet with this awkward trip. Yeah. The first question he has is can can you leave and come and see if that will fix this audio issue? Let's do that. Be right back. K. But I have no problem written on my questions through you, but, you know, it's kind of fun. Fun social experiment. Yeah. It's like a, you know, George's partner will broke it up and I'm like, can you please tell George? I

56:59 won't be home for dinner. Come get us stuck. Hello? George? No. Maybe he muted you. Is that a thing? Yeah. Did you mute me, George? Did I a way to mute? Alright. Let's try this. It's very strange there. Can you hear me? And you nope. Nothing? Alright. We'll do this the awkward way, but we are near the end so it doesn't really matter. Okay. Yeah. I have I have I have no idea why you can't hear me, George. So really sorry about that. But this is really cool. There's a few things that I think are really important about

57:41 Discussion on OCI Backend Benefits (Monorepos, Scaling, Security)

57:52 supporting OCI in this way. One, I really like mono repositories. I can't remember if we've had this conversation or not in the past. I'm gonna give you a huge monologue here, Mark, and I I wanna hear more. Mark's still in the word. Okay. Real quick. David David really likes monorepository. Amazing. Yeah. And what are the challenges of a monorepository? And this comes down to building container artifacts and and trying to do get ups, but also the same for feature flags with get ups. Is that I want my feature flags to live next to the code or at

58:26 least in some representation of somebody that was to ship the way so the developers can understand what's happening. Right? When we support OCI, we can actually say it's through CICD process. We can build an artifact, a snapshot of time, and push it somewhere that could easily be consumed. And we'll get our commits aren't technically the sort of truth. I mean, they are. We we just have, like, a materialized view that we put into OCI. I think that's a really powerful model. So that's sweet. You said so it's all good. I really enjoyed watching this back later. I

59:01 get, like, all the context. Yeah. George, you could just watch it back later. Right? Mark, you could answer my questions from now on. I don't wanna speak to George. So what I'm curious about now is, like, say I go all in on this. I wanna use Flipt. I wanna use GRPC. I want feature flags. I want OCI. The these are things that or generally, these are things I wanna use yesterday. So one of the things that George did is he's ran Flipt with the feature back end store. I can't remember the flag. Right? But he pointed it to an OCI

59:11 OCI Update Strategy and Tagging Discussion

59:30 artifact including the the tag. Can I follow as version tag or prefix of tags? Like, how do I get updates to that? And without overriding the tag, can I? Or do I just need to accept that I have an ephemeral tag? Today, you cannot. It's basically the tags are meant to be, like like you said, the source of truth. Right? And you would have to update the configuration file, to say, wanna follow a different tag. Prefix tags is a good idea that we haven't thought about. I mean, obviously, if you use something like latest, which is, you know, bad practice,

1:00:07 but if you keep pushing the latest, it Flipt will continuously pull and pull down any changes. But if you're using something like a git shot to to tag your image, then you're just gonna have to update it each time. Yeah. A a pattern we see in Kubernetes seems to be to use semantic versions on the tagging. Mhmm. And then the get ops controller will resolve that to a SHA over every every interval. And so you're then you're still deploying to one specific digest, which is great. But we can opt them to updates on a minor or a patch release, but not

1:00:38 on a major release and stuff. I think that kind of semantic some resolver Yeah. That would be a really cool iteration. And it's open source. Right? So if I wanna see this, I could just go in and hack on some code. Yeah. Anyway yeah. Really, really cool. So that's a great demo from both of you. I'm gonna just because things are now awkward and George is the is their part. And I'll just kick it out. It's fine. The best, to be honest. I'll just do a quick recap then. You know, Flipt is a a pretty sweet piece

1:00:54 Summary of Flipt Features and Benefits

1:01:11 of software. It's open source. It's ready to go. It's GRPC. It could be performing. It provides a strong developer first experience for doing feature flagging as a single binary that could be deployed very easily locally using Terzil was the one that stood out to me. Like, I think Terzil is such a great product. So, you know, do using something like that seems like a great idea to me and even OCI as well. So lots of different opportunities there for me to run this in production and be happy and a pretty nice SDK front end where I can use generated

1:01:40 GRPC's in pretty much any language. Right? Because it's so ubiquitous now. But also a handful of rest full rest like I don't even know what the correct terminology is anymore. APIs for people that wanna go on more traditional route. I mean, throwing some GraphQL, you've got everything covered there. Right? But pretty sweet. Mean We're not GraphQL fans. Oh, that's alright. Any last words that you want to share and and then maybe share a bit more about the the road map. Right? We've we've got a snapshot now, a good understanding of what Flipt does, the problem it solves, where it is today.

1:02:04 Roadmap and Future Plans (Client-side Evaluation, Rust, Wasm)

1:02:16 Why don't you tell me a little bit more about tomorrow? And feel free to share any of it links or prior profiles. Shameless plug anything that you want. Yep. Yep. Great. So I don't know if I can actually type in chat here, but our website is Flipt.io. Our repository is Flipt-i0 on GitHub. As David said, there's a number of ways you can deploy and run Flipt yourself. We support, you know, Docker containers, obviously. We have a Helm chart. So we're I would say we were cloud adjacent. We're not not cloud native maybe, but we can run pretty much on any infrastructure because

1:03:01 it's where you can go, and we have binaries for almost every architecture that you can think of. As far as the road map, so today, Flipt does all of its evaluation server side, which is, you know, probably the most common pattern that I think most feature flag tools, kind of, use. But that again, it's it's not great for everybody. So, like, the mobile use case, for example, if you have, you know, a mobile app that, you know, the the user might not have great network connectivity, you don't want everything every time the user does something, your mobile

1:03:38 app to have to reach out over the network and evaluate a feature flag. So we're actually working on client side evaluation as well, client side SDKs, and so that's where the Rust comes in. We are we basically rewrote our evaluation logic in Rust, and then we're using FFI, which is foreign function interface, I think. So we're creating a a dynamic library that actually does evaluation. And then the client side SDKs, written in Go, TypeScript, Ruby, you know, what have you, will basically use FFI to say, okay. I have this context. Now do the evaluation Rust library, and then

1:04:19 it will will return a response. And so we actually created a new set of gRPC, or an internal API to take all of the flag state that and then the Rust library can query that that endpoint, get the data that it needs to then perform the evaluation client side. And as you can imagine, it's extremely fast, you know, client side. And so we're actually working on that right now. We hope to have that open source in the next couple of weeks. We're just kinda running into some issues with, like, how to package those SDKs in the native languages because not all

1:04:58 of them allow you to easily link library written in Rust and then push up to the package registry. But, anyway, so if you have any interest in Rust or FFI or, you know, integrating with other languages, please drop by our Discord or GitHub repository. Yeah. Nice. Can you hear me, George? Nope. Nope. So yeah. That was really interesting, actually. This I mean, if you had mentioned that sooner, we'd probably had about a twenty minute chat on the client side of Valuer. But I don't wanna keep you too much longer. But it that made me wonder, could we be in a

1:05:38 position six, nine, twelve months from now, right, where my front end application using WebAssembly, most likely, just pulls the OCIR effect with the flags itself and evaluates everything in browser. Or even instead of me hosting Flipt somewhere, can I just embed it maybe free of web assembly again into any application and have the evaluator pull the OCIR effect for me in a regular interval? Like, I have I think that opens up a lot of different runtime applications for Flipt that we just haven't really seen before. I don't know if there's something that that people would be interested in

1:06:11 or want. But if I could, I'd probably try it. Right? Yeah. %. Yeah. I mean and, yeah, not to not to make this go any longer, but we oh oh, sorry. I didn't mean that in negative. On the Wasm front, we have played around with you know how, like, I showed, I briefly showed, like, configuring the rules in the UI or, you know, you can do the same with, with, YAML. Like, what if users could write their own evaluation rules in a language of their choice? Those compiled to Wasm. The evaluator then prox out to that that evaluation time.

1:06:53 So you're not limited to just the the the pieces that we expose in our UI. You can use, you know, any language to define your rules and your rollout strategy. Alright. I'm gonna push this a little bit longer because there's too much here. But this is not your roadmap roadshow for Just because you're talking about using languages to define what those evaluations are. Right? We're talking about expressions and, like, you're writing in Go, which means you're probably in quite a nice position to support something like Sell, like the common expression language, allowing people to rate arbitrary queries against

1:07:24 that as well. And I think I've just there's just so many ideas, man. I could stay here for hours and just talk about all the cool things I would like to try with this. But I think that is definitely a session for another day. So what I'll do is we'll we'll look back, right, early next year. We'll see where Flipt is and and talk about some some fun stuff we could do. Alright. George, it's been a not so much a pleasure, Mark, thank you for joining. Thanks for having us, David. We really appreciate it. Alright. Now

1:07:35 Conclusion and Farewell

1:07:51 it's the end. I'm gonna have the end broadcast button. But just to make it a little bit more fun, the pause is gonna be held in eternity and potentially in the screenshot for this thumbnail. So as I end, prepare yourselves, stay static, and we'll see you all next time. Thanks.

Technologies featured

Meet the Cast

Weekly Cloud Native insights

Stay ahead in cloud native

Tutorials, deep dives, and curated events. No fluff.

Comments, transcript, and resources

More from Rawkode Live

View all 173 episodes

More about Gitea

View technology
gRPC

More about gRPC

View technology

More about Docker Compose

View all 13 videos