//--------------------------------------------------------------------------;
// satec/port - (author : michael@prepaidmeters.com) : 2016/04/07 : 10:07
//--------------------------------------------------------------------------;
- (1) satec - C/C++ port. (Query : C++?)
- [notes] :
- It might be useful to consider a C++ version with boost. Although C is fudamentally strong, there isn't much in the way of loss -- scaling up to OO & C++.
The php/cake system is quite comprehensive, replacing this with boost and other dependencies isn't going to be easy. I am currently working on introducing
the MVC architecture in C or C++ - I haven't made up my mind yet as to what language to use for this. Currently, it's sitting in C with a variety of
derived interfaces.
This includes the Singleton pattern. I am just going to write vanilla verions of both & then apply them globally.
The database system for the satec rewrite is going to be sitting in SQLite. I am not yet entirely sure what the performance cost is in using SQLite vs. MySQL.
The basic config & logging functions are complete. Yet be aware that these provide for only the basic functionality.
- MVC architecture in C.
- Singleton in C.
! Cake replacement?
- Directory / software listing :
Auth
Cache
Collection
Console
Controller
Core
Database
Datasource
Error
Event
Filesystem
Form
I18n
Log
Mailer
Network
ORM
Routing
Shell
Template
TestSuite
Utility
Validation
View
- This is the next step in the porting process.
- Cake supports the following database drivers :
'mysql' => 'Cake\Database\Driver\Mysql'
'postgres' => 'Cake\Database\Driver\Postgres'
'sqlite' => 'Cake\Database\Driver\Sqlite'
'sqlserver' => 'Cake\Database\Driver\Sqlserver'
- Config, Database access (port MySQL to SQLite)
- Logging.
- Networking. (Simple BSD socket)
! additional libraries :
- bcParserPHP - Math Expression Parser for PHP
- ModBuster
- support
- A brief overview of my current headway with ppm-satec. I'm currently busy with a working version of php-satec, yet I thought it might be prudent to display my progress with php-C. (The C port)
- daemon.c : This is the primary satec daemon, - which duplicates the functionality found in the php-satec
version. There are a few important functions to note with respect to the C version.
int m_satec_conf_configure (struct c_satec_conf *c);
int m_satec_database_exec (char* l_database_name, char* l_database_statement);
char* m_satec_conf_find (char *l_key, struct c_satec_conf *l_c);
These methods relate to database functionality & configuration.
- There are a variety of utilities which are a work in progress :
- c_satec_conf.c,
c_satec_database.c,
c_satec_log.c,
c_satec_network.c.
- I will go into further detail as this progresses.
- Some notes :
- daemon/C++
- port current PHP/version to C++?
- daemon --> fork, resident or present process. not possible to loop infinitely through database access,
the key here being that it is only called once.