ESC

Type to search...

EVOID vs Others

How EVOID compares to traditional frameworks.

The Core Difference

FrameworkParadigmData Flow
FastAPIOOP + FPRequest -> Response
FlaskFPRequest -> Response
DjangoOOPRequest -> Response
EVOIDIOPIntent -> Pipeline -> Result

Traditional frameworks ask: “How do I handle this request?”

EVOID asks: “What does this data want?”

Feature Comparison

FeatureFastAPIFlaskEVOID
PerformanceHighMediumHigh
Type SafetyPydanticNonePluggable
ValidationDecorator-basedManualPipeline-based
MiddlewareASGI middlewareWSGI middlewareProcessor pipeline
Inter-serviceHTTP/gRPCHTTPDirect function call
InfrastructurePer-endpointPer-endpointPer-Intent level
ExtensibilityDependenciesBlueprintsPipeline extension
Learning CurveMediumLowLow-Medium

When to Use What

Use FastAPI when

  • Building a standard REST API
  • You need auto-generated OpenAPI docs
  • Team is familiar with Pydantic
  • Simple request/response patterns

Use Flask when

  • Building a simple web app
  • You need maximum flexibility
  • Minimal overhead is critical
  • Traditional WSGI deployment

Use EVOID when

  • Multiple services need to communicate
  • Different data needs different infrastructure (payments need PostgreSQL, sessions need Redis)
  • You want pipeline-based extensibility
  • IOP paradigm fits your domain

EVOID + FastAPI

EVOID complements FastAPI. Use both:

# External: FastAPI handles HTTP
from fastapi import FastAPI
from evoid import Intent
from evoid.core.service import call

app = FastAPI()

@app.post("/game/send-message")
async def send_message(player: str, message: str):
    # FastAPI receives HTTP
    # EVOID handles internal communication
    intent = Intent(name="send_message", metadata={"player": player, "message": message})
    result = await call(chat_service, intent)
    return result

This gives you:

  • FastAPI for external HTTP endpoints
  • EVOID for internal service communication
  • Unified engines for validation, serialization, caching

Performance

EVOID pipeline execution is optimized with three code paths:

  1. Fast path — No inspection, no timeout (default)
  2. Timeout path — Adds timeout checking
  3. Inspect path — Full state snapshots

Benchmark: 10K ops/s on a 5-processor pipeline.

Migration from FastAPI

Step 1: Keep FastAPI for HTTP

from fastapi import FastAPI
app = FastAPI()

Step 2: Add EVOID for internal logic

from evoid import Intent, Level, add_intent

PROCESS_ORDER = Intent(name="process_order", level=Level.CRITICAL)

async def handle_order(ctx) -> dict:
    # Your business logic
    return {"status": "processed"}

add_intent(PROCESS_ORDER, handle_order)

Step 3: Gradually move endpoints

@app.post("/orders")
async def create_order(amount: float):
    intent = Intent(name="process_order", metadata={"amount": amount})
    result = await execute(intent)
    return result.value