Android Question ZeroMQ wrapping on B4A

DonManfred

Expert
Licensed User
Longtime User
For what you need a second nezworking library?
 
Upvote 0

Noffe

Member
Licensed User
Longtime 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.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
is it raw TCP or Just HTTP/HTTPS ?
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).
handle connections lost transparently
What would you like WebSockets to do in this case that it does not now?
b4a websockets looks not so efficient for connection lost detection
How is it inefficient?
 
Upvote 0

Noffe

Member
Licensed User
Longtime 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
 
Upvote 0

Noffe

Member
Licensed User
Longtime User
How is it inefficient?
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
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0

Noffe

Member
Licensed User
Longtime 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?

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.
 
Upvote 0

Brandsum

Well-Known 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.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0
Top