Watson IOT Out and In nodes alternating status - watson-iot

Related to that question:
My wiotp out node is on a RPi, the wiotp in node on IBM Cloud. They can connect to the platform using the same credentials, but only one of them is connected, disconnecting after some seconds and vice versa.
What needs to be changed so both remain connected?

If your two clients are using the same MQTT clientId, then they will fight over the same connection. Could that be happening here?

Related

Does blockchain use websocket?

Im programming an application for sharding on a p2p network but p2p networks have some serious problems like forwarding port , static ips and these things get a lot of time for me and it can be so bad for marketing and users.
After all i wanna use smart contract on a blockchain to pay for it.
Does blockchain use websocket for transfer blocks and data and give miners blocks ?
No blockchain's nodes relay transactions and blocks to their neighbours node after that they participate in the validation process.
Ordinary users use wallets which connect to a node, this communication can base on socket or rest api

Force client disconnect by socket id

I'd like to force client disconnect by socket id using socket.io-redis.
I tried a lot of research in google, but methods mentioned in old topics does not work.
Let's say, I'm making clustered application and my code at the moment runs at cluster1 instance (also I have access to all connected client's socket ids), but the client is connected to cluster2 instance. How can I force disconnect to that client by socket id only?
I've implemented it by myself and pulled in the socket.io-redis repo. Method name is remoteDisconnect.

One application on multiple servers

I am developing a web based application that needs to use websockets so the users will be able to see the updates in real time.
However there is something that disturbs me. If there are too many clients simultaniously using the application there needs to be a second server running the same application so some of the users will be redirected to it.
Then how do i make the updates which happen on one of the both servers to be seen on the other one? Do i need to program a tcp connection between both of them and message each other when some update happens???
If your users are connected to both servers (e.g. some users connected to one server and some users connected to another server) and you want to broadcast a message to all connected users from one of the servers, then YES you will need to have the server originating the messasge tell the other server to broadcast a message to all of its connected users. So, YES, the two servers will have to be connected so they can exchange these update commands.
If you had N servers (perhaps where N was even variable over time), then you would probably designate one master server that kept a connection to all the other servers. Then, when any notification was going to be sent to all connected users, a server would simply notify the master server who would then notify all the servers who would then broadcast to all their users. When each server starts up, it just connects to the one master server and that's all it has to now about.
Of course, if you only have two servers, you don't need the master server concept. Each can just connect to the other.

Apart the two hop operation what other differences between Elasticsearch Node Client and Transport Client?

This may have been answered before but I do think their is some other key difference between the two native clients worth mentioning. I summarize what I think is some key differences but also have some questions at the bottom.
The most common knowledge is that Node client joins the cluster as a node and that Transport client requires 2 hop operations.
To take it further "The Node Client connects to the cluster". Actually the Node Client joins the cluster as a node to create a full mesh cluster. I.e: There is two way communication between all the nodes including clients. So anyone can contact anyone. Better explained here: https://www.found.no/foundation/elasticsearch-networking/
The only difference between client node and data node is that the client node does not store data. People should also be aware that the Node client also binds listening ports for the tcp and http transports. This allows it to become a proxy so other clients can connect to it or to serve plugin sites.
The transport client is a client in the purest sense. It doesn't join the cluster and it does not do any kind of port binding and it cannot be connected to and it cannot serve plugin sites.
Also correct me if I'm wrong Node client can also do scatter gather.
Does the Transport client consider routing fields. So if we pass it a routing field we could avoid the two hop? I'm guessing no.
Does the transport client do scatter gather?

Is a hornetq cluster designed to cope with loosing 1 or more nodes?

I know there's HornetQ HA with Master/Backup setups. But I would like to run HornetQ in a non-master setup and handle duplicate messages myself.
The cluster setup looks perfect for this, but nowhere I see a hint to its ability to service such these requirements. What happens to clients of a failed node? Do they connect to other servers?
Will a rebooted/repaired node be able to rejoin the cluster and continue distribution of its persistent messages?
Failover on clients require a backup node at the moment. you would have to reconnect manually in case of a failure to get into other nodes.
Example: get the connection factory and connect there.

Resources