Async support in extensions

Peter's Avatar

Peter

07 Mar, 2014 11:28 AM

Hello,

do the .NET extensions support async? (with async extensions for .NET 4 / or at least TPL)

Do calls to processCustomSchemeRequest() come in parallel on multiple threads? Or are they queued? Are there limits in the number of calls to processCustomSchemeRequest() that can be processed in parallel?

Does one call to processCustomSchemeRequest() block a second call to processCustomSchemeRequest()?

Are you planning to implement a processCustomSchemeRequestAsync() method?

Best regards,

Peter

  1. Support Staff 1 Posted by Shaun Sullivan on 07 Mar, 2014 01:30 PM

    Shaun Sullivan's Avatar

    We do not officially test for async.

    Yes, requests come in on multiple threads.

    No, we do not have plans to implement async. The underlying Chromium
    engine is highly performant and threaded. What is the specific scenario
    you are looking at? I highly suggest you download and try the free
    hobbyist version to see if it meets your needs.

    Thanks,
    Shaun

  2. 2 Posted by Peter on 07 Mar, 2014 03:25 PM

    Peter's Avatar

    Hello Shaun,

    CEF uses a callback mechanism to do async processing in resource handlers.

    I do not see this in your extension interface, therefore I assume that you block the thread which would degrade Chromium's performance.

    I guess that Chromium limits the number of threads for async requests. If Alchemium blocks those threads instead of using the callbacks to return the thread to Chromium and later post the data once it is available, there are probably limits that you do not see in Chrome or Chromium.

    BTW, I want to access legacy systems in the extensions that might take some time until they return data.

    Before investing time and doing load testing of Alchemium, I would like to know if the internal implementation of the extension mechanism is suitable for heavy usage.

    Thanks!

    Best regards,

    Peter

  3. Support Staff 3 Posted by Shaun Sullivan on 07 Mar, 2014 11:53 PM

    Shaun Sullivan's Avatar

    I think it would be suitable. Obviously, it is hard for me to dive too
    deep without understanding the use case. Ideally you can use AJAX to POST
    to a custom scheme handler from your JavaScript code, and that will be
    implicitly async.

  4. 4 Posted by Peter on 13 Mar, 2014 12:02 PM

    Peter's Avatar

    Hello Shaun,
    can you confirm that the processCustomSchemeRequest method is really called on multiple threads in parallel, so that I could block and wait for a response from the legacy system?
    According to the CEF documentation there is only one IO thread and if you do not use the callback in your CEF RequestHandler implementation, it would block the one and only IO thread and all other requests would have to wait. Or do you spawn separate new threads?
    Best regards,
    Peter

  5. Support Staff 5 Posted by Shaun Sullivan on 13 Mar, 2014 12:18 PM

    Shaun Sullivan's Avatar

    I dug in a little deeper, and in your scenario, it would in fact, be
    blocked until the request completed.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

30 Jun, 2022 03:05 PM
02 Nov, 2021 04:52 AM
16 Oct, 2021 02:38 PM
06 Oct, 2021 05:12 AM
20 Sep, 2021 04:14 PM