Linux Relay Development
Sometimes progress seems to happen at a snail’s pace, and at other times progress is breathtaking. Our Linux development efforts started out slow, but recently the pace has quickened and I’m truly excited to watch our progress unfold. Hang on, things are about to get a little crazy at VoIPTools (if it hasn’t already been crazy here for the last year or more).
As one of the lead programmers here at VoIPTools (yes, I still have my pet projects), I’ve had to retool my skills honed over the last 37 years to get up to speed developing for Linux. On one hand, the code has been pathetically simple, and on the other hand, I’ve never felt more like a fish out of water.
Going back many decades I was once a Unix administrator for a large government entity. So you would think it wouldn’t be such a challenge for a Windows guy to get back up to speed again on Linux. Well, that old experience has come in handy, but what do they say about all dogs learning new tricks? It’s been a challenge at times.
I’ve been so close to completing the technical aspects of our new Relay that this 3-day holiday weekend I decided to pound through the remaining issues and get it done. Happily, I completed the last really hard technical issue on Monday. Yeah, that’s what nerds do when they have a 3-day holiday — play!
The real bug-a-boos for me have been (1) making the Linux install easy for people who know nothing about Linux, (2) make the event broadcast/subscription pattern easy for our development team, and (3) getting one codebase to work seamlessly on both Windows and Linux. The last one (#3) was the last hurdle to overcome. You could probably hear me cheer when I got our Relay to run both on Linux (as a daemon) and Windows (as a service) with the same code. It was epic (from my perspective).
So, as with any new release of a technically challenging product that is core to our entire business, we have to take baby steps as we look at releasing tools that utilize the new Relay. Next week we install our first custom product using the Relay. We still have optimizations to perform, and certainly some refactoring, but you can’t imagine how excited I am to have the core of the freaking Linux Relay ready to turn over to the full development team.
For you fellow geeks that care about some of the guts, here is a peek into what’s different about the old and new Relays. The original Relay was written with WCF at the core (pardon the pun). This was an awesome architectural decision. It has been rock-solid from day-1. But… the security restrictions imposed by WCF proved to be a real challenge to configure in some environments (ok, many). With 3CX in the cloud and VoIPTools on-prem (as one example) getting everyone to play nice could be a challenge.
The industry has changed since we first architected the Relay. We have all moved from SOAP to REST and that’s what’s primarily different about the new Relay… it’s based on REST. I can hear the gears turning in your head. That’s right, REST. So, you are wondering… will there be a new REST API? The answer is YES! And this will not be a little API, this will be a HUGE all-inclusive API, and YES we plan to make it public. Do you hear the cheers from all the programmers around the world? Yup, I heard it too.
But REST doesn’t do event broadcasts, what about that? That’s been handled by SignalR and Websockets. If you could see the amount of code that has been ripped out of the Relay and the huge simplifications to the remaining code, you would be cheering too. The Relay used to be one of those applications that everyone (including me) hated to touch out of fear of breaking something. Now with the new REST API, the patterns are so easy to follow that even junior programmers at VoIPTools will be able to make changes. You just can’t imagine what this means to future development at VoIPTools. THIS IS HUGE.
Now I’m the first to admit that I get a little excited by new releases, and I have to back peddle a little and be a little more forthcoming about where we are with the new Relay and what that means to the release of Linux compatible versions of our commercial tools. We still have a ton of work to do on the Relay to make it “production ready”. If you twist my arm, I would say maybe a month or a little more to get it ready for prime-time. But that’s only part of the story. As a very brief retelling of how our tools work with 3CX — let’s review… Our products (Recording Manager, On-Call Manager, Emergency Notifier, etc.) don’t talk directly to 3CX, they talk to the Relay and the Relay talks to 3CX. That happens in both directions. I’ll not detail the “why” here, but trust me, the Relay was probably the single best decision we ever made at VoIPTools. So when we replace the Relay, we have to make some changes to our applications, right? Yes, that’s true. But I’ve gone to great lengths to minimize the necessary code changes. For example, the old Relay command for MakeCall was VoIPToys.RelayServices.MakeCall. The same command for the new Relay is VoIPTools.RelayServices.MakeCall. As you can see, that’s a pretty minor change.
There will be other changes necessary. For example, Recording Manager accesses 3CX recordings via a Windows shared folder. Obviously, that’s specific to the Windows platform. Sure, I could do the same thing with Samba, but rather than add that complexity, we now expose the recordings through the Relay. Therefore, gone are all the hassles of setting up shared folders and the necessary cross-domain security challenges that come with that technology. The Relay runs on the 3CX server and the recordings are on the 3CX server, so security becomes pathetically simple. And I have a ton of code we can strip out of all our applications that were required for setting up security and authorization. Now I hear all our customers cheering!
Initially, only the Relay will be Linux compatible. Our applications will still run on Windows. Eventually, it seems likely we will port all of our tools over to “Core” so they can run on both Windows and Linux, but that’s down the road a little farther. Baby steps right?
We have so many initiatives I would love to pursue/complete (our cloud platform for example), but the Linux market has blown up over the last 2 years and I had to make a choice. It seemed logical that we focus on the Linux Relay first since that’s going to be needed to fully embrace our cloud initiative. Once we have all our tools working with the Linux Relay, I’ll pause, take a breath, then decide what the next big thing is at VoIPTools.posted on September 6, 2018
Whether through one of our commercial products, or a custom solution built to meet your specific needs, we can help you get the most out of your 3CX investment. Call us today!Contact Us