At broadpeak.io, our pursuit for providing seamless streaming customization continues. We’re thrilled to share the next chapter of our journey with the arrival of our second Software Development Kit (SDK), this time coded in the versatile language of Go.

Why Choose Go for our Second SDK?

When you think of robust, scalable, and concurrent systems, Go (or Golang) unquestionably comes to mind. Born out of an explicit need to solve practical problems in 2007, Go was devised at Google by Robert Griesemer, Rob Pike, and Ken Thompson. It marries the performance of C and C++ with the usability of languages like Python and JavaScript.

Go was designed to help fix two tremendous problems at Google:

  • Compile time: Google is building such significant software that they need an incredibly long compilation time. In 2017, Chrome needed 5 hours to rebuild. In order to fix that, Google developed new tools to make these long build times more bearable. These tools split the build process into two parts: figuring out the dependencies and compiling. Enter Go, which can compile without checking dependencies. 
  • String processing: Since it reads and analyzes many web pages (essentially text files), handling text data efficiently is crucial for Google. Consequently, Robert, Rob, and Ken ensured that Go had a rich library of text-handling features. Plus, thanks to garbage collecting, managing text in Go is efficient and straightforward compared to other languages.

Here are some cool facts about Go that you might find interesting:

  • Performances & Robustness: Go’s goroutines make concurrent programming a breeze (indeed, Go has been designed to run on multiple cores). At the same time, its strict compiler and rich standard library enable developers to craft robust applications easily.
  • Kubernetes & Docker: Did you know renowned projects like Kubernetes and Docker are written in Go? The language’s simplicity and performance have made it a darling for system and network programming.
  • Rapid Growth: According to the TIOBE Index, Go has been one of the top programming languages, showcasing its gaining popularity and community adoption. Its simplicity and performance-oriented features make it a preferred choice for many developers and enterprises.

This rich context makes the broadpeak.io’s Go SDK  not merely a follow-up but a great option on the side of our first SDK in node.js, capable of offering the broadpeak.io developer community a range of new possibilities for streaming platform development.

Diving Into the broadpeak.io Go SDK

Like its Node.js counterpart, our Go SDK is crafted to expedite your development on the broadpeak.io platform, ensuring you have more time to innovate while we handle the complexities of streaming, customizing and monetizing media streams. Let’s explore how it complements your projects:

  • Open Source Enrichment: Sharing the same spirit as its predecessor, the Go SDK is open source and ready for the developer community to use, scrutinize, and enhance. Find the goodness over at our GitHub Repository.
  • Thorough Support: It supports all broadpeak.io applications, and in true broadpeak.io style, it will be updated alongside our API , ensuring you always have the latest tools in hand.
  • Community Engagement: We thrive on feedback and contributions. So, whether it’s an issue report, a pull request, or a message of encouragement, bring it on!

Your First Steps with Go SDK

Let’s embark on a small journey to get a glimpse of integrating the broadpeak.io Go SDK into a project:

  1. Installing the SDK: Ensure Go is installed on your system. Retrieve the SDK using “go get”:
shell
  go get -u github.com/broadpeak-io/go-sdk
  • Initiating the SDK: Embed the broadpeak.io SDK into your Go application and initialize it with your API key:
go
  import (
    "github.com/broadpeak-io/go-sdk/broadpeak"
)

func main() {
    sdk := broadpeak.Initialize ("YOUR_API_KEY")

    // Your delightful code comes here!
}
  • Leveraging the SDK: Now, use the SDK to manipulate sources, create services, and maybe craft a new virtual channel using Go’s conciseness and efficiency.
go
	// Creating a VOD Source
	vodSource, err := sdk.Sources.CreateVOD("ExampleVOD", "http://FQDNofyourorigin/your_path_here/index.mpd") 
	if err != nil {
	    log.Fatal(err)
	}
	
	// Crafting a Virtual Channel Service
	virtualChannel, err := sdk.Services.CreateVirtualChannel("MyChannel", vodSource.ID) 
	if err != nil {
	    log.Fatal(err)
	}
	
	// Additional incredible streaming logic, schedules, and operations!

Streaming Ahead with broadpeak.io

In conclusion, our Go SDK is forged with the same care and consideration as our Node.js SDK, ensuring that irrespective of your chosen language, the quality and ease of your development journey with broadpeak.io remains top-notch.

If you are wondering which SDK to choose, please visit this comparison between Node.js and Go. Based on your context, it will help you choose the best technology for yourself.

We’re keeping our eyes peeled for all the fantastic things you’ll build with it. We are here for all the feedback, contributions, and stories you wish to share from your development adventures!

Stay tuned to this channel for more SDKs, updates, and tales from the broadpeak.io universe.

Happy streaming, developers! ??

Mathias Guille
https://linkedin.com/in/mathiasguille
Mathias Guille is the Vice President Cloud Platform at Broadpeak. He leads the strategic development of Broadpeak’s cloud platform, including the building of the company’s infrastructure in the cloud and in public datacenters, the design of Broadpeak’s platform on top of the infrastructure and the shaping of the company’s applications to accommodate SaaS offerings.