📄 developer-changelog.apt
字号:
-------------------
Developer Change Log
-------------------
Jonas Haller
-------------------
07.01.2008
-------------------
Developer Change Log
* Changes
* {{{#0.4.0}Release 0.4.0}}
* {{{#1605109}Bugfix 1605109}}: Start reader from ReaderDevice class
* {{{#1547804}Bugfix 1547804}}: Cleaned up properties files
* {{{#1524549}Bugfix 1524549}}: Source properties added to ReaderDevice.xml
* {{{#1760340}Bugfix 1760340}}: Removed spinlock and redesigned continuous
notification trigger with wait/notify
* {{{#1524548}Bugfix 1524548}}: Send notifications as HTTP posts
* {{{#1519656}Bugfix 1519656}}: Search for '\<?xml' instead of '\<' only to
identify start of XML in notification
* {{{#1770773}Bugfix 1770773}}: JAXB context and marshaller stored static
and initialized only once
* {{{#1547776}Bugfix 1547776}}: Added configuration file for the proxy
* {{{#1773821}Bugfix 1773821}}: Fixed field name, event and tag field
values for custom data selector
* {{{#1723152}Bugfix 1723152}}: Renamed TagSelector shorthand from RF to TS
* {{{#1782301}Bugfix 1782301}}: Return error if 'ms=' missing in timer
trigger value
* {{{#1782482}Bugfix 1782482}}: Return notification channel port number
correctly
* {{{#1547832}Bugfix 1547832}}: Redesigned resource loading
* {{{#1783839}Bugfix 1783839}}: Send and receive handshake in core and
proxy/client
* {{{#1800577}Bugfix 1800577}}: Added possibility to start multiple readers
on a single computer
* {{{#1823580}Bugfix 1823580}}: No default configuration files defined in
other configuration files
* {{{#1826817}Bugfix 1826817}}: Iterate over tag field names instead of
field names when adding tags to a report in the source
* {{{#1827468}Bugfix 1827468}}: Rewritten byte array to hexadecimal
formatted string converter function in the HexUtil class
* {{{#1827498}Bugfix 1827498}}: Interprete offset and length of a tag
field as bits
* Release {0.4.0}
** Bugfix {1605109}: Start reader from ReaderDevice class
The Fosstrak Reader had its main method in the message layer although the
<<<ReaderDevice>>> class is the 'center' of the reader and should contain the
main method.
A new main method was added to the <<<ReaderDevice>>> class. Additionally
the new main method can take an argument containing path and name of a
configuration file instead of allways using a hard coded configuration file
name.
** Bugfix {1524549}: Source properties added to ReaderDevice.xml
The <<<Source>>> class was initialised with hard coded properties.
All the adjustable values have been written into a properties file and loaded
in the initialisation routine of the <<<Source>>>. The properties have been
integrated into the ReaderDevice configuration file in the meantime (see
{{{#1547804}1547804}}).
** Bugfix {1547804}: Cleaned up properties files
There were a number of different properties files. It was unclear which of
them currently were in use.
All the properties files were in use but their organisation was unclear. The
configuration files have been cleaned up. In the ReaderDevice configuration
file, which was formatted in XML, some values were hidden in element names.
These values have been moved into elements and given expressive names. The
messaging.properties and source.properties have been converted from
properties to XML format and merged into the ReaderDevice configuration file.
** Bugfix {1760340}: Removed spinlock and redesigned continuous notification
trigger with wait/notify
The continuous notification thread caused a spin lock which unnecessarily
used a significant amount of system resources. It checked nonstop whether
there were new notifications in the buffer to be sent. System resources were
not even released between two checks to give another thread the possibility
to receive and add a new notification to the buffer.
To eliminate this spin lock, a simple observer design pattern with the
built-in wait and notify thread functionality of Java is used. The continuous
notification thread blocks (wait) until the notification channel receives
a new notification to be sent and awakes (notifiy) the trigger thread.
** Bugfix {1524548}: Send notifications as HTTP posts
Delivering notifications over the HTTP protocol was done using the same
methods as when responding to commands on the command channel. For this
reason the notifications were sent as HTTP responses, nota bene without
a preceding HTTP request. This is obviously wrong and an application server
receiving the notification is unable to handle it, because it can not send
a response to a response.
The outgoing message dispatcher has been adjusted to handle notifications
separately. It gets the target address from the socket and sends the
notification as HTTP post.
** Bugfix {1519656}: Search for '\<?xml' instead of '\<' only to identify start
of XML in notification
Sometimes the parser in the notification channel end point of the proxy was
not able to parse a notification and throwed an exception. The reason was
that the detection of the beginnig of the XML code failed and an invalid XML
document was passed down to the parser.
A small number of other characters prefix the XML notification data. As the
beginning of the XML data, the first '\<' character was taken. This failed
if one of the preceding characters coincidentally was a '\<' character. To
circumvent this problem the data received is searched for the string '\<?xml'
to find the correct beginning of the XML data.
** Bugfix {1770773}: JAXB context and marshaller stored static and initialized
only once
*** Situation before fixing
Every time the JAXB context was used a new instance was created. So every time
a command or notification was marshalled or unmarshalled the whole Java XML
Binding was recreated. This was very time consuming and not necessary. The
following table shows a simple reader configuration with about ten commands
and the amount of time used for the Java XML Binding.
Three methods use the JAXB context:
* <<sC>>: <<<serializeCommand()>>> in the <<<CommandSerializerImpl>>> class of the
proxy. Total includes marshalling.
* <<gJC>>: <<<getJAXBContext()>>> in the <<<Context>>> class of the core. Totel is
the same as creating JAXB context.
* <<nL>>: <<<notifyListeners()>>> in the <<<NotificationChannelEndPoint>>> class
of the proxy. Total includes mashalling.
[]
*------------+---------------------------+--------------------------------+
| <<method>> | <<creating JAXB context>> | <<total>> |
*------------+---------------------------+--------------------------------+
| sC | 1280ms | 1311ms |
*------------+---------------------------+--------------------------------+
| gJC | 562ms | 562ms |
*------------+---------------------------+--------------------------------+
| sC | 156ms | 156ms |
*------------+---------------------------+--------------------------------+
| gJC | 125ms | 125ms |
*------------+---------------------------+--------------------------------+
| sC | 141ms | 141ms |
*------------+---------------------------+--------------------------------+
| gJC | 78ms | 78ms |
*------------+---------------------------+--------------------------------+
| sC | 203ms | 203ms |
*------------+---------------------------+--------------------------------+
| gJC | 47ms | 47ms |
*------------+---------------------------+--------------------------------+
| sC | 125ms | 125ms |
*------------+---------------------------+--------------------------------+
| gJC | 94ms | 94ms |
*------------+---------------------------+--------------------------------+
| sC | 157ms | 157ms |
*------------+---------------------------+--------------------------------+
| gJC | 63ms | 63ms |
*------------+---------------------------+--------------------------------+
| sC | 140ms | 140ms |
*------------+---------------------------+--------------------------------+
| gJC | 94ms | 94ms |
*------------+---------------------------+--------------------------------+
| sC | 125ms | 125ms |
*------------+---------------------------+--------------------------------+
| gJC | 156ms | 156ms |
*------------+---------------------------+--------------------------------+
| sC | 78ms | 78ms |
*------------+---------------------------+--------------------------------+
| gJC | 47ms | 47ms |
*------------+---------------------------+--------------------------------+
| sC | 109ms | 109ms |
*------------+---------------------------+--------------------------------+
| gJC | 46ms | 46ms |
*------------+---------------------------+--------------------------------+
| nL | 344ms | 344ms |
*------------+---------------------------+--------------------------------+
| nL | 31ms | 31ms |
*------------+---------------------------+--------------------------------+
| nL | 47ms | 47ms |
*------------+---------------------------+--------------------------------+
| nL | 47ms | 47ms |
*------------+---------------------------+--------------------------------+
| nL | 62ms | 62ms |
*------------+---------------------------+--------------------------------+
| nL | 62ms | 62ms |
*------------+---------------------------+--------------------------------+
| nL | 47ms | 47ms |
*------------+---------------------------+--------------------------------+
| nL | 78ms | 78ms |
*------------+---------------------------+--------------------------------+
| nL | 78ms | 78ms |
*------------+---------------------------+--------------------------------+
| nL | 156ms | 156ms |
*------------+---------------------------+--------------------------------+
| nL | 63ms | 63ms |
*------------+---------------------------+--------------------------------+
| gJC | 94ms | 94ms |
*------------+---------------------------+--------------------------------+
| <<Total>> | 4935ms | 4966ms |
*------------+---------------------------+--------------------------------+
JAXB context creating and marshalling time before fixing.
As you can see nearly all the time for marshalling is used to create and
particularly recreate the JAXB context. These ten simple commands last almost
five seconds and this is the time for marshalling and unmarshalling only.
*** Situation after fixing
In the <<<CommandSerializerImpl>>>, <<<NotificationChannelEndPoint>>> and
<<<CommandFactory>>> class of the proxy and the <<<Context>>> class of the
core, the context and marshaller are now stored statically and initialised
only the first time they are used. This reduces the time needed for
marshalling and unmarshalling significantly. The following table shows the
same reader configuration with the same method name abbreviations as above.
*------------+---------------------------+--------------------------------+
| <<method>> | <<creating JAXB context>> | <<total>> |
*------------+---------------------------+--------------------------------+
| sC | 1279ms | 1326ms |
*------------+---------------------------+--------------------------------+
| gJC | 640ms | 640ms |
*------------+---------------------------+--------------------------------+
| sC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| gJC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| sC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| gJC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| sC | 15ms | 15ms |
*------------+---------------------------+--------------------------------+
| gJC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| sC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| gJC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| sC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| gJC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| sC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
| gJC | 0ms | 0ms |
*------------+---------------------------+--------------------------------+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -