วันจันทร์ที่ 27 กรกฎาคม พ.ศ. 2569

Integer Linear Programming (ILP)

Integer Programming (IP) is a branch of mathematical optimization in which some or all decision variables are constrained to take integer values. It is widely used to solve decision-making problems where fractional values are not meaningful, such as selecting projects, assigning employees, routing vehicles, or placing servers.

General Form

An integer programming problem can be written as









Most practical IP problems have linear objective functions and constraints, leading to Integer Linear Programming (ILP).

Example

Suppose a cloud provider wants to decide how many servers of two types to deploy.

Let:

  • (x_1) = number of Type A servers

  • (x_2) = number of Type B servers








The solution might be:

  • (x_1=4)

  • (x_2=4)

rather than a fractional solution such as (x_1=3.7), which is impossible because you cannot purchase 3.7 servers.

Types of Integer Programming

TypeVariable TypeExample
Pure Integer ProgrammingAll variables are integersNumber of servers to deploy
Mixed Integer Programming (MIP/MILP)Some variables are integers, others continuousNumber of servers (integer) and bandwidth allocation (continuous)
Binary Integer ProgrammingVariables are only 0 or 1Cache an object (1) or not (0), select a data center

Binary variables are especially common because many engineering decisions are yes/no choices.

Why Integer Programming?

Many real-world decisions are inherently discrete:

  • Build a data center or not.

  • Cache a file or not.

  • Assign a request to one server.

  • Schedule an employee.

  • Select network links.

Linear programming (LP) may produce infeasible fractional solutions, such as assigning 2.4 virtual machines or 0.35 of a cache replica, whereas integer programming enforces realistic decisions.

Applications in Computer Science

Since your work involves cloud computing and cache optimization, integer programming is particularly useful for problems such as:

  • Cloud resource allocation: deciding the number of virtual machines or servers.

  • Content placement in CDNs: determining which objects should be cached at each edge server (often modeled as binary variables).

  • Virtual machine placement: assigning VMs to physical hosts while satisfying CPU, memory, and network constraints.

  • Task scheduling: assigning jobs to processors.

  • Network design: selecting links or routers to activate.

  • Facility location: deciding where to place cloud regions or edge servers.

Solving Integer Programming Problems

Unlike linear programming, integer programming is generally NP-hard, meaning there is no known polynomial-time algorithm that solves all instances optimally.

Common exact methods include:

  • Branch and Bound

  • Branch and Cut

  • Cutting Planes

  • Branch and Price

For very large problems, heuristic and metaheuristic methods are often used:

  • Genetic Algorithms

  • Simulated Annealing

  • Tabu Search

  • Ant Colony Optimization

Relationship to Linear Programming

Mathematical Programming
│
├── Linear Programming (LP)
│     Variables: continuous
│
└── Integer Programming (IP)
      │
      ├── Pure Integer Programming (IP)
      ├── Binary Integer Programming (BIP)
      └── Mixed Integer Linear Programming (MILP/MIP)

In summary, integer programming extends linear programming by requiring some or all variables to be integers. This makes it much better suited for discrete decision problems encountered in cloud computing, networking, scheduling, and cache optimization, although it is computationally more challenging to solve.

วันพุธที่ 22 กรกฎาคม พ.ศ. 2569

AWS Partyrock

PaaS for automatic App development via LLM and execution platform. https://partyrock.aws/education

It’s equivalent to using Gemini to create app source code and run it manually on https://www.w3schools.com/html/tryit.asp?filename=tryhtml_editor

วันอังคารที่ 21 กรกฎาคม พ.ศ. 2569

Tech stack for webapp development in 2026

 The modern web development ecosystem has largely converged around a few popular technology stacks. The “best” stack depends on the application, but these are the most common choices today.

1. Frontend (what runs in the browser)

The dominant framework is React.

Other popular choices include:

  • React (most popular)
  • Angular (common in large enterprises)
  • Vue.js (popular for simplicity)
  • Svelte/SvelteKit (growing in popularity)

Languages:

  • TypeScript (now preferred over plain JavaScript)
  • JavaScript

UI libraries:

  • Tailwind CSS
  • Material UI
  • Bootstrap


2. Backend (server-side)

Several ecosystems are widely used:

Language

Popular Framework

Java

Spring Boot

C#

ASP.NET Core

JavaScript/TypeScript

Node.js + Express or NestJS

Python

Django, Flask, FastAPI

Go

Gin, Fiber

PHP

Laravel

Typical choices:

  • Spring Boot for enterprise applications.
  • ASP.NET Core in Microsoft-centric organizations.
  • Node.js for JavaScript/TypeScript full-stack development.
  • FastAPI for AI, data science, and high-performance Python APIs. In practice, FastAPI is a Python web framework used to create RESTful web services (REST APIs) and other web applications.


3. Database

Relational databases:

  • PostgreSQL (very popular)
  • MySQL
  • Microsoft SQL Server
  • Oracle Database

NoSQL:

  • MongoDB
  • Cassandra
  • DynamoDB
  • Redis (primarily used as an in-memory cache)


4. API style

Modern applications commonly use:

  • REST (most common)
  • GraphQL (flexible data retrieval)
  • gRPC (high-performance internal services)


5. Authentication

Common standards:

  • OAuth 2.0
  • OpenID Connect (OIDC)
  • JWT (JSON Web Tokens)


6. Cloud platforms

Most deployments target:

  • AWS
  • Microsoft Azure
  • Google Cloud Platform (GCP)

Many organizations also use Kubernetes on-premises or in the cloud.


7. Containers

Modern applications are usually packaged with:

  • Docker
  • Kubernetes (for orchestration)


8. CI/CD

Typical tools include:

  • GitHub Actions
  • GitLab CI/CD
  • Jenkins
  • Azure DevOps


9. Reverse proxy / Load balancer

Common choices:

  • Nginx
  • HAProxy
  • F5 BIG-IP
  • Cloudflare
  • AWS Application Load Balancer (ALB)


10. Monitoring

Popular monitoring and observability tools:

  • Prometheus
  • Grafana
  • ELK Stack (Elasticsearch, Logstash, Kibana)
  • OpenTelemetry
  • Datadog


Example: Startup / SaaS stack

Frontend:

    React + TypeScript


Backend:

    Node.js (NestJS)

       or

    Python (FastAPI)


Database:

    PostgreSQL


Cache:

    Redis


Deployment:

    Docker + Kubernetes


Cloud:

    AWS


Load Balancer:

    Nginx / AWS ALB


API:

    REST


Example: Enterprise stack

Frontend:

    Angular or React


Backend:

    Spring Boot (Java)


Database:

    Oracle or PostgreSQL


Authentication:

    Active Directory + OAuth2


Load Balancer:

    F5 BIG-IP


Deployment:

    VMware or Kubernetes


Monitoring:

    Prometheus + Grafana

This combination is common in banks, government agencies, and large corporations.


Current trends (2026)

For new projects, a very common stack is:

  • Frontend: React + TypeScript
  • Backend: FastAPI (Python), Spring Boot (Java), ASP.NET Core (C#), or NestJS (TypeScript)
  • Database: PostgreSQL
  • Cache: Redis
  • API: REST (or GraphQL if clients need flexible data access)
  • Containerization: Docker
  • Orchestration: Kubernetes
  • Cloud: AWS, Azure, or GCP

This reflects the industry’s shift toward cloud-native, containerized, and API-driven architectures. Given your background in cloud computing and distributed systems, learning React + TypeScript, FastAPI or Spring Boot, Docker, and Kubernetes would provide a strong foundation for understanding and building modern web applications.