Migrate from Appweb Skill
Migrate Appweb embedded web server applications to the Ioto platform with API conversion, configuration migration, and verification testing.
Invoke with: /migrate-appweb
Migration Workflow
Appweb Application
↓
Phase 1: Analysis & Planning
↓
Phase 2: Code Transformation
↓
Phase 3: Verification & Testing
↓
Migrated Ioto ApplicationPhase 1: Analysis
- Identify web server configuration, request handlers, and URL routing patterns
- Map authentication and authorization schemes
- Generate a feature comparison matrix with migration effort estimates
- Identify risks and platform-specific code
Phase 2: Code Transformation
API Substitution Table
httpGetParam(conn, "name", NULL) → webGetVar(req, "name", NULL)
mprAlloc(size) → rAlloc(size)
httpWrite(conn, format, ...) → webWrite(req, format, ...)
httpSetStatus(conn, code) → webSetStatus(req, code)
httpFinalize(conn) → (not needed)
httpGetHeader(conn, "name") → webGetHeader(req, "name")Request Handling
c
// Appweb
static void myHandler(HttpConn *conn) {
cchar *name = httpGetParam(conn, "name", NULL);
httpSetStatus(conn, 200);
httpWrite(conn, "Hello %s", name);
httpFinalize(conn);
}
// Ioto
static void myHandler(Web *web, WebRequest *req) {
cchar *name = webGetVar(req, "name", NULL);
webWriteResponse(req, 200, "Hello %s", name);
}Configuration Migration
Converts Appweb appweb.conf to Ioto web.json5:
json5
{
web: {
listen: ['http://*:80'],
name: 'example.com',
documents: '/var/www',
routes: [{
match: '/',
handler: 'file',
auth: 'basic',
role: 'user'
}]
}
}Phase 3: Verification
- Build the migrated application without errors or warnings
- Generate test suites to verify functional equivalence
- Validate configuration, routing, authentication, and protocol compliance
- Benchmark performance against the original Appweb application
Key Differences
- Appweb GC-based memory management converts to explicit R allocation/free
- Appweb's
httpFinalize()/httpFlush()calls are not needed in Ioto - Appweb's multi-threaded model maps to Ioto's single-threaded fiber model — remove thread locks and synchronization code
