Doubt in receiving data

Asked

Viewed 54 times

-1

I have a system on one computer that will send data to another system on another computer. The system that will receive the data will need to read this received data in real time and automatically.

But my question about building the system is how can I make it know in real time and automatically that received the data from the other system?

I use java..

------------------ EDIT ------------------

I’m doing a TCC project, a computer that would stand at the counter of the establishment would have a program that the user registers people’s orders. There would be a button to send the order, then this button would send the order data to a computer that is in the kitchen of the establishment. But in this computer of the kitchen, it would be another system that is "listening" to the arrival of these requests, ie it would have to be automatic to know when a request arrived.

  • How you will send the data?

  • Good study. http://www.devmedia.com.br/java-sockets-criando-comunicacoes-em-java/9465

  • 1

    Assuming it will be a client/server architecture with another client reading the information, if that’s what I understand, you can use Sockets / Threads who will stay ouvindo to process the information.

  • Rodrigo, do you want an indication of technology or do you want a solution ready for your problem? Do these systems already exist or will they be created? By whom? Is it an academic project or a real system? What types of data will be transmitted? What is the nature of communication? Does it need to be answered? Could you better define what would be "real time"? What actions does the other system need to perform and what is the expected response time? Is there any risk if there is delay? There is possibility of there being communication events running simultaneously?

  • I’m doing a TCC project, a computer that would stand at the counter of the establishment would have a program that the user registers people’s orders. There would be a button to send the order, then this button would send the order data to a computer that is in the kitchen of the establishment. But in this computer of the kitchen, it would be another system that is "listening" to the arrival of these requests, ie it would have to be automatic to know when a request arrived.

  • 1

    @Rodrigolima In this case the easiest solution serves: the counter computer saves the order in a shared database and the software in the kitchen computer has a timer that checks the base every few seconds. If for TCC you need to elaborate a more complex solution, then it is better to invent a more complex problem too, where then yes the solution could go through socket or queue system messages.

  • I understood, could you give me an example, of what type of system Socket can be used?

  • 1

    @Rodrigolima Chat is a type of application that although simple makes sense to use socket. Anyway I do not know the objectives or criteria of the TCC right. Suddenly accept the bid of the orders. Only in real life it would be unlikely to invest in a more complex solution to this than simply checking the base. Other options (where I remember having used socket): "real-time" monitoring of industrial equipment, notification of status update on third-party systems, proprietary application server, message queues between systems...

Show 3 more comments

1 answer

1

In real time, it can be difficult, not to mention impossible. Some delay you should have, since you have the network between computers in the middle.

The best way to communicate is a server client architecture, with one of the systems sending and the other receiving data. In Java, it’s worth taking a look at how the Sockets and network part works to send and receive packets in UDP or TCP (communication standard with or without connection).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.