Skip to content

Implement Asynchronous Processing Using C Async Function #14

Closed

Description

@k2la

Currently, asynchronous processing in this client library is implemented by using NAPI::AsyncWorker.
e.g. https://github.com/apache/pulsar-client-node/blob/master/src/Producer.cc#L89-L120

We used AsyncWorker because segmentation fault about NAPI objects occurred in callback registered with C async function.
FYI: nodejs/node-addon-api#457

The throughput of asynchronous processing using NAPI::AsyncWorker is lower than that using C async function(e.g. pulsar_client_create_producer_async).

Therefore, we want to use C async function in order to make performance better.

Activity

  1. changed the title [-]Implement Asynchronous Processing C Async Function[/-] [+]Implement Asynchronous Processing Using C Async Function[/+] on Mar 14, 2019
  2. pradeep-mishra commented on Jun 17, 2020

    @pradeep-mishra

    any update on this?

  3. nkurihar commented on Jun 17, 2020

    @nkurihar
    Contributor

    @pradeep-mishra
    Sorry, there is no update.
    As described in #56, ThreadSafeFunction may solve this issue but we haven't tried yet.

  4. nkurihar commented on Apr 8, 2022

    @nkurihar
    Contributor

    Now AsyncWorker is replaced with async functions: #200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions