The future of AutoCAD

Yesterday was a big day for the AutoCAD product. A multi-year engineering project – started in the AutoCAD team way back when I was part of it – culminated in its first deliverables getting into the hands (or, in this case, browsers) of customers.

The AutoCAD team has been working on a project codenamed "Fabric" for the last several years. It's has been a huge amount of work – something I'll hopefully get into in a future blog post – but it's finally bearing tangible fruit. In broad strokes the work was to take the core of AutoCAD and make it cross-platform. You might consider the Big Split – work that was done ostensibly to build AutoCAD for Mac but resulted in a Core Engine that became the mechanism through which developers could run custom code in the cloud via AutoCAD I/O (now part of Forge's Design Automation API) – to be the first phase of this effort. At the very least Fabric stood on the shoulders of the Big Split.

The Big Split was a significant effort that resulted in code that could be cross-compiled on both Windows and OS X. It did so via various techniques, some of which were less than ideal with the benefit of hindsight (such as using #ifdef statements in various places to have conditional compilation on the two platforms). Fabric has done away with #ifdefs, forcing any platform-specific code into a PAL (Platform Abstraction Layer) per targeted platform. And Fabric is able to target more than just Windows and OS X. Some of the main targets were the established mobile platforms (more on that down the line), but one major effort was to target the web platform with the AutoCAD codebase.

Yes, you read that right… yesterday's update to AutoCAD Web now runs the same core code as standard AutoCAD, but in a browser. A major part of AutoCAD's C++ codebase gets run through Emscripten (at least that's my understanding – I'll correct any details I get wrong) to be transpiled into WebAssembly. This is huge. We're finally able to have a single codebase that results in the same AutoCAD core technology working inside a web browser.

AutoCAD Web powered by AutoCAD core technology

There are still significant gaps between the browser-based version of AutoCAD and its desktop-based sibling – 3D being a prime example – but these gaps will reduce, over time. It will also be much easier for the AutoCAD team to build new features that work across the range of AutoCAD's platforms.

An interesting anecdote is around the recently discovered processor vulnerabilities – Meltdown and Spectre – and the impact these had on the project. Support for WebAssembly in modern browsers required the use of SharedArrayBuffers – a technology that's vulnerable to Spectre. The AutoCAD team worked with the Chrome team to identify an alternative approach: after some nervous weeks of people having to use browser flags to force the availability of SharedArrayBuffers, AutoCAD Web once again works as well as it did before the vulnerability was discovered.

In an upcoming post I'll talk more about the Fabric project, and what was involved: I know this blog's readership will find the details interesting. The important thing for me in this whole effort is that it brings significant potential for a future where external apps and customizations could work on a wide range of platforms. This would be nirvana for developers who have spent many years investing in building desktop-centric knowledge and intellectual property. This isn't necessarily something that's coming in the near-term, but the promise is there, and it's very exciting.

Update:

I've received some clarification from the AutoCAD team about the use of SharedArrayBuffers in WebAssembly. Apparently they're not strictly required for WebAssembly to function (of course), but we originally used them to support certain synchronous retrieval operations the AutoCAD codebase has to perform. Many thanks to Kevin Cheung for providing this information.

31 responses to “The future of AutoCAD”

  1. Андрей Михайлов Avatar
    Андрей Михайлов

    Great post, Kean! Very,very interesting!

  2. Cross-platform without Linux (the superior OS) support... Is it a joke?

    1. Kean Walmsley Avatar
      Kean Walmsley

      No, it's not a joke. That's not to say it won't one day be targeted, of course. So keep banging that drum! 🙂

      Kean

    2. not even Firefox on Win

      1. Kean Walmsley Avatar
        Kean Walmsley

        It's coming (see my other comment).

        Kean

    3. Rick Denantry Avatar
      Rick Denantry

      AutoCAD for Unix was available up until around 2001, or whenever R13 went out of support. Apparently those skills were lost, and instead of being rediscovered, we're getting Chrome-only (not Edge, not Firefox, not Safari) and pretending that's portable.

      Oh well.

      1. Kean Walmsley Avatar
        Kean Walmsley

        It's on its way. It's mainly timing related.

        I'm always surprised when people get caught up on specific platform availability. It reminds me of the Louis CK sketch where he talks about the miracle of flight. (Yes, I do know he's since been disgraced, but that sketch is completely on-point.)

        *This is a 35-year-old multi-million-line codebase working in a browser.*

        Kean

        1. Given how ridiculously locked down dwg format is, I think it's pretty obvious what will become of this Linux or Firefox support.

          Kean, you're working for the bad guys.

          1. Kean Walmsley Avatar
            Kean Walmsley

            Firefox is more likely than Linux, admittedly. We'll see whether customer demand for Linux support increases enough for it to become a priority. Not my area, though, of course.

            I don't see how the openness of DWG relates to Linux/Firefox. Seems like a religious discussion. As does the point about good vs. evil, for that matter.

            Kean

        2. Ondřej Pokorný Avatar
          Ondřej Pokorný

          I understand your point, love to see AutoCAD on the web and can imagine the tremendous amount of work that went into this. Though web's core philosophy and biggest advantage from the beginning is that it's multi-platform. Selective support is a mindset from the old world. The investment to support other (evergreen) browsers should be relatively small compared to adding supporting of different OS. Ideally, nothing should be developed for any specific browser ever. Browser vendors and standardization bodies are working really hard on it. User expectation is that when it's on the web, they can use it anywhere. That's why are people caught up on that. When users have to use specific OS (or browser) what's the point of web app in the first place?

          1. Kean Walmsley Avatar

            I understand where you're coming from. But right now the implementation of emerging standards (such as WebAssembly) is inconsistent across browsers. Add to this the fact that AutoCAD is an extremely complex application, and the idea of announcing broad browser support from Day 1 isn't realistic. Of course nothing has been implemented specifically for Chrome (that would be silly), and it turns out Firefox already works (just isn't yet officially supported), so I'm sure that in time we'll be able to announce that it works across all standards-compliant browsers.

            You also have to bear in mind that our customers are also working with their core IP in our tools... they have understandably high expectations for consistency and visual fidelity (etc.). They would (I believe) rather have expectations set conservatively for browser support initially than have a nasty surprise when working with their designs on a browser that (for instance) hasn't fully implemented a feature that AutoCAD relies upon.

            Try not to get caught up on this issue. It's really a short-term situation that will work itself out. There's nothing being done here that doesn't fit with the web's core philosophy.

            Kean

        3. Platform independence is the entire point of a web browser, though.

          Making an application run in a browser, but only one browser / operating system, is like driving a 737 fuselage down the road. Yes, you are technically in an airplane, but it's missing any benefit of that technology, because you can only go to one place (the other end of that road), and not very fast.

          Maybe someday you will be able to attach wings to it and make it fly, but let's not brag about "flight" just yet. A 737 without wings is just a slow and awkward bus, and a web app that only runs in Windows Chrome is just a desktop app with a strange distribution mechanism and a weird UI.

          1. Kean Walmsley Avatar

            Your analogy might work if it was a strategic choice to only support one browser/OS combination. It's not. It's just a question of timing...

            keanw.com/2018/0...

            Kean

  3. Kean,

    Am I reading this right? Do you guys now have a portable codebase between Windows, Mac, and Web? Bravo. For an old man like AutoCad to be reimagined is super impressive. Hat tip to you and the team.

    Will this codebase be used for any iOS or Android work in the future? Just a curiosity. The iOS side should be much easier, I would think, than moving to Android, but I could be wrong.

    Also, is the Windows version still using the Windows API or have you taken advantage of WinRT? That kind of seems like a natural direction to go if you're going to stay on Windows, but maybe not?

    I hope you'll share some details about how you decided to build your PAL. As an old C++ developer I know some of these platform pitfalls and the ugliness introduced by #ifdef's. I have a tack I've taken to do this sort of stuff and I'm curious to see how your team did it for an application as large and daunting as AutoCad.

    Congratulations!

    1. Kean Walmsley Avatar
      Kean Walmsley

      Thanks (although it really wasn't anything to do with me, personally - I'm off doing other things).

      Yes, AutoCAD Mobile will (if it doesn't already) use the same codebase on Android and iOS. And I'm pretty sure that UWP was one of the first platforms the team targeted. Again, I'm not 100% sure on that.

      I'd like to have the Fabric team comment on their PAL work, in due course... I'm planning to gather some info at an upcoming internal technical summit.

      Kean

  4. This don't work on Chrome 66.0.3359.170 (x64)... uploads.disquscdn.c...

  5. This is great! Having been involved in CAD software development myself, I appreciate the hard work and collaboration that goes into making such feat happen.

  6. No native Linux, I can understand, but do you know why there is no support of Autocad Web in chrome on linux ?
    There is native code in the web version ?
    I'm not totally aware of what webassembly implies but it seems not platform specific.

    And yes, migrating a so old product like this to web is impressive !.
    I first used Autocad 30 years ago when it was running on 2 5"25 floppy discs :).

    Thanks.

    1. Kean Walmsley Avatar

      I don't see anything about it not being supported on Linux... Chrome on any 64-bit platform should work, as far as I can tell.

      Kean

      1. I have chrome stable version 66.0.3359.181-1 on ubuntu 16.04.
        It is the last (stable) version available on google repositories.
        But I have "The AUT uploads.disquscdn.c... OCAD web app is currently only supported by an up-to-date version of 64 bits google Chrome on Windows or Mac.".
        The help link doesn't speak about windows/mac restriction :
        help.autodesk.com/v...

        1. Kean Walmsley Avatar

          What happens if you "Go to the File Manager"? Does it do anything?

          It could well be that it hasn't yet been officially tested, but works just fine... or then maybe not.

          Kean

          1. On File Manager it works, yes,
            I can list my drawings and view them.
            But I can't edit : I have no subscription.

  7. a cloud based AutoCAD is not interesting for corporates. Will it work in local without internet connection (of course)?

    1. If you subscribe to the notion a single firewalled garden is safer than various internet connected services then google has just the paper for you.

      cloud.google.com/be...

      1. Are you sure that corporates can use their own cloud and they will not use amazon or other USA-based servers? Obviously nobody can trust any service if it's based in a foreign country... It has very little to matter if it's "safe". Every corporate has its own policies!

    2. Kean Walmsley Avatar

      It's not intended for people or companies who aren't Internet-connected. They would probably be better sticking with our desktop tools.

      Kean

      1. I really love Autodesk Fusion, but my work is teaching CAD tools and I see that a really little little percentage of my customers will use it in their work environment. It's perfect for other people (enthusiast, private or individual or little business teams, etc.), but no use for big corporates that usually have firewalls and other tricky things or simply have strict policies about storage (many have systems to trace if files are copied to USB, imagine if they will store them in the cloud). I really hope that, as you say, a desktop version will always be there...

  8. Kean, could you say more about alternative aproach to the SharedArrayBuffers? And how you addressed browser memory limitations (2GB on chrome and 1,5GB on firefox)

    1. Kean Walmsley Avatar

      I don't know the specifics... I seem to recall some discussion of using Service Workers, but I'm not on that team and could easily be mis-remembering.

      Kean

    2. Bobby Bittman Avatar

      infoq.com/prese... is a great video about how they did it all

      1. marsjaninzmarsa Avatar
        marsjaninzmarsa

        Just came across - nice timing, thanks! 😅

Leave a Reply to fahrni Cancel reply

Your email address will not be published. Required fields are marked *