Forum

Thread tagged as: Question, Api, Add-on-development

Developing a multi-thread app for Perch

I'm looking to integrate Perch with a 3rd-party application that requires a multi-threaded interface that it can post XML to through HTTP POST. I've heard that I'll have to develop an app to make this possible, but I'm a little stuck on where to start. I've downloaded the Sample App, and I have taken a look through it but I'm still a little unsure of whether this is even possible.

Any advice is appreciated, Thanks

Harry Ray

Harry Ray 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

From the technical description, multi-threaded isn't really the applicable term here. Multi-thread programming is a pretty tricky concept, and very hard to do in PHP. But the description you linked to seemed to be using it to describe concurrent requests, which PHP is obviously very capable of. (You can have more than one visitor to your website at once!)

So don't worry about the multi-thread part so much. You just need to build an app to talk to (and receive requests from) that API.

Great - thanks for clearing that up. After I've received the data - either in PHP or XML, I'll need to parse it. How exactly does integration from a custom-built app work with Perch? Is it done through "<perch:APP_NAME" tags?

Drew McLellan

Drew McLellan 2638 points
Perch Support

So you'd parse it and store it in the database, and then use <perch:appname /> tags in your templates to display it on the site.