Summary
In this episode, we discuss the blackboard pattern, a software architecture pattern that helps solve fuzzy search problems. We explore its usefulness in tasks like speech recognition, vehicle tracking, and sonar signals, and break down its three main components: the blackboard, knowledge sources, and control.
Detailed Notes
The blackboard pattern is a software architecture pattern that helps solve fuzzy search problems. It's useful for tasks like speech recognition, vehicle tracking, and sonar signals. The pattern consists of three main components: the blackboard, knowledge sources, and control. The blackboard is like a whiteboard where ideas are thrown up and linked to existing concepts. The control part is complex and can be patentable, but the architecture provides a simple way to implement it. The host mentions that the blackboard pattern is a fun little pattern, but not the last one to be discussed. He also mentions that the pattern is useful for tasks where you need to match similar but not identical patterns, and that it's a useful tool for developers to have in their toolbox.
Highlights
- The blackboard pattern is a software architecture pattern that helps solve fuzzy search problems
- It's useful for tasks like speech recognition, vehicle tracking, and sonar signals
- The pattern consists of three main components: the blackboard, knowledge sources, and control
- The blackboard is like a whiteboard where ideas are thrown up and linked to existing concepts
- The control part is complex and can be patentable, but the architecture provides a simple way to implement it
Key Takeaways
- The blackboard pattern is a software architecture pattern that helps solve fuzzy search problems
- It's useful for tasks like speech recognition, vehicle tracking, and sonar signals
- The pattern consists of three main components: the blackboard, knowledge sources, and control
- The blackboard is like a whiteboard where ideas are thrown up and linked to existing concepts
- The control part is complex and can be patentable, but the architecture provides a simple way to implement it
Practical Lessons
- Use the blackboard pattern to solve fuzzy search problems
- Implement the blackboard pattern using a control part and knowledge sources
- Use the blackboard pattern in tasks like speech recognition, vehicle tracking, and sonar signals
Strong Lines
- The blackboard pattern is a fun little pattern
- It's almost obvious and natural
- It's a useful tool for developers to have in their toolbox
Blog Post Angles
- The blackboard pattern: a software architecture pattern for fuzzy search problems
- Implementing the blackboard pattern: a step-by-step guide
- The benefits and drawbacks of using the blackboard pattern in software development
Keywords
- software architecture pattern
- fuzzy search problems
- blackboard pattern
- speech recognition
- vehicle tracking
- sonar signals
Transcript Text
Welcome to Building Better Developers, the Developer podcast, where we work on getting better step by step professionally and personally. Let's get started. Well, hello and welcome back. We are continuing our season where we're looking at software architecture patterns and anti-patterns, and we're continuing our look currently at patterns. Today, we're going to talk about one that I have honestly not run into much, if at all, in the past. I'm not sure that I've ever actually implemented it, but it's one that's out there and one that I think will make sense even if you've never heard of this before, if you consider the type of work that it is aimed at solving. And I think I've probably kept you hanging on the edge of your seat long enough. Today, we're going to talk about the blackboard pattern. The blackboard pattern, now I think I'm going to start with the types of things it works with. And this may help, or at least help you understand why you haven't run into it. This is a pattern that is very useful in doing what is often called like a fuzzy search or a fuzzy solution. An example of this would be things like speech recognition, vehicle tracking, sonar signals, things of that nature where it's sort of open-ended in the search and match approach. You have things that are close enough, I guess is what we'll say. They're close enough in a match that they are a match, even though they may not be identical. And this, you know, like speech recognition is probably the best example because everybody will say a specific word a little bit differently because you have the, you know, you have like a volume, you have their voice itself, you have maybe intonation, particularly longer words. If it's a short word like if, it's going to be closer. If you have a longer word, particularly one that's that has different accents like aluminum or aluminium, depending on who you are and where you say it, or agile and agile, they may, we know they're the same word ourselves usually listening to it and we can tell the difference. Software, we have to have an architecture. I don't have to, but there's, there's an architecture that will help us do that. And it is the blackboard pattern. Now like many of our patterns that we've come across, there's three major, you know, main components to the blackboard. There is the blackboard itself. There are knowledge sources and then there's the control. The blackboard is, hopefully you know what a blackboard is or a whiteboard if you, you know, haven't come across chalk and a blackboard in the past, you could also think of it as a whiteboard and think about this as something that you, if you're brainstorming a basic, you know, something, then what you're going to do is you will throw ideas up on the blackboard. And then as you are discussing stuff, as you are making comments, you're going to potentially, you're either going to have a new concept, you know, like think of a brainstorming. So we're coming up with product ideas. People start talking. We're putting ideas up on the board. Now there may be comments that are made along the way that are really, they're not new products. They're actually something that is tied to an existing product that we've already put up on the board. So we're going to, instead of put another item on the board by itself, we're going to maybe link that to a product idea that we've already mentioned at least and put on the board. Now when you think of this in other approaches like matches, for example, speech recognition, we have these words that we put on the board. We hear a word. And so in this case, just listening to my last sentence, we would put, we hear a word. We've got four things up on the board. Now I may say we slightly differently at a later point, but that's going to match back to the we. It's not a new word. But again, prior sentence, word, maybe that's new. Sentence is new. So as we are working through our solution, the blackboard is helping us ascertain whether this is a new item, a new answer, or whether it's a previously known answer, whether it matches a previous answer. That's what, and the sources are in this case, when we're talking about speech recognition, those are the voices that we're listening to. Those are the discussion streams that we're listening to. And you can think of it even in a sense, in a account of some sorts. If you did a straight up word count on a document, then you're going to have, it's going to be a identical match. So the word document is going to be document everywhere you find that exact thing. But if you want to include misspellings, then you're going to have other ways that it's spelled that are not the exact match to document. And that's sort of when you get into language processing is the word is not, if you look at it from an audio point of view, if you look at that audio wave, it's going to be different. be a change from one to the other, but they still intend the same content, the same word. If I say word or I say word or word, something like that, I have different ways I say it. I'm still trying to get across the concept of word. Now, or actually the word that those four letters in English. You can actually have a different content with our context really, I guess even an implied content because you could say using that, you could say that it is a word or you could say word up or something like that, going to some sling kind of thing. So you actually in that case have different meanings and you have a whole different type of problem there is what think about multiple languages and concepts instead of words. So if I say, if I have like, I put a car in English, well, automobile, even in English is also roughly could be car. And if I go to Spanish, then I'm going to have a different word. If I go to French, I'm going to have a different word. If I go to German, I'm going to have a different word. All of those have the same object, real world object that they're talking about. However, it's going to be different ways to get to that. So you would have a concept up on the board and then you'd have all these other things that point to that concept. Your sources are where you're getting. And then within that, you have this control piece that is going through there and is going through the sources and essentially doing processing of some sort to move those, to translate those to a given solution. So you'd have in speech recognition, you have, let's say like it's listening to podcasts. So it's got this input of words. And then the controller is working its way through these different podcast sources. And with each one, it's listening to this, in these cases, a stream of data. And as it gets stuff in, it is doing some logic to probably convert it in some way to a thing that is similar enough that now it can go look to the blackboard and either say, yes, this is the solution on the blackboard that I want to return back, or this is new and I've got to put something new on the blackboard. So while this is not simple work, the control part can be very complex and patentable type of work, the architecture gives us a simple way to do that, to implement that. And I would think it makes sense to most of us, if I am doing something pattern matching of some sort, then I'm basically going through a source or a bunch of sources and think of something simple like sock matching. As I'm going through, I am looking through this pile of socks and either I have a sock that I have not seen before and so it goes up on the board or I can match it to an existing sock and I have a solution. Or if I have 10 different socks that look the same, I can put it with the same looking sock, and then end up with my five pairs when I'm done. In this case, you would be the sources or the pile of socks. The control is you as you're looking at a sock and deciding is this one that I've seen. And then maybe you've got a collection of pairs that's your blackboard. Somewhere else you've set down the socks that you have looked at and you have grouped them accordingly. So that's a blackboard pattern. It's actually a pretty, I want to say slick sort of approach, but again, it's almost obvious. It's almost natural. So it's one of those patterns that occurs so often in what we do that I think the reason we need a pattern is it's just we do this stuff without recognizing how we do what we do, how we process certain problems, how we as humans solve certain problems. And the blackboard gives us a way to translate that to a software solution. So this is a fun little pattern, but it's not our last one. But it does wrap up this one. This last one, this is it for this episode. And as I said, we'll come back, but we're getting close to where we're going to start talking, look at some anti-patterns for software architecture as well. So it's not all sunshine and roses. There are things we want to avoid and we'll probably see how some of these are misuse of patterns that we have already visited. That being said, I'll let you get back to it though. So go out there and have yourself a great day, a great week, and we will talk to you next time. Thank you for listening to Building Better Developers, the Develop-a-Nor podcast. You can subscribe on Apple Podcasts, Stitcher, Amazon, anywhere that you can find podcasts. We are there. And remember, just a little bit of effort every day ends up adding into great momentum and great success. There are two things I want to mention to help you get a little further along in your embracing of the content of Develop-a-Nor. One is the book, The Source Code of Happiness. You can find links to it on our page out on the Develop-a-Nor site. You can also find it on Amazon, search for Rob Brodhead or Source Code of Happiness. You can get it on Kindle. If you're an Amazon Prime member, you can read it free. A lot of good information there. That'll be a lot easier than trying to dig through all of our past blog posts. The other thing is our mastermind slash mentor group. We meet roughly every other week. This is an opportunity to meet with some other people from a lot of different areas of IT. We have a presentation every time. We talk about some cool tools and features and things that we've come across, things that we've learned, things that you can use to advance your career today. Just shoot us an email at info at develop-a-nor.com if you would like more information. Now go out there and have yourself a great one.