Starting a SOA Processes by Opening the Light on Your Living Room! Part-0
One thing is amazing about the SOA suite, and specifically a composite application, is the ability to start the processes by event or triggers.
Triggers like creating a file system in a specific folder, or a new JMS message in a queue, or a new record in a database or even a new mail message in a specific mailbox.
But why stopping at this stage, why not to use the internet of things to start integrate with the real world!!!
Things like starting the process once person switched on or off the light in the living room or even start the process when someone enters the room, or even more better when the room tempreture increases above certain level.
The ability to integrate this kind of amazing cool features and make use of this inside the SOA suite specifically and oracle middleware at general is amazing, and here the sky is only the beginning.
In this part I won’t talk about how to do it just yet, I’ll talk about what components do you need in order to be able to do it and how to be able to imagine the whole idea.
What will you need!
- Arduino board
- Miniature photocell
- 1 10k Ohm resistor
- 1 330 Ohm resistor (optional)
- 6 jumper wires (1 of them are optional)
- 1 Yellow LED (optional)
- USB Cable from the Arduino to your computer
- Arduino IDE
- PySerial library in Python
- SOA Suite
Well, that’s the fun part, it’s not really hard.
First you have to assemble a sketch on Arduino in order to capture when the lights is off or on inside a room (using the photocell) and other stuff from the hardware section.
Next we will program that sketch to send this signal using the USB cable to the host machine (That’s your PC or Mac!)
Then we will listen to this from python by using pyserial -We can use java but java requires a lot harder configuration than python, so I went with python-
Make python create a filesystem inside a specific folder that SOA process can listen to.
Make SOA listen to this filesystem.
Let’s slow down, in the next following articles I’ll show exactly how to do it in a great details, so if you didn’t get what I wrote above, don’t worry it’ll be greatly explained in the next following articles.
But for the sake of this article, I’ll show you the Arduino board that will make this trigger works!
Well, see you in next posts (not too far in the future -I hope!-)