There are 43313 unique visitors to this page.

This website contains the SPTK class library related materials. This library is using FLTK 1.x/2.x library for GUI classes. If you need UTF8 support in your FLTK 1.x application, then you can use FLTK 1.3. FLTK 2.x supports unicode for any 2.x version.

SPTK uses BSD License Agreement that can be found here.


Please, tell me how do you use SPTK?
In a production project
In a test project
I`m just checking it out
It`s not really useful
Other:


If you are brave and impatient you can get SPTK source code from SVN. The instruction is here. The complete SPTK changes history is presented in the websvn access .


For all your questions/suggestions/bugfixes to SPTK, as well as for general discussion sign up for our mailing list sptk@total-knowledge.com by sending mail to subscribe e-mail address . Archives can be found at here.

2010-03-09

SPTK-4.01

During last two months, the intensive testing of non-GUI SPTK part was conducted in a couple of projects. The resulting fixes and feature additions make up the 4.01 version, that you can download as *nix tarball . Here is the list of most important changes:

  • Fixed CAsyncSockets dtor memory free order
  • Fixed several race conditions
  • Fixed incorrect omitting of thread join in CThread dtor
  • Added support for different file log open modes
  • Added class CReadWriteGuard and corresponding {READ,WRITE}_GUARD macros
  • Added class CPriorityList
  • Added SSL thread safety support
  • Fixed generation of the root keys for ssl examples
  • Added preliminary version of CPriorityList.

The new class CReadWriteGuard is added since it's giving a noticeable advantage in some code bottlenecks. If some data shared between threads is often read and rarely modified, CReadWriteGuard has much better chances avoiding a bottleneck than CGuard. However, if data is relatively often modified, using CGuard may produce better results since underlying mutix (CGuard uses CWaiter class) is faster than read_write_lock (CReadWriteGuard uses CRWLock class).

2009-12-29

SPTK 4.00 (release)

After several months of testing, SPTK team proudly announces the release of SPTK 4.00. It's available for download as *nix tarball . Several small bugs were fixed since last release candidate, mostly discovered when tested on different OSes.

The most important changes introduced in SPTK 4:

  • Transparent support for FLTK versions 1.x and 2.x. Since FLTK 2.x has several important features, like UTF support, for instance, it may be interested for some projects.
  • Support for encrypted (SSL and AES) sockets based on OpenSSL library.
  • Added support for asynchronous IO based on libevent library. SPTK adds thread safety missed in early versions of libevent.
  • Added Thread Manager that automatically destroys finished threads
  • Added SafeQueue and SafeList classes implementing thread-safe queue and list correspondingly.
  • Dynamically loaded database drivers (*nix only). Every database driver is implemented as a separate shared library, and only loaded when an attempt to use a particular driver is made.

Besides changes listed above, this release went through race conditions optimization.

2009-12-09

SPTK-4.00_rc5

The next release candidate is out as *nix tarball . As usual, it fixes bugs discovered since last release candidate. The testing was mostly focused on multi-threaded and SSL capabilities of SPTK classes.

The following changes were the most noticable:

  • Fixed incorrect use of SSL keys that now allows to do VERIFY correctly. Added SSL server/client examples.
  • Fixed deadlock/race conditions in CSocket.
  • Fixed crush during the destructor of CThread for the threads that were created but never started.
  • Added thread safety in CAsyncSockets and CAsyncTimer. Added support for multiple independent event loops - one per CAsyncSockets object instance. Fixed incorrect timeout value in CAsyncSockets::stop().
  • Added support for the NULL value in CDateTime. Fixed small printing problems, and added stream output operator.

2009-11-19

SPTK-4.00_rc4

The next release candidate is out as *nix tarball . It fixes most of the bugs discovered for almost a month of testing. The testing was mostly focused on multi-threaded use of SPTK classes. Extensive testing was conducted using valgrind tools (memcheck, helgrind) and allowed detecting race conditions in several classes. We can't claim that we fixed all of them, but most of the race conditions are removed. SPTK set of examples was also modified to demonstrate the correct usage of SPTK classes in order to minimize race conditions.

The following changes were the most noticable:

  • Redesigned logger classes to minimize race conditions. The new version always requires creating logger (such as CSysLogger) object and one or more CProxyLog objects. The logged information can only be sent to CProxyLog that should not be shared between threads.
  • CThreadManager got the new ability to owe threads. When a thread own by the thread manager ends, it's reported to thread manager that safely destroys any reported threads.
  • Modified CFragmentedStream to use CSafeQueue class to minimize race conditions. It also simplifies the code.

2009-11-18

SPTK website

Since SPTK is taking too much space on the hosting site, we decided to minimize that space. Most of the old versions (prior to 3.5.0) are removed. The zip-versions of SPTK tarballs are removed. We hope that anyone can open tar.bz2 archives these days. Please let us know if this is a problem for you. We apologize for the inconvenience.

2009-10-24

SPTK SVN

Completed CMake build system adjustments for FreeBSD, including FLTK support. The following programs are required for FreeBSD and Solaris builds: gmake, gtar.

The general suggestion is: On the platforms where gmake and make are installed simultaneously, gmake should be used instead of make to build SPTK.

2009-10-20

SPTK SVN

Fixed CMake build system to work on FreeBSD (besides FLTK packages).

2009-10-19

SPTK-4.00_rc2

Second release candidate for SPTK-4.00 is out. You can download this version *nix tarball or zip archive . After extensive testing, the following bugs were fixed since rc1:

  • Fixed several memory leaks revealed by valgrind testing
  • Fixed compilation on 64 bit Linux and Solaris platforms
  • Fixed compilation on SUSE, Debian, RHEL, and OpenSolaris.
  • Fixed bugs in CFragmentedStream that caused incomplete buffer readings

Also, the following code was optimized to increase performance:

  • Thread pool was modified to exclude dead lock possibilities and enhance response time.
  • PostgreSQL driver performance increased.
  • DB connection pool performance increased.

2009-09-26

SPTK Support

Starting from 2009/09/26, Melbourne company Linotex Pty Ltd, one of the sponsors of SPTK project, offers commercial support for SPTK. Please, visit SPTK support page for more information.

2009-09-19

SPTK SVN

SPTK SVN is updated. The following changes are made:

  • Increased performance of PostgreSQL driver by 36% (depends on query SQL)
  • Increased performance of CPngImage on cut and resize operations (while using FLTK2)
  • Fixed memory leaks in CPngImage
  • Fixed memory leaks in CIconMap

The changes would be merged into SPTK-4.00-rc2 after testing is complete.

2009-09-15

SPTK-4.00-rc1

Introducing SPTK4.

For the last several months, the development of SPTK was dedicated to preparing to SPTK major release, 4.0. This version is a release candidate. All the class interfaces are now frozen. The only changes allowed now are the bug fixes. You can download this version *nix tarball or zip archive .

Many changes introduced in SPTK-3.8.x versions, are included into new release. There are also some changes that were not a part of SPTK 3.x.

The following changes are the most interesting in this release:

  • Added FLTK2 support. SPTK4 allows compiling the source code with ether FLTK-1.x or FLTK-2.x. The source code is practically the same for both cases. There are still some differences, though, that will be resolved during SPTK 4 release cycle. Several example applications were added to test and demonstrate GUI capabilities.
  • Support for database drivers, introduced in SPTK-3.8, is modified to simplify class usage. Fixed several performance problems with original drivers implementation. Added first (draft) version of database connection pool.
  • Added several exception classes to distinguish different exception sources. For example, database classes now throw only CDatabaseException exceptions.
  • Separated UDP and TCP client and server socket classes. Finalized SSL and AES socket classes.
  • Added CThreadManager class to maintain (start, shutdown) multiple threads with minimal efforts.
  • Added regular expression support to CStrings to implement grep capabilities
  • CMake became SPTK primary building system. Support for autotools is dropped. Several FindXXX CMake modules were designed to make compilation on different OSes more reliable.
  • Tested compilation on the ICC 10.x and GCC 4.4.x compilers (and fixed compilation problems). Tested compilation/work on Gentoo, Debian, Fedora, RHEL Linux, Solaris (with some problems), and Windows 7 (with limitations). Tested SPTK compilation/work on Gentoo and Debian 64-bit systems.

2009-05-30

SPTK SVN

SPTK now compiles under Intel ICC compiler. Going through the source code and removing multiple warnings had a side effect: Performance of several pieces of code was improved, mostly because of minimising excessive use of copy constructors.

The development of long time asked support for FLTK 2.x has started. We plan on supporting both FLTK branches, 1.x and 2.x. The current SPTK snapshot doesn't compile with FLTK 2.x yet - we will announce when it's ready.

2009-05-17

SPTK SVN

SPTK transformation into version 4 continues. Here is the description of latest changes:

  • Finally dropped support for autotools building system. This makes CMake the only building system on *nix.
  • Added regular expression wrapper, along with example program demonstrating typical usage cases. The wrapper uses PCRE library.
  • Split CSocket class on three different classes: CServerSocket (to handle incoming connections), CTCPSocket (for most of the SPTK usages), and CUDPSocket (to support UDP communications). Most of SPTK examples that used CSocket class now use CTCPSocket. CSocket becomes a base class to only contain methods any socket can use. It is extended with better implementation of timeout operations, including both read and write. Both CTCPSocket and CUDPSocket now check if socket is ready for read and write (with timeout).
  • New class CSockets is added to support multiple socket select(). When select exits it returns a list of signaled socket objects (if any).
  • Added preliminary encryption support in the form of CBaseEncryption class. An actual encryption class is derived from CBaseEncryption and should implement encrypt() and decrypt() methods. CEncryptedSocket class takes encryption object as a constructor parameter to allow transparent encryption support in read/write operations.

2009-04-19

SPTK SVN

The development of SPTK version 4 has started.

SPTK SVN repository is renamed from sptk3 to sptk. For backward compatibility, the link to the old name is kept, so existing checkouts continue to stay valid.

The main change this time is the conversion to a single database object that allows to connect to any database supported by SPTK. This change brakes the source compatibility with the existing SPTK projects, however the changes required to fix existing projects are minor. The new approach uses CDatabase objects to declare any database connection. It isn't a connection factory. The following example demonstrates both approaches, so you can compare them:

    /// Old approach, using specific database object
    CPostgreSQLDatabase db1("host='localhost' port=5432 user='myself' password= 'secret' dbname='mydb');

    /// New approach, using CDatabase object
    CDatabase database("postgres://myself:secret@localhost:5432/mydb");
    CDatabaseConnection& db2 = database.connection();

In SPTK version 4, the specific database drivers are derived from CDatabaseConnection, so all the operations with db1 and db2 are identical. For the backward compatibility, database-specific drivers are still available but deprecated.

One of the essentials of the new implementation is the dynamic driver load. It allows creating and loading new database drivers without recompiling SPTK.

The changes described above are only available for *nix operating systems. Windows implementation would follow within a week or two.

2009-04-10

SPTK SVN

SPTK SVN just got a new database driver class. This time, it's COracleDatabase. As you probably guessed, it allows working with Oracle database. As usual, the examples/oracle_test.cpp is provided to test the driver. Other than that standard SPTK test, this driver wasn't tested much. Please use it with caution, or wait till the next SPTK release.

New class has some limitations for query parameters:

  • CLOB parameters can't have size bigger than 32768 bytes.
  • BLOB parameters are not supported yet.

These limitations are caused by Oracle LOB interface that requires an extra information about LOB columns at the runtime. I hope we can find a workaround for this problem in the future releases of the driver.

2009-03-23

SPTK SVN

SPTK has a pretty convenient, thread-safe logging mechanism that allows several threads sharing same log object. That mechanism is implemented as CProxyLog class. Till now, CProxyLog could only place messages into the log object with the same message minPriority as the target log object. If CProxyLog objects are used for different modules of the application, it is pretty handy to have a couple of new features:

  • a personal minimal message priority for CProxyLog object
  • an optional message prefix.

The personal minPriority allows to limit messages logged by CProxyLog object. Both min priorities (for the target log and proxy log) are considered, and the most severe priority of two is used. For instance, if target log object sets min priority as LOG_INFO, and CProxyLog' min priority is LOG_WARNING, then only messages with priority LOG_WARNING or higher would make it through CProxyLog object.

Message prefix also comes handy if application has several groups of messages and you need a way to distinguish these messages by the group. It's just enough to provide the group name as a message prefix in CProxyLog constructor, and the message prefix would be used automatically.

The changes (above) are made in SPTK SVN, and will be included in the next SPTK release.

The older news are saved here.


Valid XHTML 1.0! If you have any questions or comments regarding this page feel free to drop a line to Alexey Parshin.
Design by Michael Perlov