Ir para conteúdo
  • Cadastre-se

La2 DB Adapters


Posts recomendados

 

Introducing a universal adapter system for interacting with various Lineage 2 server builds through a unified interface.

Supported Server Builds:
----------------------
✓ L2J Mobius (Classic/Essence/Legacy)
✓ Acis
✓ PWsoft
✓ Lucera

Key Features:
-----------
• Unified API across all builds
• Intelligent connection management
• Automatic reconnection
• Data caching
• Extended PvP statistics
• Server status monitoring

System Structure:
---------------
```
adapters/
├── acis/              # Acis implementation
├── base/              # Base classes
├── lucera/            # Lucera implementation
├── mobius/            # Mobius implementation
├── pwsoft/            # PWsoft implementation
└── index.js           # Entry point
```

Core Components:
-------------
1. Adapter Factory (factory.js):
   - Dynamic adapter creation
   - Connection pool management
   - Configuration validation

2. Base Adapter (adapter.js):
   - Standard DB operations
   - Error handling
   - Query utilities
   - Data transformation

3. Specialized Adapters:
   - Acis: Classic L2J structure
   - Lucera: Extended inventory system
   - Mobius: Version-specific adaptations
   - PWsoft: Custom schemas

Usage Examples:
------------
```javascript
// Get server adapter
const adapter = await getAdapter(serverId);

// Get character list
const chars = await adapter.getCharacters('pvp', 20, 0);

// Get clan details
const clan = await adapter.getClanDetails(clanId);

// Check server status
const status = await adapter.checkServerStatus();
```

Advantages:
---------
✓ Single codebase for all builds
✓ Easy integration of new builds
✓ Reliable connection management
✓ Extended statistics
✓ Automatic failure recovery

Technical Requirements:
--------------------
• Node.js 14+
• PostgreSQL 10+
• Server database access

Source Code & Documentation:
-------------------------
Full documentation and examples available in the adapters/docs/ directory

O conteúdo está oculto, favor efetuar login ou se cadastrar!

adapters.zip

Editado por Prizmo
  • Gostei 2
Link para o comentário
Compartilhar em outros sites


2 часа назад, LucasDesigner сказал:

bem legal mas funciona ?

se pode posta funcionando seria legal .

At the moment, the performance of acis/lucera/pwsoft has been tested on real projects. L2Jmobius has been tested on test data...

Link para o comentário
Compartilhar em outros sites

1 hora atrás, Prizmo disse:

At the moment, the performance of acis/lucera/pwsoft has been tested on real projects. L2Jmobius has been tested on test data...

deixa foto pra pessoal ter ideia do funcionamento.

Falar é fácil. Mostre-me o código.

Link para o comentário
Compartilhar em outros sites

2 hours ago, lucastotti said:

Download link please

The file is attached to the first message.

1 hour ago, LucasDesigner said:

Please leave a photo so people can get an idea of how it works.

This is a backend for working with the DB. What kind of photos can there be? Detailed documentation is archived in 2 languages ru en

Editado por Prizmo
Link para o comentário
Compartilhar em outros sites

19 minutos atrás, Prizmo disse:

The file is attached to the first message.

This is a backend for working with the DB. What kind of photos can there be? Detailed documentation is archived in 2 languages ru en

funcionamento do db .. qual funcionabilidade ?

Falar é fácil. Mostre-me o código.

Link para o comentário
Compartilhar em outros sites

1 hora atrás, Prizmo disse:

The file is attached to the first message.

This is a backend for working with the DB. What kind of photos can there be? Detailed documentation is archived in 2 languages ru en

the file on the page can't be downloaded, when I click to download, it says that I need to register on the forum, but my account is logged in, upload it to the mediafire link please thanks

Link para o comentário
Compartilhar em outros sites

1 час назад, LucasDesigner сказал:

funcionamento do db .. qual funcionabilidade ?

The full documentation is archived in 2 languages.

# Lineage 2 Server Adapter System Documentation

## 1. Core Architecture Overview

 

The adapter system provides a unified interface for interacting with different Lineage 2 server implementations:
- Acis
- PWsoft
- Lucera
- Mobius (with multiple versions support)

### Directory Structure
```
adapters/
├── acis/              # Acis server implementation
├── base/              # Base adapter classes and interfaces
├── lucera/            # Lucera server implementation
├── mobius/            # Mobius server implementation
├── pwsoft/            # PWsoft server implementation
├── docs/              # Documentation
└── index.js           # Main entry point
```

## 2. Key Components

### 2.1 Base Adapter (base/adapter.js)
- Connection management with automatic reconnection
- Query building and execution
- Data transformation and enrichment
- Error handling and recovery
- Event system for connection status
- Caching system integration
- Multi-language support

### 2.2 Adapter Factory (base/factory.js)
- Dynamic adapter instantiation based on server type
- Connection pooling management
- Cache management
- Connection string encryption
- Error recovery mechanisms

### 2.3 Specialized Adapters
Each server type has its own adapter implementation handling specific database schemas:
- Acis: Classic L2J database structure
- PWsoft: Custom schema adaptations
- Lucera: Extended inventory system
- Mobius: Version-specific implementations

## 3. Main Features

### 3.1 Character Management
- Character listing with filtering (PvP, PK, level)
- Character search functionality
- Detailed character information
- Inventory management
- PvP statistics tracking
- Equipment tracking
- Character class and level statistics

### 3.2 Clan Management
- Clan listings with filters
- Clan member management
- Clan statistics and rankings
- Castle ownership tracking
- Alliance information
- Clan wars history

### 3.3 Server Management
- Server status monitoring
- Online player counting
- Server performance metrics
- Connection state tracking
- Server statistics collection
- Automatic reconnection handling

## 4. Advanced Features

### 4.1 Connection Pooling
- Automatic connection management
- Connection state recovery
- Load balancing support
- Connection timeout handling
- Connection queue management
- Pool size optimization

### 4.2 Caching System
- Memory-based caching
- Cache invalidation strategies
- Automatic cache refresh
- Query result caching
- Statistics caching
- Connection state caching

### 4.3 Security Features
- Connection string encryption
- Query parameter sanitization
- Access control implementation
- Secure credential management
- SQL injection prevention
- Rate limiting support

## 5. Data Operations

### 5.1 Query Building
- Standardized query interface
- Parameter binding
- Query optimization
- Result transformation
- Error handling
- Transaction support

### 5.2 Data Transformation
- Character data enrichment
- Clan data processing
- Inventory item mapping
- PvP statistics calculation
- Castle siege information
- Alliance relationships

## 6. Error Handling

### 6.1 Connection Errors
- Automatic reconnection
- Connection timeout handling
- Pool exhaustion handling
- Network error recovery
- State recovery after errors

### 6.2 Query Errors
- Query retry mechanism
- Error logging
- Transaction rollback
- Data consistency checks
- Error reporting

## 7. Monitoring Capabilities

### 7.1 Performance Monitoring
- Query execution time tracking
- Connection pool statistics
- Cache hit/miss rates
- Resource usage monitoring
- Query optimization metrics

### 7.2 Server Statistics
- Player count tracking
- Server load monitoring
- Network latency tracking
- Database performance metrics
- Memory usage statistics

## 8. Implementation Examples

### 8.1 Character Query
```javascript
async getCharacters(filter = 'pvp', limit = 20, offset = 0) {
  // Implementation for character retrieval
}
```

### 8.2 Clan Query
```javascript
async getClans(filter = 'reputation', limit = 20, offset = 0) {
  // Implementation for clan retrieval
}
```

### 8.3 Server Status
```javascript
async checkServerStatus() {
  // Implementation for server status check
}
```

## 9. Event System

### 9.1 Connection Events
- connection_lost
- connection_restored
- connection_error
- pool_exhausted
- cache_invalidated

### 9.2 Data Events
- data_changed
- cache_updated
- query_completed
- error_occurred
- state_changed

## 10. Utilities

### 10.1 String Manipulation
- Character name formatting
- Clan name processing
- Item name localization
- Status text generation

### 10.2 Data Validation
- Input parameter validation
- Query parameter checking
- Connection string validation
- Configuration verification

This adapter system effectively abstracts the differences between various Lineage 2 server implementations, providing a consistent interface for client applications while handling the complexity of different database schemas and APIs internally.

The system is designed to be:
- Modular and extensible
- Highly reliable with automatic recovery
- Performance optimized
- Secure by default
- Easy to maintain and update

 

13 минут назад, lucastotti сказал:

the file on the page can't be downloaded, when I click to download, it says that I need to register on the forum, but my account is logged in, upload it to the mediafire link please thanks

Ok.

O conteúdo está oculto, favor efetuar login ou se cadastrar!

  • Gostei 1
Link para o comentário
Compartilhar em outros sites

22 horas atrás, LucasDesigner disse:

deixa foto pra pessoal ter ideia do funcionamento.

Pode pah que bem melhor com a visão do projeto que o brother tá dropando aqui, também bom seria um relatório de VT em caso de apps feitas de modo caseiro ou por inteligência artificial, que os malware estão bombando nos dias de hoje até nos repos

  • Gostei 1
Link para o comentário
Compartilhar em outros sites

Em 25/03/2025 at 06:57, Prizmo disse:

 

Apresentando um sistema de adaptador universal para interagir com várias compilações de servidores Lineage 2 por meio de uma interface unificada.

Compilações de servidores suportadas:
----------------------
✓ L2J Mobius (Classic/Essence/Legacy)
✓ Acis
✓ PWsoft
✓ Lucera

Principais recursos:
-----------
• API unificada em todas as compilações
• Gerenciamento de conexão inteligente
• Reconexão automática
• Cache de dados
• Estatísticas PvP estendidas
• Monitoramento de status do servidor

Estrutura do sistema:
---------------
```
adapters/
├── acis/ # Implementação Acis
├── base/ # Classes base
├── lucera/ # Implementação Lucera
├── mobius/ # Implementação Mobius
├── pwsoft/ # Implementação PWsoft
└── index.js # Ponto de entrada
```

Componentes principais:
-------------
1. Adapter Factory (factory.js):
   - Criação dinâmica de adaptadores
   - Gerenciamento de pool de conexões
   - Validação de configuração

2. Adaptador base (adapter.js):
   - Operações padrão de BD
   - Tratamento de erros
   - Utilitários de consulta
   - Transformação de dados

3. Adaptadores especializados:
   - Acis: estrutura L2J clássica
   - Lucera: sistema de inventário estendido
   - Mobius: adaptações específicas da versão
   - PWsoft: esquemas personalizados

Exemplos de uso:
------------
```javascript
// Obter adaptador de servidor
const adapter = await getAdapter(serverId);

// Obter lista de caracteres
const chars = await adapter.getCharacters('pvp', 20, 0);

// Obter detalhes do clã
const clan = await adapter.getClanDetails(clanId);

// Verificar status do servidor
const status = await adapter.checkServerStatus();
```

Vantagens:
---------
✓ Base de código única para todas as compilações
✓ Fácil integração de novas compilações
✓ Gerenciamento de conexão confiável
✓ Estatísticas estendidas
✓ Recuperação automática de falhas

Requisitos técnicos:
--------------------
• Node.js 14+
• PostgreSQL 10+
• Acesso ao banco de dados do servidor

Código-fonte e documentação:
-------------------------
Documentação completa e exemplos disponíveis no diretório adapters/docs/

O conteúdo está oculto, favor efetuar login ou se cadastrar!

adaptadores.zipIndisponível

vale observar que voce deveria adicionar um pequeno video ou foto do mesmo sendo usado em qualquer rev 
por que vc n deu muito detalhes de como funciona nem a logica eu acho ne 

  • Gostei 1
Link para o comentário
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...



×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.