Is multithreading or multicore programming supported by MicroStation MDL API?

Are there any newer APIs or existing MDL APIs that work within a multithreaded / multicore programming environment? I have already seen this discussion:

communities.bentley.com/.../60143

But it dates back to year 2010. Are there any new enhancements made meanwhile w.r.t. multithreading, such as reading multiple DGN Elements in parallel?

  • Unknown said:
    Are there any APIs that work within a multithreaded / multicore programming environment?

    For the current version of MicroStation V8i we have what there is, pretty much unchanged since that discussion you saw a few years back.

    As you may have noticed, there is a future MicroStation CONNECT, 64-bit only, that has completely new APIs.  Don't expect too much in the way of multi-threading.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: kaab 

  • Hi kaab,

    Unknown said:
    Are there any newer APIs or existing MDL APIs that work within a multithreaded...

    Today in DgnPlatform API help I found a note "Most DgnPlatform functions are not thread-safe. It is up to the application to ensure thread-safety when sharing hosts among threads." It confirms Jon expectation there are not too many new features in terms of multithreading support in the new API. On the other hand the threads are mentioned on several places in the documentation, so there is some development.

    Unknown said:
    such as reading multiple DGN Elements in parallel...

    It's interesting question. I guess multithreading API will not help too much in this case, because DGN V8 format, based on Microsoft Compound File Format specification, is not multithread optimized. My feeling is the design file scanning itself is pretty fast as it's a linear process, but what makes it slow potentially is a processing of scanned elements. If a huge amount of elements have to be processed, you can implement own process dispatcher, so element data will be passed to separate process(es) and a next element can be scanned immediately. On the other hand it's a question how big benefit it will bring, because you have to copy all necessary element data into separate process, not only element reference (the process cannot call MicroStation API directly to receive additional data) and to start and manage processes also requires some processor time.

    My opinion based on limited experience (I am not multithreading development expert) is to pass all steps (ensure the workflow can be parallelized, find a proper way how to do it, find a proper language constructions and tools) is pretty tough task.

    But anyway, despite of you have to implement own multithreading code and hide it from MicroStation API, new CONNECT Edition API is much better comparing to V8i at least because Visual Studio 2013 is used, which offers many new features in terms of parallel programming comparing to Visual Studio 2005.

    With regards,

      Jan