High level Tcp-ip

I'm developing a client-server application: a daemon that manages a database and a serie of files and printers, and a client that connects to this daemon and shows data received and send queries to the daemon.

the client runs on a different machine, and there will be many clients on different machines.

I would not use tcp-ip for communication between client and server.

are there some crates in rust that send and receive data (structs would be the best, but i can accept to serialize them), a little more "higher level" than pure tcp-ip?

i would not use http webapps, microservice or similar, just a tcp-ip encapsulation.

thank you very much.

Most of the world is using HTTP for doing what you describe. The clients typically being web browsers but not necessarily.

There are hundreds of other options, We use NATS for such things: https://nats.io


Sorry, I just re-read your post and saw you wrote:

i would not use http webapps, microservice or similar, just a tcp-ip encapsulation.

So I have to ask why not?

Never mind the "micro service" thing. That is just a way of dicing up functionality. Which you may not need if a single server process can do what you want. Although it could be argued that if your process is talking to databases, file servers and printers they are "micro services". It's in the nature of what you are wanting to do.

I'm not sure what you mean by "tcp-ip encapsulation". But that sounds like wanting to use an abstraction layer above TCP/IP that hides the details of it and provides convenient functionality on top of it. Well HTTP is such a layer of abstraction or "encapsulation" as you say. MQTT, NATS, and many others provide different abstractions that may or may not be appropriate for your needs. Why would you discard HTTP out of hand?

1 Like

maybe some JSON-RPC, or gRPC implementation?