SMS Gateway Utilities: Building Voting and Marketing Systems (2008)
Introduction
Back in 2008, before smartphones dominated the mobile landscape, SMS (Short Message Service) was the primary channel for mobile communication and data exchange. During my Year 3 at Singapore Polytechnic, I developed a comprehensive collection of SMS gateway utilities that showcased the versatility of SMS as a platform for various applications including voting systems, marketing campaigns, and automated winner selection.
This project, completed on July 14, 2008, demonstrates how SMS technology could be leveraged for interactive applications through a multi-component toolkit built with VB.NET, C#, and ASP.NET Web Services.
The Pre-Smartphone Era Context
In 2008, the mobile technology landscape was fundamentally different from today:
- SMS was king: Text messaging was the most reliable mobile communication channel
- Universal compatibility: Every phone could send and receive SMS
- Two-way communication: SMS provided instant bidirectional messaging
- High engagement: SMS open rates exceeded 90%
- Cost-effective: Cheaper than voice calls for data transmission
These factors made SMS an ideal platform for interactive applications, leading to the creation of this comprehensive utilities collection.
Project Overview
The SMS Gateway Utilities project consists of multiple specialized components, each designed for specific use cases:
1. SMSGatewayWS - Web Service Implementation
The foundation of the toolkit is a robust ASP.NET web service that provides SOAP-based endpoints for SMS operations.
Key Features:
- RESTful and SOAP interface support
- Send/receive SMS functionality
- Queue management for bulk operations
- Message routing and delivery confirmation
- Provider abstraction layer
Architecture:
Client Applications
↓
SMSGatewayWS (SOAP/REST)
↓
SMS Provider API
↓
GSM Network
Technology Stack:
- ASP.NET Web Services
- C#
- WSDL/SOAP protocol
- Web reference integration
The web service architecture allowed multiple applications to share the same SMS infrastructure, promoting code reuse and centralized management.
2. Voting Systems - Imagine Cup and General Voting
Two separate voting applications were developed to handle different competition scenarios:
Imagine Cup Voting System:
- Dedicated voting platform for Microsoft Imagine Cup participation
- Real-time vote aggregation
- SMS-based vote casting
- Results visualization
- Duplicate vote prevention
General Voting Utility:
- Generic, configurable voting platform
- Support for multiple contests simultaneously
- Customizable voting rules
- Database-backed vote storage
- Administrative reporting
SMS Voting Flow:
User sends SMS → Gateway receives → Validate format →
Check duplicates → Record vote → Send confirmation →
Update real-time display
Key Challenges Solved:
- Duplicate prevention: Phone number tracking and time-based restrictions
- Format validation: Parsing various SMS formats reliably
- Real-time updates: Immediate vote counting and display refresh
- Scalability: Handling concurrent vote submissions
- Security: Preventing vote manipulation and fraud
3. ChooseWinner - Automated Winner Selection
A VB.NET Windows Forms application for conducting fair and transparent prize draws.
Features:
- Random selection algorithm
- Participant database integration
- SMS notification to winners
- Audit trail for compliance
- Exclusion list management
Winner Selection Process:
- Load eligible participants from database
- Apply exclusion rules (previous winners, disqualified entries)
- Generate cryptographically secure random selection
- Log selection for audit purposes
- Automatically send SMS notification to winner
- Update database with winner status
Use Cases:
- Contest prize draws
- Promotional campaigns
- Event giveaways
- Lucky draw automation
4. MS Marketing - Campaign Management Platform
The largest component (5.6MB) of the toolkit, MS Marketing provided comprehensive SMS marketing capabilities.
Core Features:
- Campaign Management: Create, schedule, and monitor SMS campaigns
- Bulk Sending: Efficiently send thousands of messages
- Contact Management: Import/export contact lists from Excel
- Response Tracking: Monitor delivery status and replies
- Template System: Reusable message templates
- Personalization: Dynamic content insertion (name, account info, etc.)
Excel Integration: The application could read Excel files to import contact lists, making it easy for marketers to manage large recipient databases using familiar tools.
Campaign Workflow:
Import Contacts (Excel) → Create Campaign →
Design Message → Schedule/Send →
Track Delivery → Monitor Responses →
Generate Reports
Analytics Provided:
- Delivery success rate
- Response rate
- Cost per message
- Campaign ROI metrics
- Time-based engagement patterns
5. Core Gateway Components - SMSGateway and SMSGatewayHBM
Two versions of the core SMS gateway were included:
SMSGateway (Standard):
- Direct database access
- Windows Forms-based monitoring
- Queue management
- Provider integration
SMSGatewayHBM (Hibernate Version):
- Object-Relational Mapping with Hibernate
- Better data abstraction
- Improved performance for complex queries
- Transaction management
Note: These are the July 14, 2008 versions. The final production versions evolved into components of the Confero Eco-Driving System, my Final Year Project.
Technical Implementation
Technology Stack
Languages:
- VB.NET (Voting systems, ChooseWinner, SMSGatewayWS)
- C# (MS Marketing, SMSGateway)
Frameworks:
- .NET Framework 2.0/3.5
- ASP.NET Web Services
- Windows Forms
- Hibernate ORM (HBM version)
Data Layer:
- SQL Server for persistence
- ADO.NET for database access
- Hibernate NHibernate for ORM
External Dependencies:
- SMS Provider APIs (GSM modem integration)
- Windows Live ID Client SDK (included as WLIDClientSDK.msi)
- Excel integration libraries
Architecture Patterns
Service-Oriented Architecture (SOA): The SMSGatewayWS web service provided centralized SMS functionality that all other applications could consume, demonstrating early adoption of SOA principles.
Queue-Based Processing: Messages were queued to handle:
- Bulk sending operations
- Provider rate limiting
- Retry logic for failed sends
- Priority-based delivery
Provider Abstraction: The gateway abstracted the specific SMS provider implementation, allowing easy switching between different SMS services without changing application code.
SMS Provider Integration
The utilities integrated with SMS gateway providers through:
- API calls: HTTP/SOAP requests to provider endpoints
- GSM modem: Direct serial communication with hardware modems
- Web references: WSDL-based service consumption
Message Format:
public class SMSMessage
{
public string RecipientNumber { get; set; }
public string MessageText { get; set; }
public DateTime ScheduledTime { get; set; }
public int Priority { get; set; }
public string SenderId { get; set; }
}
Real-World Applications
Competition Voting
The voting systems were used for:
- Imagine Cup competition vote tallying
- School event contests
- Community engagement activities
- Real-time audience polling
Success Metrics:
- Handled thousands of concurrent votes
- 99%+ vote accuracy
- Real-time results display
- Zero downtime during critical voting periods
Marketing Campaigns
MS Marketing enabled:
- Product launch notifications
- Promotional offers distribution
- Event reminders
- Customer engagement programs
Automated Draws
ChooseWinner simplified:
- Contest winner selection
- Prize distribution management
- Compliance with draw regulations
- Transparent winner announcement
Challenges and Solutions
Challenge 1: SMS Delivery Reliability
Problem: SMS providers had varying reliability and delivery times.
Solution:
- Implemented retry logic with exponential backoff
- Multiple provider fallback system
- Delivery status tracking and logging
- Manual review queue for failed messages
Challenge 2: Concurrent Message Handling
Problem: Bulk sending could overwhelm the system.
Solution:
- Queue-based architecture with worker threads
- Rate limiting to respect provider constraints
- Priority queue for urgent messages
- Load balancing across multiple connections
Challenge 3: Cost Management
Problem: SMS costs could escalate with large campaigns.
Solution:
- Budget caps and alerts
- Message length optimization (avoiding multi-part SMS)
- Duplicate recipient detection
- Scheduled sending during off-peak rates
Challenge 4: Message Format Parsing
Problem: Users submitted votes in various formats.
Solution:
- Flexible parsing with regex patterns
- Format standardization hints in instructions
- Error messages for invalid formats
- Manual review for edge cases
Challenge 5: Database Performance
Problem: High-volume voting caused database bottlenecks.
Solution:
- Bulk insert operations
- Connection pooling
- Indexed columns for vote lookups
- Caching for read-heavy operations
Evolution to Confero Project
These SMS gateway components served as the foundation for more advanced work:
From SMS Utilities to Confero:
- SMS gateway matured into vehicle alert system
- Queue management principles applied to sensor data
- Database patterns scaled to GPS tracking
- Web service architecture influenced Confero web components
The lessons learned from handling thousands of SMS messages proved invaluable when processing real-time vehicle telemetry data in the Confero Eco-Driving System.
Historical Significance
This project represents a snapshot of mobile technology in 2008:
What was cutting-edge then:
- Web services for SMS
- Automated marketing systems
- Real-time voting platforms
- SMS as a data channel
Modern equivalents:
- WhatsApp Business API
- Telegram bots
- Push notifications
- Mobile apps with real-time sync
While SMS has been largely superseded by richer messaging platforms, the architectural patterns and problem-solving approaches remain relevant. The principles of queue management, message routing, provider abstraction, and real-time processing apply equally to modern messaging systems.
Technical Highlights
Code Quality:
- Object-oriented design
- Separation of concerns
- Reusable components
- Comprehensive error handling
User Experience:
- Windows Forms GUI for administration
- Real-time status updates
- Excel integration for data import
- Clear error messages
Scalability:
- Queue-based architecture
- Multi-threading support
- Database optimization
- Provider load balancing
Lessons Learned
1. Abstraction is Key
Creating a provider abstraction layer allowed easy switching between SMS services without code changes.
2. Queue Everything
Asynchronous processing through queues prevented system overload and improved user experience.
3. Plan for Failure
SMS delivery can fail for many reasons. Robust retry logic and fallback mechanisms are essential.
4. Monitor Everything
Comprehensive logging and monitoring helped quickly identify and resolve issues.
5. User Input is Unpredictable
Flexible parsing and clear format instructions minimized user errors in voting systems.
Modern Perspective
Looking back at this 2008 project from today’s vantage point:
What still applies:
- Queue-based message processing
- Provider abstraction patterns
- Real-time data handling
- Bulk operation optimization
What has changed:
- SMS → Rich messaging (WhatsApp, Telegram)
- SOAP → REST/GraphQL
- Desktop apps → Web/mobile apps
- Manual campaigns → AI-driven marketing
What I’d do differently today:
- Microservices instead of monolithic components
- Cloud-native architecture (Azure Functions, AWS Lambda)
- Modern message brokers (RabbitMQ, Kafka)
- CI/CD pipelines for deployment
- Container orchestration with Kubernetes
Conclusion
The SMS Gateway Utilities project showcases the versatility of SMS as a platform in the pre-smartphone era. Through multiple specialized components - web services, voting systems, marketing tools, and winner selection utilities - this collection demonstrated comprehensive SMS integration patterns and best practices.
While SMS has been largely superseded by richer messaging platforms, the architectural principles remain relevant: queue-based processing, provider abstraction, asynchronous operations, and robust error handling are still fundamental to building reliable messaging systems today.
This project laid the groundwork for more complex work in my Final Year Project (Confero) and provided valuable lessons in systems integration, real-time processing, and user-facing application development.
Technical Specifications
Repository: github.com/tanchunsiong/sms-gateway-utilities
Components:
- SMSGatewayWS (3.5MB)
- MS Marketing (5.6MB)
- Voting (3.0MB)
- Imagine Cup Voting (1.1MB)
- SMSGateway (806KB)
- ChooseWinner (360KB)
- SMSGatewayHBM (196KB)
- WLIDClientSDK.msi (552KB)
Total Size: ~15MB
Files: 205 files
Lines of Code: 16,543+
Technologies: VB.NET, C#, ASP.NET Web Services, Windows Forms, Hibernate
Year: 2008
Institution: Singapore Polytechnic, Year 3
Related Projects
- Confero Eco-Driving System - Final Year Project featuring evolved SMS gateway components integrated into vehicle monitoring system
This blog post documents a collection of SMS gateway utilities developed in July 2008 as part of my Year 3 work at Singapore Polytechnic, showcasing SMS integration patterns and application development in the pre-smartphone era.