Originally published at: Particle Logic beta is now available - Particle Changelog
Hello Particle Community!
Big news: as of 12pm PT today we’ve rolled out a new feature called Logic. It’s in beta, so we recommend using it for non-production projects right now. The beta is available to all Sandbox users, you can access it via the Logic icon on the sidebar of your console.
What is Logic?
- Runs in the cloud, so you can update it without updating your firmware.
Current Beta Limitations:
- Available only in the developer sandbox.
- Limit of 20 Logic Functions per sandbox.
- Maximum 5 triggers per function and 30 seconds execution time.
- Run logs kept: 100 per function.
- Decode and decompress data in the cloud, expanding your publishes to integrations beyond the 1024-byte limit.
- Trigger more complex processes than what’s possible with webhooks alone.
- Translate events from older firmware to newer cloud services, or vice versa, which gives you a cloud-based compatibility layer.
Try it out today! If you have any questions or feedback let us know in this thread. We’re eager to hear your thoughts!
@Colleen - Decode and decompress data in the cloud - could you please expand upon this in terms of a use case example?
Logic can be triggered from an event generated by a device. That event is limited by the maximum event size, typically 1024 bytes.
The connection between Logic and webhooks, however, is not limited to 1024 bytes. That means you can expand shorted JSON key names, or use data compression on the data from the device but expand it before going to the destination server. It's mentioned briefly in the vendor libraries section, but there will be an example later that uses unishox2, an algorithm that is good for compressing short text strings (like JSON values).
Thanks - I wasn't thinking about decompression of JSON text keys - so you are saying that there will be specific binary data compression and decompression examples? I assume that the Logic can ingest 1 event and decompress into many JSON compatible events - is rate limiting applied?
Yes, there will be compression examples. Rate limiting still applies to the data coming from the device, but if logic fans out an event into one or more events, the subsequent events are not size limited, are not rate limited, and are not counted as a data operation. This is the case for the logic beta, pricing and availability could change in the future.