Cola Bubbles run within Cola’s overall messaging architecture. That system includes:
A server-based message store. This subsystem stores all messages and their associated payloads (e.g., the text of a text bubble, the image or video associated with a media bubble, and any bubble-specific payload for Cola Bubbles). Unlike ordinary SMS, or products like iMessage, all Cola messages and conversations are stored (in encrypted form) on the server. The effect of this is that deleting and reinstalling a Cola app will cause all of the messages corresponding to that phone number to be reloaded from the server. Messages are cached locally on a phone, but the master copy is on the server. In the future, this architecture will enable transparent use of multiple devices for a given user.
An iOS app. This app hosts the primary user experience. Cola Bubbles run inside this app in their native manifestation. In the future, an Android app will serve a parallel purpose for users of that platform, and the same Cola Bubbles will run in that environment.
An SMS/Web gateway. Cola currently enables communication with a subset of users who do not have the Cola app installed on their phone. In today’s Cola, this usage mode is enabled for recipients who have US phone numbers — i.e., users who have the Cola app installed can communicate with US users who have not installed the app, as long as the recipient has a phone capable of SMS and has a recent web browser. Certain Cola bubbles have been enabled to work on the web for this purpose; in the future, this capability will be opened to third-party bubble developers.
Separate, external services that offer bubble-specific services. Cola bubbles use external services such as Firebase to maintain consistency between users and to maintain global bubble state (see our example code for how to use Firebase to this effect). Bubbles also can call external APIs for bubble-specific data, functions, and authentication.
While running, a Cola bubble can call external services, as well as certain on-device services (e.g., location) to provide the requisite user experience. They can also send notifications to the conversation. Note: currently, notifications can only be sent by a running bubble. In the future, it will be possible for developers to send bubble-specific notifications without the bubble running.
Cola bubbles can make their way into the Cola app in one of several ways:
During the development process. In this mode, the Cola app acts as a WebDAV server that can be mounted on the developer’s desktop. Bubbles are copied to the Cola app on the iPhone from the desktop, and recopied as developers iterate on the bubble.
During the testing phase. At this point, a bubble developer is testing a newly-built bubble with a team or group. A developer can distribute test bubbles via email, alongside a testing configuration profile supplied by Cola. The recipient of the email needs to open the email on their phone and use Apple’s Mail app on the iPhone to copy the configuration profile and the bubble to the device.
In production. When a bubble is completed and ready to be published, a developer submits the bubble to Cola for approval and distribution. It is distributed to users either by bundling the bubble inside the iOS app (which in turn is downloaded by users from the App Store), or by storing the bubble package on Cola servers, where the Cola app will see the package and download it when a user selects (or receives) that bubble. The download process is automatic and does not require an explicit download or installation step on the part of a user. All it requires is that a user select a bubble (sender side) or receive a bubble.