There are 44999 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-07-16

SPTK-4.04

Since OpenSSL turned 1.0, we updated SPTK code to compile with that new OpenSSL version. You can download this release as *nix tarball .

2010-07-12

SPTK-4.03

The development of one of our project, high-performance message queue server, revealed a bug in SPTK usage of libevent functions event_add() and event_del(). In rare cases, these functions would cause SEG FAULT if event_loop() is running. This SPTK release first interrupts event_loop() and then calls event_add() and event_del() functions.

You can download this release as *nix tarball .

2010-05-13

SPTK SVN

Added support for Oracle CLOB/BLOB objects: lifted supported LOB size limits from 4K to available memory. The problem with LOB (large object) in Oracle is that LOB can't be created with a single operation, such as INSERT. If you want to insert an LOB into a table, you have to create an empty LOB with empty_clob() or empty_blob() function (that creates an LOB locator), and then modify it using LOB locator. Same problem occurs when you have to call a stored procedure from your client and pass an LOB into it.

SPTK offers a relatively simple and transparent solution for this problem. An LOB passed from the client is first inserted into a temporary table temp_sptk_lobs, written there completely, and then passed to a SQL statement that needs this LOB. As a side effect, the mentioned above global temporary table exists in the database. SPTK automatically creates this table when needed.

Here is an example of Oracle CLOB creation (same code also found in file examples/database/oracle_test_clob.cpp):

CQuery query(&db,"BEGIN test_blob_function(1,'Somebody',:info); END;");

CBuffer buffer;
while (buffer.bytes() < 65536)
  buffer.append("test ");

query.param("info").setText(buffer);
query.exec();

2010-05-12

SPTK SVN

Added support for Oracle SQL statements returning nested cursor in a recordset. Currently, only a single nested cursor per statement is supported, and any other fields in the same statement recordset are ignored. The most popular use for this feature is a function, returning cursor, such as:

CREATE OR REPLACE FUNCTION test_cursor_function
RETURN SYS_REFCURSOR
IS
    emp_refcur      SYS_REFCURSOR;
BEGIN
    OPEN emp_refcur FOR SELECT emp_id, emp_name FROM test_cursor;
    RETURN emp_refcur;
END;

This function is a part of the corresponding test. The complete SQL code creating the stored function and required table is placed in examples/database/oracle_test_cursor.sql

2010-03-29

SPTK-4.02

The intensive testing of non-GUI SPTK part continues. You can download the current version (4.02) as *nix tarball . Here is the list of most important changes and bug fixes:

  • Modified CAsyncSockets to remove a socket from the collection prior to adding it. This is a workaround for attempts to add a duplicate socket
  • Extended GUARD, READ_GUARD, and WRITE_GUARD timeout intervals to more realistic 10 seconds. Added information for deadlock exception about the current owner of deadlocked lock.
  • Replaced CWaiter with CRWLock in socket, queue, list, thread and logger related classes to boost the performance.
  • Fixed incorrect CVariant to int64_t conversion on 32bit
  • Fixed bug in PostgreSQL driver - incorrect statement name generation.
  • Fixed incorrect auto-set of CLP_ERROR priority during logging of any exception.
  • Separated SSL context from SSL socket into own class.
  • Updated ODBC driver to compile correctly with latest UnixODBC implementation.

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.

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