cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How to connect ThingWorx with external TCP Socket Server

O.R.Natale
10-Marble

How to connect ThingWorx with external TCP Socket Server

Good morning @VladimirRosu ,

 

I've intercepted this thread because I think I have a quite similar need.

 

I have to interface a TWX instance with an external application (an AGV mission server) which accepts only TCP Socket connection (not WebSocket) and requires that the calling app implements a TCP Socket server too according to the attached picture (text is in Italian but it should be clear from the context), where the TWX server should act as the WMS (warehouse management system).

 

Schermata 2023-06-22 alle 08.11.59.png

 

So the question is: is there a built-in way to instantiate a TCP Client/Server connection in ThingWorx? If not, how would you reccomend to proceed to address this case?

 

Many thanks,

Riccardo.

ACCEPTED SOLUTION

Accepted Solutions

Ciao Riccardo,

 

The Extensions I mentioned are essentially server-side plugins for ThingWorx where you can do whatever you want (eg: create a new socket etc).

We have a ThingWorx server SDK, that's available for download from the support.ptc.com portal, and you can create extensions with it, typically using the Eclipse (as we also provide an Eclipse ThingWorx plugin that allows easy creation of such extensions from Eclipse).

Remember always that Extensions live in the ThingWorx process space, so, since they use the platform's HW resources, it is good to look whether an Edge SDK implementation would be better considering your use-case or not.

View solution in original post

3 REPLIES 3

As said in the other thread where this message was originally added, the solutions are one of the two options I suggested there (Extension or Edge SDK implementation, depending on traffic size).

The relatively bad thing in your situation is that you need to implement a TCP Client AND a TCP Server in there. I see here a bi-directionality where our Always On would be far better suited, but if you can't add a ThingWorx Edge component in the V-Manager...that's life.

May I ask if that V-Manager only has TCP as integration options? Nowadays most software suites use other integration options which are a bit higher level, like webservices or databases etc. If V-Manager can integrate via other options, it would be better, since ThingWorx already has Content Loader snippets (that allow to call Webservice endpoints) and also JDBC connectivity by default.

Anyway, this is probably an interesting discussion to have with one of our Solution Consultants in your region - so it would be a good idea to contact your PTC Sales Manager (or Customer Success Manager if there's one assigned to your account) to ask for this.

Hello @VladimirRosu ,

Thanks for your reply.

I don't think we can add ThingWorx Edge component in the V-Manager as it is a third party component on which we don't have control. I will however ask them if they have another protocol available which we may be more comfortable with, as you suggest.

Another option we are considering is to write and deploy a small service (both client and server as you correctly point out) which could translate TCP Socket to WebSocket in both direction (payload is less than 100 ASCII characters).

 

Let me ask you: what are the Extensions you mention? Please let me know as there easily could be options which I'm not aware of (or that I haven't got in the original thread).

 

Cheers,

Riccardo.

 

 

Ciao Riccardo,

 

The Extensions I mentioned are essentially server-side plugins for ThingWorx where you can do whatever you want (eg: create a new socket etc).

We have a ThingWorx server SDK, that's available for download from the support.ptc.com portal, and you can create extensions with it, typically using the Eclipse (as we also provide an Eclipse ThingWorx plugin that allows easy creation of such extensions from Eclipse).

Remember always that Extensions live in the ThingWorx process space, so, since they use the platform's HW resources, it is good to look whether an Edge SDK implementation would be better considering your use-case or not.

Announcements


Top Tags