|
From: <an...@sp...> - 2018-02-15 23:25:55
|
Em 13/02/2018 12:47, Walter, Stefan escreveu: > Hello André, > > with "database", do you mean a relational (e.g. SQL) database? > > Technically, you could use a database as the communication channel between your vehicle driver and the vehicle(s). However, I don't see how this would help in reducing resource usage. To connect to the DBMS, you would open a TCP connection as well, and reading from and writing to the database might even be more verbose than a simple protocol for directly communicating with your vehicle via a single TCP connection. > > Here are some questions that would help understanding your situation: > > - What exactly in your setup is consuming resources and slowing down your system? > - Do you keep a single TCP connection open all the time, or do you open a new TCP connection for every message sent? > - How are your messages encoded (binary, XML, ...)? > - What size (number of bytes) are the messages exchanged? > - With what frequency (messages per second) are these messages exchanged? > > Best regards, > Stefan > > Von: an...@sp... [mailto:an...@sp...] > Gesendet: Freitag, 9. Februar 2018 20:36 > An: ope...@li... > Betreff: [opentcs-discuss] Using Database and OpenTCS > > Hello, I've developed my driver using a TCP/IP network to communicate with the vehicles. However, it became too slow and consumes too much processing resources from the vehicles and the server which runs OpenTCS. > Once, the application is growing and more vehicles are intended to be added, we decided to move from the TCP/IP network to the use of a database, where OpenTCS would commit the informations and vehicles would query it from there. > My doubt is whether it's possible and viable to implement the use of a database together with OpenTCS. > > Thank you since now > > Best regards > > André > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > opentcs-discuss mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opentcs-discuss Hello Stefan, Thank you for the attention, I have been thinking about using a relational database (MySQL) to improve the performance, once the project may have more than one AGV and we decided to try for a database because we didn't want to be dependent on a single server that would host all client connections. I will try to answer all your questions and hope you can help me. * I believe that the connection is consuming the most part of the resources, once no connection is setted, the resources go fine on their operation. * Yes, I do keep an open communication the whole time and only close it when the vehicle disconnects (i.e: when it shutdows) * I am using messages which are encoded using JSON and the messages do not exceed more than 100 bytes. * The messages are exchanged once OpenTCS releases a new ' MovementCommand ', so, it depends on the time the AGV reaches the intended position (about 5 seconds or more) Also, just to mention, the client is setted using python language, once it runs on a Raspberry PI3. Looking forward to your reply Best regards. André |