]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/relnotes.txt
UCW::CGI: Documented the changes
[libucw.git] / ucw / doc / relnotes.txt
1 Release notes
2 =============
3
4 WIP
5 ---
6
7 * The <<conf:,configuration file parser>> has been improved:
8 ** *Incompatible:* The interface of the <<heap:,heap>> module was cleaned up
9    to remove non-systematic side-effects. The `HEAP_INSERT` operation is now
10    a proper insert (previously, it was just cleanup after insertion performed
11    by the caller), similarly `HEAP_INCREASE` and `HEAP_DECREASE`. The `HEAP_DELMIN`
12    operation was renamed to `HEAP_DELETE_MIN`. New operations `HEAP_REPLACE` and
13    `HEAP_REPLACE_MIN` have been added. If you need to track positions of elements
14    in the heap, please check the notes at individual functions.
15 ** Multiple instances of the configuration parser are supported.
16 ** *Incompatible:* As there may be more instances, we can no longer use
17    global variables to control the configuration system. In particular,
18    `cf_need_journal` and `cf_pool` variables have been replaced by
19    functions <<conf:fun_cf_set_journalling,`cf_set_journalling()`>> and
20    <<conf:fun_cf_get_pool,`cf_get_pool()`>>.
21 ** *Incompatible:* Loading of configuration files has been decoupled from
22    the getopt wrapper, so you might need to include `conf.h` for functions
23    which were previously declared in `getopt.h`.
24 ** New functions have been added:
25    <<conf:fun_cf_open_group,`cf_open_group()`>>,
26    <<conf:fun_cf_close_group,`cf_close_group()`>>, and
27    <<conf:fun_cf_revert,`cf_revert()`>>.
28 * <<daemon:,Daemon helpers>> have been added including a new `daemon-control`
29   utility. The old `daemon-helper` utility has been obsoleted and it is not
30   compiled by default.
31 * <<signal:,Signal helpers>> for translation between signal names and numbers
32   have been added.
33 * The fastbuf I/O layer received a new back-end <<fastbuf:fbmulti,fb_multi>>,
34   which concatenates several fastbuf streams to form a single virtual stream.
35 * *Incompatible* The `UCW::CGI` Perl module has its custom error handlers
36   (which override default Perl error handlers) split off to a separate module
37   `UCW::CGI::ErrorHandler`.
38
39 5.0
40 ---
41
42 * *Incompatible:* The `timestamp_t` type has been decoupled from wall clock time.
43   It now specifies the number of milliseconds from an unspecified origin, so that
44   it can for example refer to the system monotonic clock. The `ucw_time_t` type
45   has been removed.
46
47 * The <<mainloop:,mainloop>> module has been rewritten:
48 ** Multiple instances of the main loop are supported (to be used in different
49    threads or locally within a library function).
50 ** The new implementation is more efficient: it uses heaps for timers,
51    epoll() for file descriptors (when available).
52 ** The return value of <<mainloop:struct_main_file,`main_file`>> handlers has been
53    changed to <<mainloop:enum_main_hook_return,`HOOK_IDLE`>> and <<mainloop:enum_main_hook_return,`HOOK_RETRY`>>.
54    However, the numerical values are equal, so old code should keep working.
55 ** *Incompatible:* The main loop time (`main_now`) has been decoupled from wall clock time
56    and moved to a field in the `main_context` structure. It can be accessed either directly
57    or via <<mainloop:fun_main_get_now,`main_get_now()`>>. The `main_now_seconds` variable has
58    been removed, `main_idle_time` has become a structure field.
59 ** *Incompatible:* The interface for asynchronous reading and writing
60    (file_read() and friends) has been separated from the core of the main loop.
61    Use <<mainloop:struct_main_block_io,`struct main_block_io`>> and related functions instead.
62 ** *Incompatible:* file_close_all() is gone. You have to call <<mainloop:fun_main_teardown,`main_teardown()`>>
63    or <<mainloop:fun_main_destroy,`main_destroy()`>> to clean up properly after fork().
64 ** Added support for <<mainloop:signal,synchronous delivery of signals>>.
65 ** Added relative timers: <<mainloop:fun_timer_add_rel,`timer_add_rel()`>>.
66 ** Modification of events from a running event handler is always safe.
67 ** Deleting an already deleted event is always safe.
68 ** For any event type, it is possible to ask whether it is active (added to the mainloop) or not: <<mainloop:fun_hook_is_active,`hook_is_active()`>> and friends.
69 ** A new mainloop front-end for asynchronous <<mainloop:recordio,record-based I/O>> has been added.
70
71 * Added support for <<trans:,resource pools and transactions>>, which is a general
72   mechanism for tracking resources and reporting errors. It is still considered
73   experimental, so the API can change in future releases.
74
75 * Added a growing array module `gary.h`, similar to `gbuf.h`, but with
76   a much more convenient interface.
77
78 * The <<lists:,Circular linked lists>> can recognize unlinked nodes,
79   see <<lists:fun_clist_unlink,`clist_unlink()`>>.
80
81 * Added `strtonum.h` -- a module for precise parsing of numbers.
82
83 * When compiled by a recent enough GCC, `__thread` is used for thread-local variables,
84   which is more efficient than the POSIX per-thread storage.
85 ** *Incompatible:* `ucwlib_context->thread_id` is no longer available directly,
86   please use ucwlib_thread_id() instead.
87
88 * *Incompatible:* Several modules have been declared obsolete and removed:
89 ** `sighandler` -- generic signal handling (it still exists internally)
90 ** `qache` -- a mmap-based shared cache
91 ** `prefetch` -- an interface to memory prefetch instructions; superseded by GCC `__builtin_prefetch`
92 ** `randomkey` -- a generator of cryptographically strong pseudo-random tokens; will be replaced
93    by something more generic soon
94 ** `profile` -- a profiling hack
95
96 * *Incompatible:* Several modules now have their own header files:
97 ** `process.h` -- all functions related to processes, previously declared in `lib.h`
98 ** `io.h` -- functions related to files from `lib.h` and `lfs.h`
99 ** `time.h` -- timestamps and interval timers, previously in `lib.h`
100
101 * *Incompatible:* Several configuration options were renamed or removed:
102 ** `CONFIG_FAKE_ELTPOOL` &rarr; `CONFIG_UCW_FAKE_ELTPOOL`
103 ** `CONFIG_LARGE_FILES` &rarr; `CONFIG_UCW_LARGE_FILES`
104 ** `CONFIG_OWN_GETOPT` &rarr; `CONFIG_UCW_OWN_GETOPT`
105 ** `CONFIG_DIRECT_IO` &rarr; `CONFIG_UCW_DIRECT_IO`
106 ** `DEFAULT_CONFIG` &rarr; `CONFIG_UCW_DEFAULT_CONFIG`
107 ** `ENV_VAR_CONFIG` &rarr; `CONFIG_UCW_ENV_VAR_CONFIG`
108 ** `CONFIG_LFS` was removed
109 ** `CONFIG_URL_ESCAPE_COMPAT` was removed
110
111 * `UCW::Configure` supports running of test programs.
112
113 * `UCW::CGI` support multiple argument tables and UTF-8 mode. Also, it uses the
114   proper HTTP status codes when reporting errors.
115
116 * Implementation details of <<fastbuf:,fastbufs>> have changed. The new code checks
117   invariants more carefully, so it is possible that custom fastbuf back-ends which
118   are buggy now fail, although they previously seemed to work.
119
120
121 4.0 (2009-04-13)
122 ----------------
123 This was the first stand-alone release of LibUCW. Before that, LibUCW was developed
124 as a part of the http://www.ucw.cz/holmes/[Sherlock Holmes project].