Android Question ZeroMQ wrapping on B4A

Discussion in 'Android Questions' started by Noffe, Apr 23, 2019.

  1. Noffe

    Noffe Member Licensed User

  2. DonManfred

    DonManfred Expert Licensed User

    For what you need a second nezworking library?
     
  3. Noffe

    Noffe Member Licensed User

    Thanks, i need a pub/sub messaging system real time, reliable that can handle connections lost transparently
    b4a websockets looks not so efficient for connection lost detection.
    And ZMQ is TCP and More i think.
     
  4. Noffe

    Noffe Member Licensed User

     
  5. Brandsum

    Brandsum Active Member Licensed User

  6. Noffe

    Noffe Member Licensed User

  7. Brandsum

    Brandsum Active Member Licensed User

  8. OliverA

    OliverA Well-Known Member Licensed User

    HTTP/HTTPS. Socket.io uses WebSockets (when available) for communications. Please note Socket.io preferred communication channel is WebSockets, but if a browser does not have it (back then, many did not), then Sockiet.io provides alternative ways to communicate (over HTTP).
    What would you like WebSockets to do in this case that it does not now?
    How is it inefficient?
     
  9. Noffe

    Noffe Member Licensed User

    Thanks OliverA, socket.io will not help. since its websocket based or http
    I need something more low level, as TCP/IP or UDP
    I want to build a lightweight RELIABLE communication messaging to interconnect, multiples b4a app, either directly by UDP or via a TCP server without broker (most of them dont use websocket, but MQTT)
    ZeroMQ looks fine, i implemented it on server side, but not succeded on B4A side
    Regards
     
  10. Noffe

    Noffe Member Licensed User

    websocket is on top of HTTP, which is on top of TCP
    Network failure makes a big latency (up to 20 sec or more ) before it triggers disconnec or error event
    During this time, you keep sending and losing messages
    Regards
     
  11. OliverA

    OliverA Well-Known Member Licensed User

    Which of the models pointed out in the following link will you be using? http://zeromq.org/whitepapers:brokerless. If you are thinking about going fully broker-less (even without Directory Services), why not just use AsyncStreams to communicate?
     
  12. Noffe

    Noffe Member Licensed User

    It will look like a server as a Directory of Service to manage connecting apps data: IPs and PORTs
    And the app will send directly UDP frame to the final app with those informations

    Plan to use Network library

    1) Yes i am trying to use Network lib and AsyncStreams but i lack zeroMQ STREAM wire format documentation to implement.
    2) I thougt UDP can fit.
     
  13. Brandsum

    Brandsum Active Member Licensed User

    If you want to use low level UDP connection the you can use DatagramSocket.

    Create a server which will listen for packets and a client which will send packets.
     
  14. OliverA

    OliverA Well-Known Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice