How can WSO2 collect multiples devices from multiples endpoints with the same payload?

96 Views Asked by At

I have 100 devices that do simple calculation. The only way to extract data from those devices is by their REST API. I want to schedule a task every minute to collect every new data from those 100 devices.

Each device have its own API endpoint and all the payloads to collect the data are identical for each device. To be able to invoke the REST API I need to provide a valid token. This token can be acquired by calling the authentication (/auth/token) function from each REST API endpoints with specific usernames and passwords

They have all the same version, so the exact same logic is needed to collect the data. I found out we can use WSO2-ESB to collect data.

What I've done so far:

  • I create an Entreprise Integration Connector for the devices.
  • I create a New Integration project in the Integration Studio.
  • I use the Connector and Schedule a task that do the sequence logic to test data collection from 1 device.
  • Now I need to scale from collecting 1 device to 100 devices at the same time.

How can I collect all devices at once using the same logic with WSO2-ESB?

2

There are 2 best solutions below

1
On

It seems that you have followed the correct approach. Yes there is a significant change between EI 6 series and the EI 7 series. The EI 6 series has the ESB, BPS, MB and Analytics profiles in the same server. The EI 7 series only has the ESB server. For your use case you need the ESB. Therefore you can use either EI 6.6.0 server or EI 7.1.0 server.

If you need to invoke a REST API no need to use a connector. The schedule task and the sequence would be sufficient. To implement the logic for 100 devices we need more information.

  • Do you have different API endpoints for each device
  • Do you need different payloads to get information from different APIs
0
On

It depends what do you want to have on the output - collected data or single per device... As source of your endpoint devices you can use Local-entries, or embedded in scheduler task as message. Maybe you should also look at the Split-aggregate pattern