Search for answers or browse our knowledge base.
Hello World Tutorial
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Hello World Tutorial
Objectives
This guide is to take a new Vantiq user to the minimum set of steps required to create an event-driven application on the Vantiq platform.
Tutorial Overview
In this tutorial, the developer accomplishes two basic tasks:
- Simulate events
- Ingest and process those events
Step 1: Start a New Project
While not strictly necessary, let’s make sure we’re building our application from scratch. If you’re already seeing a popup asking about what kind of project you’ll be making, skip ahead in these instructions to the popup that you’re seeing.
- From the Projects menu on the Nav Bar, choose New Project. Click the radio button for Add Project in the New Project pop-up, then click Continue.
- Choose Empty for the Project Wizard popup choice, and click Continue
- Finally, give your project a name, and click Finish
Step 2: Create a Topic
Topics are a way to send events within the Vantiq platform. We’re going to create a Topic to simulate events that our Service can ingest and process.
- Choose Add -> Advanced -> Topic in the Nav Bar.
- Click + New Topic in the New Topic popup
- Name: /Hello
- Package: hello.world
- Ignore the rest for now, and click OK
You’ve now made a Topic, which we’ll use to send events to our Service for processing. Leave this pane up for now.
Step 3: Create a Service
Services in Vantiq work much like classic microservices, but with some special characteristics to make them more event-driven and stateful. We’re going to create our own Service to take in and apply logic to the events sent from our Topic.
- From the Nav Bar Add menu, choose Service…, then click on + New Service
- Name: HelloSvc
- Package: Select hello.world from the drop-down, and click OK
Your workspace in the IDE is now a Topic and a Service side-by-side. These are all we need to make our application.
Step 4: Configure the Service to take Topic Events
-
Click on the + next to internal Event Handlers, and select the Add New Visual Internal Event Handler option
The first Activity Task to appear in the Visual Event Handler is labeled Initiate and it is an EventStream task to ingest events. Click on it to select it and a menu will slide in from the right side.
- Next to Configuration, click Click to Edit
- inboundResource: Select topics from the drop-down
- inboundResourceId: Select /hello.world/Hello, then Click OK
- Save the Service to apply the changes
Step 5: Apply Logic to the EventStream
Visual Event Handlers let developers apply application logic requiring little or no code, just by dragging pre-built code blocks called Activity Patterns into the visual event flow. We’re going to add an activity task now.
- From the Actions submenu, click and drag a LogStream pattern onto the Initiate task.
Upon release, LogStream will appear downstream from Initiate.
- Click on the LogStream task, and then Click to Edit to configure it
- Choose the Info log level from the drop-down, then click OK
- Save the Service
Step 6: Make Log Messages Visible
At the bottom of the IDE is a panel for seeing Errors, Log Messages and Autopsies (for debugging). Click on the drop-down and make sure that Log Messages is toggled on.
Step 7: Run the Hello World Application
We’ve got everything in place: A topic for sending an event, a Service listening for that event, and logic to log the message received. Let’s verify that our application works!
- In the Publish Message pane in the Topic window, write a JSON-formatted message. Example:
{
"bread" : "white",
"loaves" : 7
}
- Click the Publish button
- You should see red event badges on the Activity Tasks in the Visual Event Handler in the Service:
And in the Log Messages panel at the bottom of the IDE, you should see the logged message:
Conclusion
Congratulations! You’ve created your first event-driven application on the Vantiq platform, and you didn’t have to write a single line of code! Most of the time, you won’t even need to create a Topic; Vantiq takes in events through integrations with anything that exists on the Internet.
Services take in asynchronous inputs, apply logic to them as the application requires, and outputs the results, sometimes to other Services for further processing.
Application logic can be applied visually, using Activity Patterns that are configured into tasks that are shown as part of the event processing flow. Code can be inserted at any point in the application, using Vantiq’s proprietary language, VAIL.
Where to Learn More
Vantiq provides a suite of Tutorials and Documentation on all different development topics. Just click on the Help button on the Nav Bar and choose Developer Guides.
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
-
Getting Started
-
- Advanced Collaborations
- Analytics
- App Components
- Assemblies
- Catalogs Tutorial
- Client Builder
- Client Components
- Deployment Tutorial
- Floor Plan
- Introduction to Collaboration
- Natural Language Tutorial
- Sources
- Stateful Services
- System Modeler
- Testing the Debugging Tutorial
- Testing the Introductory Tutorial
- Testing the Source Tutorial
- User and Namespace Administration
- Show Remaining Articles ( 3 ) Collapse Articles
-
Product Documentation
-
-
-
- Accessing Documents
- Automatic Document Caching
- Client Resources
- Client Startup
- Control Widgets in the "Views" Portion of Client Builder
- Controllers
- Creating A Client
- Data Objects
- Data Stream Widgets in the “Views” Portion of Client Builder
- Data Streams
- Debugging
- Field Validation
- Introduction
- Launching Clients from a browser
- Layout Widgets in the “Views” Portion of Client Builder
- Localizing Clients
- Navigation Between Pages
- Offline Operation
- On Start Events
- Public Clients
- Server Requests
- Terminating The Client
- The Client Builder Concepts
- The Client Builder's Canvas Section
- The Client Builder's Control Dock
- The Client Builder's Palette Area
- The Client Builder's Slideout Section
- Uploading data to the Server
- Show Remaining Articles ( 13 ) Collapse Articles
-
- abort()
- cancelSpeaking()
- clearInterval()
- clearTimeout()
- clone()
- closePopup()
- confirmCustom()
- confirmCustomEx()
- createClientEventDataStream()
- createDataChangedDataStream()
- createOutboundServiceEventDataStream()
- createPagedQueryDataStream()
- createPublishEventDataStream()
- createResourceEventDataStream()
- createResponseObject()
- createSourceEventDataStream()
- createTimedQueryDataStream()
- data
- deleteOne()
- errorDialog()
- execute()
- executePublic()
- executeStreamed()
- executeStreamedPublic()
- formatMsg()
- generateUUID()
- getCollaborationContext()
- getCurrentPage()
- getCurrentPopup()
- getDataStreamByName()
- getDataStreamByUUID()
- getDeviceId()
- getDeviceName()
- getDocumentAssetLabelList()
- getDocumentAssetList()
- getDocumentUrl()
- getGroupNames()
- getLocation()
- getName()
- getProfileNames()
- getRequestParameters()
- getStateObject()
- getUsername()
- getUserRecord()
- getWidget()
- goToPage()
- infoDialog()
- insert()
- instance
- isNetworkActive
- isPublic
- localeCountryCode
- localeLanguageCode
- localeVariantCode
- logout()
- markupImage()
- modifyClientEvent()
- modifyDataChanged()
- modifyPagedQuery()
- modifyPublishEvent()
- modifyResourceEvent()
- modifyServiceEvent()
- modifySourceEvent()
- modifyTimedQuery()
- navBarBackgroundColor
- navBarForegroundColor
- navBarIcon
- navBarIconHeight
- navBarIconWidth
- navBarShowControls
- navBarTitle
- navBarTitleFontFamily
- navBarTitleFontSize
- navBarTitleFontWeight
- Show Remaining Articles ( 59 ) Collapse Articles
-
-
-
- Accessing Namespaces in the Organization
- Active Resource Control Center
- Adding a New User to an Organization
- Adding a New User to the Application Namespace
- Administrators' Concepts and Terminology
- Authorizing Users to Access the Application
- Creating a Developer Namespace for the Organization Administrator
- Creating a New Application Namespace
- Creating Resources for New Namespaces
- Custom User Invites
- Deploying the GenAI Flow Service Connector
- Developer Tasks
- Handling Administrators Leaving
- Related Configuration
- Removing Namespace Administrators
- Self-Administration Tasks
- System Administration Tasks
- Viewing Lists of Users
- Show Remaining Articles ( 3 ) Collapse Articles
-
- Deploy Results Tab
- Deploying the same application to different environments
- Deployment
- Deployment Tool - Introduction
- Environment
- Environment Tab
- Node
- Project Partitions
- Redeploy On A Failed Node
- Reliable Deployment
- Settings Tab
- The Graph View
- The Tree View
- Undeploy
- Update Partitions
- Verify Application After Deployment
- Show Remaining Articles ( 1 ) Collapse Articles
-
- CheckedInsert/CheckedUpsert Command
- Command Line Options
- Delete Command
- Execute Command
- Export Command
- Find Command
- Help Command
- Import Command
- Insert Command
- Installation - Prerequisites
- Installation - Profile
- List Command
- Load Command
- Recommend Command
- Run Command
- Select Command
- Stop Command
- The Vantiq Command Line Interface (CLI) - Overview
- Upsert Command
- Show Remaining Articles ( 4 ) Collapse Articles
-
- App Execution Dashboard
- App With Split Dashboard
- Dashboard Navigation Bar
- Deprecated Dashboards
- Event Processing Dashboard
- General Dashboard Behavior
- Getting Started with Grafana
- Grafana Usage
- Monitoring Namespaces with Grafana
- Most Commonly Used Dashboards
- Namespace Monitoring Dashboards
- Organization Level Behavior
- Procedure and Rule Execution Dashboards
- Profiling Dashboards
- Reliable Event Dashboard
- Resource Usage Dashboard
- Service Execution Dashboard
- Service Handler Dashboard
- Source Activity Dashboard
- Storage Manager Dashboard
- Tensorflow Model Dashboard
- Type Storage Dashboard
- Show Remaining Articles ( 7 ) Collapse Articles
-
- Access to a Kubernetes Cluster
- Creating a K8s Cluster
- Delayed Processing
- Deploying K8s Installations to a Kubernetes Cluster
- Deploying the K8s Worker
- External Lifecycle Management Guide - Overview
- K8s Worker
- Kubernetes Components of a K8s Installation
- Kubernetes Namespaces
- Loading Images into a Kubernetes Cluster
- Managing K8s Installations
- Other Configuration Options
- System View
- Use of the self Cluster
- Using a Kubernetes Cluster
- Using Templates to Deploy the K8s Worker
- Vantiq Namespaces
- Verify Installation
- Show Remaining Articles ( 3 ) Collapse Articles
-
- Changing the System Password
- Creating a GenAIFlowService Service Connector
- Creating a New Organization and Namespace
- Deployment Methods
- Docker Deployment
- Edge Installation Management
- Edge Vision Server
- Executable JAR Deployment
- MongoDB
- Requirements
- Running the Vantiq Executable
- Setting the default LLMs API key
- Setting Up Vantiq Edge
- Vantiq Edge Reference Guide - Overview
- Vantiq Edge Self Node
- Windows bat file
- Show Remaining Articles ( 1 ) Collapse Articles
-
- Additional Buffer Semantics
- Applicability
- auditFrequency Quota
- Background
- Default Quotas
- Detailed Credit Quotas
- errorBreaker Quota
- errorReportingFrequency Quota
- Execution Credit Quota
- Execution Credit Quota - Diagnostics
- Execution Credit Quota - Mitigation
- Execution Rate Quota
- Execution Rate Quota - Diagnostics
- Execution Rate Quota - Mitigations
- executionTime Quota
- k8sResources Quota
- Quota Interactions
- receiveMessage Quota
- receiveMessage Quota - Diagnostics
- receiveMessage Quota - Mitigation
- reservedGroups Quota
- stackDepth Quota
- Stream Quota
- Terminology
- Workload Management
- Workload Management Conceptual Model
- Show Remaining Articles ( 11 ) Collapse Articles
-
-
-
- Accumulate State
- Analytics
- Answer Question
- App Activity Tasks
- App Builder Guide - Introduction
- App Builder Overview
- Assign
- Build and Predict Path
- Cached Enrich
- Chat
- Close Collaboration
- Collaborations in Apps
- Compute Statistics
- Convert Coordinates
- Creating an App
- DBScan
- Delay
- Dependency Management
- Dwell
- Enrich
- Error Handling
- Escalate
- EscalateState
- Establish Collaboration
- Event Redelivery
- Event Stream
- Filter
- GenAI Flow
- Get Collaboration
- Interpret Conversational Language
- Join
- K-Means Cluster
- Limit
- Linear Regression
- Log Stream
- Loop While
- Merge
- Notify
- Optional Imports
- Polynomial Fitter
- Predict Paths By Age
- Procedure
- Process Intent
- PublishToService
- PublishToSource
- PublishToTopic
- Rate
- Recommend
- RecordEvent
- Reliable Apps
- Run TensorFlow Model On Document
- Run TensorFlow Model On Image
- Run TensorFlow Model On Tensors
- Sample
- SaveToType
- Split By Group
- Submit Prompt
- Threshold
- Time Difference
- Track
- Track Motion
- Tracking Progress
- Transformation
- Unwind
- VAIL
- VisionScript
- Window
- Within Tracking Region
- YOLO From Images
- Show Remaining Articles ( 54 ) Collapse Articles
-
-
-
- Broker Service
- Catalog Operations
- Catalog Procedures
- Connect to Catalog
- Create Entry
- Create Entry
- Custom Operations
- Disconnect from Catalog
- Host Catalog
- Integrating Applications With the Catalog
- Managing Catalog
- Managing Event Types
- Publisher Service
- Register
- Remove Entry
- Repair Catalog
- Resolve
- Subscriber Service
- Unhost Catalog
- Unregister
- Utilities
- Show Remaining Articles ( 6 ) Collapse Articles
-
-
-
- Advanced Use Cases
- Data Manipulation
- Defining Types
- Discovery from External Data Store
- Error Handling
- Installation and Use
- Native Language Implementation
- Restricting Capabilities
- Service Connectors
- Storage Manager Assembly Contents
- Storage Manager Service API
- Storage Manager Transactions
- Storage Managers - Introduction
- Transaction Support
-
-
-
- App Pane
- Autopsies
- Defining a Run Policy
- Defining a Test Suite - Properties
- Defining an Input
- Defining an Output
- Error Pane
- Integration Tests
- Populate Testing Namespace With Data
- Procedure Pane
- Rule Pane
- Running a Test in the IDE
- Running a Test through the REST Interface
- Source Mocking For Tests
- Unit Tests
- Vantiq Testing Reference Guide - Introduction
- Show Remaining Articles ( 1 ) Collapse Articles
-
-
-
- Assign
- Branch
- Categorize
- CodeBlock
- Consensus
- Content Ingestion Flows
- Conversation
- GenAI Builder Guide Introduction
- GenAI Builder Layout
- GenAI Components
- GenAI Flow Properties
- GenAI Flow Tracing and Auditing
- Launching the GenAI Builder
- LLM
- Memory and Conversations
- Merging Task Outputs
- NativeLCEL
- Optional
- PromptFromTemplate
- RAG
- Repeat
- Runtime Configuration
- Semantic Index
- Sub-Flows
- Supported VAIL Language Features
- Using GenAI Components
- Vantiq Provided GenAI Components
- Show Remaining Articles ( 12 ) Collapse Articles
-
- AWS
- Azure OpenAI
- Bedrock
- Configuration
- Function Authorizer
- Gemini
- LLM Playground
- Main Chatting Area
- Navigation Panel
- NVIDIA NIM
- OpenAI
- SageMaker
- Settings Panel
- Testing Semantic Index
- Tool Authorizer
- Tools
- Show Remaining Articles ( 1 ) Collapse Articles
-
-
-
-
- Assembly Configs
- Audits
- Catalog Members
- Catalogs
- Debug Configs
- Delegated Requests
- Documents
- Event Generators
- Groups
- Images
- K8s Clusters
- K8s Installations
- K8s Workitems
- LLMs
- Logs
- Namespaces
- Nodes
- Organizations
- Procedures
- Profiles
- Projects
- Resource Definition
- Resource Events
- Resource Relationship Model
- Resource Security Model
- Rules
- Scheduled Events
- Secrets
- Semantic Indexes
- Service Connectors
- Services
- Sources
- StorageManagers
- TensorFlowModels
- Test Reports
- Test Suites
- Tests
- Tokens
- Topics
- TrackingRegions
- Types
- Users
- Vantiq Resources
- Videos
- Show Remaining Articles ( 29 ) Collapse Articles
-
- Before Rules
- Built-In Services
- Data Manipulation
- Data Model Declarations
- Declaring Packages
- Defining Remote Connections
- Distributed Processing
- Error Handling
- Event Sending
- External State
- Flow Control
- General Use Procedures
- In-Memory State Management
- Iteration
- Logging
- Operators
- Package Scoping and Name Resolution
- Packages
- Packages
- Persistent State
- Procedure Execution
- Procedures
- PROCESSED BY Clause
- Resource Definition
- RETURN
- Rules
- Services
- Syntax
- Type Specific Procedures
- VAIL Declarations
- VAIL Types
- Variables
- Show Remaining Articles ( 17 ) Collapse Articles
-
-
-
Articles
-
- How To Video Shorts: Client Layouts
- How To Video Shorts: AI Functions
- How To Video Shorts: Analytics and ComputeStatistics
- How To Video Shorts: Calling Procedures by Properties
- How To Video Shorts: Client CSS
- How To Video Shorts: Invite Other Users to Your Namespace
- How To Video Shorts: SplitByGroup
- How To Video Shorts: The Vantiq API
- How To Video Shorts: The Vantiq IDE
- How To Video Shorts: The Vantiq Version Control System
- How To Video Shorts: Using Generative AI in Applications
- How-To Video Shorts: Managing AI Conversations
- How-To Videos: AI Design Model Assistant
- How-To Videos: AI Documentation Search
- Production Applications Best Practices