Skip to main content
1-Visitor
May 2, 2017
Question

How to write custom service in thingworx?

  • May 2, 2017
  • 2 replies
  • 8833 views

Hi Sushant Pandey​ / Ankit Gupta​,

How can I write custom service in thingworx? What I want to implement is for data coming into the platform I need to apply FFT algorithm which can be easily done by using java library. One such open source library is by Apache. Please let me know how can I use this java library and show the data on mash up?

Thanks,

Azim.

Message was edited by: Sushant Pandey branched from https://community.thingworx.com/message/56939#56939

2 replies

5-Regular Member
May 2, 2017

Hi Azim, remembering from your other post How to show Fast Fourier transform for a set of readings from accelerometer in mash up? you plan to use the Java SDK therefore the easiest option for you which I can think off right away would be to create a virtual thing via ThingWorx Java SDK. This will hold your service ​and other properties built using the Java libraries you need for implementing your algorithm. Your actual hardware/device will send data to this virtual thing containing the service to process that data. Once the post processing is done you can then connect to a Thing created out of RemoteThing in ThingWorx Composer via the ConnectedThingClient Component​ your processed data to ThingWorx.

The other option could be that you create an extension using ThingWorx Extension (based off Java SDK) (also there's an  Eclipse Plugin available for ThingWorx Extension )this will contain all the java libraries and services you created for processing the data within ThingWorx using your custom services -finally import this custom extension in ThingWorx so you get all the required services and so on to process the data coming in directly from the hardware/device to ThingWorx.

Hope this helps.

ahawaldar1-VisitorAuthor
1-Visitor
May 2, 2017

Hi Sushant Pandey​,

Thanks for the help. Since FFT algorithm is huge operation, performing this at Java SDK layer which will eventually be installed at a gateway is not a preferred way of doing.  However I can go with other option which is Thingworx Extension. I will go through this and let you know on how I proceed.

Thanks,

Azim

5-Regular Member
May 2, 2017

Sure, I'm not aware of your product architecture but from what you mentioned above sure Extension sounds the way to go for you.

Good luck!

ahawaldar1-VisitorAuthor
1-Visitor
May 3, 2017

Hi Sushant Pandey​,

Waiting for your reply? I am not able to proceed . Please help.

Thanks,

Azim