developKinberg
developKinberg

Reputation: 383

Communication between REST and UDP server

I have a REST server to handle communication between my database server and Android/iOS devices, the REST server is also able to send push messages via Firebase. My second server is a UDP server, that receive and send messages to a IOT device, both server are written in Node.js and running on different EC2 instances.

Then my UDP server receive a message from the IOT device, lets say some GPS data. Is there a good way to call some methods from my REST server via the UDP server? Or send the data to it ? Are there any ways that the two server can communicate with each other ?

Upvotes: 0

Views: 565

Answers (1)

mihai
mihai

Reputation: 38543

You could implement a separate API on your REST server that would be called from your UDP server.

Interprocess communication is a wide topic, there are plenty of ways to do it, it all depends on your needs.

  • via http
  • via tcp/ip or udp
  • via a database (or even a file)
  • using named sockets (on unix/linux)
  • using a pub-sub library
  • using a message queue library
  • by piping standard input/output

Upvotes: 1

Related Questions