Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Explain channels and use the Developer Tools console to manage them.
  • Send events and queries to a pico on custom channels using curl, the event console and a browser.
  • View events and queries in pico logs.
  • Log variables inside rules using log() and klog() functions

Prerequisites

...

Click on New Channel.

Name your new channel Event_Bus_1 with type Pico_Tutorial. Ignore Policy Ignore Channel Policy and Channel Attributes for now.

After double checking that you have the correct information, click install.

...

Raising Events to the Channel

Open the Kynetx Event Console app in a new tab in Google Chrome.

...

Congratulations! You just received your first directive from an event you raised.

Directives allow picos to direct endpoints to react a certain way to an event.  Our rule's directive just says hello, but it could be used to do more complex things. Directives allow the program's logic to be placed in the rules, not in the end points.  Placing logic in the rules provides loose coupling with easier scaling and maintenance.  

...

You have completed Events and Queries lesson ...

Challenges

  1. create Create a new rule that selects on a custom domain, raise an event to your rule and view your new rule in Pico logs to guarantee its firing.
  2. modify Modify hello function to print, "Im alive", after your name.

...