Jump to content
mikak

Send message frmo VCL app to another machine in lan

Recommended Posts

3 hours ago, mikak said:
15 hours ago, FPiette said:

Whatever solution you select, I advise you to only use products for which you'll get FULL SOURCE code and you'd never use prebuilt libraries or DCU but instead recompile yourself everything. This is the only way to be sure that in the future you'll be able to have your own product survive to the death of the external product you used.

 

This has been my guideline all the time when talking about delphi code.  and it has saved me couple of times. But sometimes must relay on ready solutions but use those who have large user base.  One just don't have enough time to write everything by himself ( = myself + my team)

My point was not: "Do not use code from other". But it was: "Use code from other only if you get full source code and can recompile EVERYTHING". There are a lot of high quality freeware and commercial products delivering their full source code. Stick with those products and you'll never depend on the people or companies behind them. I use Delphi since version 1 and that has always been by guideline. Working as independent consultant, I saved many companies being stuck with old Delphi version because of the product they depends on and having been stopped.

 

I'm myself author of Internet Component Suite (ICS) which I developed and made freeware with full source code since 1996. A lot of people participated to the development and even after the last 26 years are still developing it actively.

  • Like 2

Share this post


Link to post
11 hours ago, DelphiUdIT said:

If one publish a "retain" message, this message will remain "online" until it will be clean or override (eg. publish another message, retain or not). While the message is retain every one can subscribe and receive it. If the message it's clear or override, it's lost for ALL. MQTT is designed to maintain only the last message. Of course I talk about one "topic", one can publish as many topic as he wants.

Thanks for clarifying, it is important to know that MQTT refers to the MQseries product from IBM and has nothing to do with “message queue“ 🙂  

 

Some introduction posts which might be useful for others:

https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt/ and https://www.hivemq.com/blog/mqtt-essentials-part2-publish-subscribe/

  • Like 1

Share this post


Link to post

Malcolm Groves explains with details about Tethering usage to create your apps communications on network (be the same or not), I think that solve your problem!

At end, the TCP/UDP is used on behind scenes! and Observer Pattern is used to subscribes all members!

http://www.malcolmgroves.com/blog/?p=1842

Edited by programmerdelphi2k

Share this post


Link to post
8 hours ago, mjustin said:

Thanks for clarifying, it is important to know that MQTT refers to the MQseries product from IBM and has nothing to do with “message queue“ 🙂 

MQTT is a standard protocol, define define by IETF RFC2119 and whose communication resources are reserved by IANA (TCP V4 Port 1883 and 8883).

Oasis organization has take care to introduce some "working" improvement (marking them as "non-normative") to really be used in operative production environment (eg. IoT), and is the "the facto standard".

 

P.S.: most of industrial electronic companies make some products compatible to MQTT, like OPC SERVER (often used to communicate with sensors). Often they do that in "modbus" products with which MQTT has vague similarities.

 

Bye

Edited by DelphiUdIT

Share this post


Link to post

We do our communications via Redis. It also has pub/sub, groups and plenty of features we don't use. It also can store data in a file so reboot won't cause loss of records. Communication via sockets. One thing to add, it requires Linux machine.

As a general hint - encapsulate transport level into a generic interface and don't bind to concrete tech throughout your code. This way changing the transport will be just a question of modifying a single unit (App tethering seems like nice example of this approach)

Edited by Fr0sT.Brutal

Share this post


Link to post

I tried to delete it. already answered by me

 

Edited by limelect

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×