Skip to main content

Introduction

Project Overview

OSI (Open Service Interface) is an implementation designed for local (on-premises) and network environments. It provides a unified, friendly, and open API for core operating system-like services, such as file system operations, process management, event watching, and database access. The goal is to abstract away the underlying infrastructure and offer a consistent interface for desktop application migration and integration in local and browser environments.

Main Use Cases

  • Rapid migration of traditional desktop applications to cloud or containerized environments with minimal changes
  • Building automation, orchestration, and management tools that require direct access to OS-level resources
  • Developing Electron-based desktop applications that need advanced file, process, or event management capabilities
  • Managing local files and directories
  • Executing and monitoring system processes
  • Handling system events
  • Local structured data storage and retrieval
  • Accessing system information

Supported Platforms

  • macOS, Linux, Windows (with Electron)

Key Features

File System Operations

  • File and directory management
  • File content reading and writing
  • Compression and decompression (zip, tar)
  • File system event monitoring

Process Management

  • Process creation and execution
  • Process status monitoring
  • Process termination
  • Process log streaming

Event System

  • Event-driven architecture
  • Custom event binding and triggering
  • One-time event listeners
  • Process event handling

Database Operations

  • Table operations
  • Flexible query capabilities
  • Data persistence

System Information

  • CPU architecture information
  • System date and time
  • System message handling

Architecture

For local environments, OSI is designed to be used in the Electron main process, providing a secure and efficient way to interact with the operating system. It follows a singleton pattern for its core components, ensuring consistent state management and resource utilization.

Security

All operations are performed in the main process, providing a secure environment for system-level operations. The SDK implements proper error handling and resource management to ensure stable operation.

Performance

OSI is optimized for performance with:

  • Asynchronous operations
  • Efficient resource management
  • Minimal memory footprint
  • Optimized file operations