R.C. Hoekstra | 18 Jun 09:42 2014
Picon

[scxml] profiling scxml commons

Hi all  <at>  scxml commons. 

We had some profiling done on our scxml multi agent simulation project. Our issue is that scxml is too slow.
We need about 100,000 instances of scxml engines for a multi agent simulation, and tests show that the
approach with scxml is over 10 times slower than an alternative but less flexible approach. Still, the
flexibility of the scxml commons project serves us very well, so we need to look for ways to improve the
performance. 

For our project setup see my mailing to this list on Fri, 30 May, 20:45.

We have the following tips and improvements: 

1) Now, there's a logger applied for each instance, which is inefficient. 

Make default Log in SimpleContext static. In SCXMLExecutionContext/SCXMLExecutor, it can be static
final even.
public class SimpleContext implements Context, Serializable {
   /** Implementation independent log category. */
   private static final Log DEFAULT_LOG = LogFactory.getLog(Context.class);
   private  Log log = DEFAULT_LOG;

2)  SimpleContext containsKey() + get() to get()

you can rewrite SimpleContext to:
   public Object get(final String name) {
    Object localValue = getVars().get(name);
       if (localValue!=null) {
return localValue;
       } else if (parent != null) {
           return parent.get(name);
(Continue reading)

Jian Le | 17 Jun 00:51 2014
Picon

[daemon]

Hi, I would like to submit a minor change to the
commons-daemon-1.0.x-src/src/native/unix/support/apsupport.m4 file such
that it will support the zlinux platform.   However, when I clicked the
Contributing Patches menu item on the left panel of your main page (
http://commons.apache.org/proper/commons-daemon/jsvc.html), it did not
work.   Please let me know the appropriate process for me to submit this
change.   -Jian
sebb | 13 Jun 15:24 2014
Picon

ApacheCon CFP closes June 25

Dear Apache Commons enthusiast,

As you may be aware, ApacheCon will be held this year in Budapest, on
November 17-23. (See http://apachecon.eu for more info.)

The Call For Papers for that conference is still open, but will be
closing soon. We need you talk proposals, to represent Commons at
ApacheCon. We need all kinds of talks - deep technical talks, hands-on
tutorials, introductions for beginners, or case studies about the
awesome stuff you're doing with Apache Commons.

Please consider submitting a proposal, at
http://events.linuxfoundation.org//events/apachecon-europe/program/cfp

Thanks!
Michael Tobias | 11 Jun 09:08 2014
Picon

[CODEC] Beider Morse Phonetic Matching Bug and questions

Does anybody have a working knowledge of the coding of the Beider Morse
Phonetic Matching in the Apache Commons Codec?

My recent tests using Solr suggest there is a discrepancy between Steve
Morse and Alexander Beider's algorithm and the algorithm currently live in
Solr (and hence the Commons Codec).

I know that the source code for BMPM issued by Steve has changed several
times over the years, and I thought at first it might be that the version
used in the Commons Codec is an old version that has subsequently been
overtaken.  Should the version of the BMPM algorithm not be listed in the
Commons Codec documentation? How should version changes to the algorithm be
implemented? The algorithm is quite static now so this is probably not so
important now but surely it should be DOCUMENTED???

My tests now indicate that the discrepancies are NOT a version problem as
testing against a very old version 2.00 of the BMPM source code issued on 18
June 2009 still exhibits the same problem.

Using just a single test term the results are not good. The only saving
grace is that the most widely used version is 

nameType="GENERIC" ruleType="APPROX"

and that is a close (but not perfect) match at least for this ONE test word.

For the name Abram, all with languageSet="auto"

GENERIC APPROX - fails - misses a few tokens

(Continue reading)

R.C. Hoekstra | 30 May 23:41 2014
Picon

[scxml] Re: Re: Re: our project setup: any tips specifically on performance/speed?

Hi Ate, hi list, 

I can share some more information now, and post some code. 

First of all, on our project: 

No, we don't use threads at the moment. Multithreading seems to become a nightmare with over 100 k engine
instances. 

We also don't use the <datamodel> tags at the moment. As datamodel is still in the planning according to the
roadmap, I found it a bit dangerous to rely on it. Also, it does seem a bit inconvenient for our purpose, but
if that's not the case I'm happy to become convinced of the contrary.

(De)Serialization is not an issue at the moment, though it might become an issue in the future. We're
considering two strategies: Maybe just log every transition and do analysis on that log with some tool. Or
dump the whole population of 100,000 agents / scxmlExecutor instances every now and then at fixed times in
some database structure for further analysis. We are still open to suggestions, what this concerns,
though that is of course not really an scxml issue. 
For the rest: the simulation is just running in memory, and for now that doesn't seem to be a problem for the
hardware. 

So here are some key parts of our code / setup (Ate, I can post them without problems now). 
Main question is: which are the elements which are possibly a bottleneck for the performance, and are there
any alternatives for these elements? 

So the disease is modelled by an human.scxml file which defines the states of the disease. Example:

 	<state id="asymptomatic">
		<onentry>
                        <script>
(Continue reading)

R.C. Hoekstra | 30 May 22:45 2014
Picon

[scxml] Re: our project setup: any tips specifically on performance/speed?

Hi Woonsan, Hi Ate, 

(sorry for the late response)

Woonsan wrote:

> If the estimate of the pure SCXML executions can possibly meet your requirements, then I think
> the next thing to consider might be how to reduce IOs if you have to (de)serialize those instances.
> In one of our projects, we initialize a root context and an executor every time before triggering
> events. So, the SCXML definition is responsible for initializing itself (to move the right
> current state) from the given root context (in script blocks). I think this pattern could
> help reduce the amount of (de)serialized data, and so reduce IO.

We haven't given the (de)serialization lots of attention yet. Of course, potentially it can be quite heavy
with a few 100.000 of instances, but I don't know yet what is exactly needed. 
Your pattern sounds interesting, but can you please point out some link to that project, so I can get the real
picture clear? 

thanks for the response, 

Rinke
Oliver Heger | 30 May 21:52 2014
Picon

[ANNOUNCEMENT] Commons BeanUtils 1.9.2 Released

The Apache Commons Team is pleased to announce the availability of
Apache Commons BeanUtils 1.9.2.

The Apache Commons BeanUtils library is a component that provides easy
to use wrappers around the Java Reflection and Introspection capabilities.

Release 1.9.2 is a maintenance release that supports client code in
suppressing specific bean properties. This is useful to protect an
application against uncontrolled access to properties which might be
security relevant. A full list of all changes can be found in the
release notes at
  http://www.apache.org/dist/commons/beanutils/RELEASE-NOTES.txt

Source and binary distributions are available for download from the
Apache Commons download site:
  http://commons.apache.org/proper/commons-beanutils/download_beanutils.cgi

When downloading, please verify signatures using the KEYS file available
at the above location when downloading the release.

For complete information on Commons BeanUtils, including instructions
on how to submit bug reports, patches, or suggestions for improvement,
see the Apache Commons BeanUtils website:

http://commons.apache.org/proper/commons-beanutils/

Oliver Heger, on behalf of the Apache Commons community
Joel Harris | 29 May 19:12 2014
Picon

(beanutils) possible problem with beanutils being used by geoserver

Hello,

I'm trying to utilize the Geoserver v2.5 application on glassfish v4 with
security manager enabled.
when I navigate to certain areas in the web application I get a beanutils
exception (toward the bottom of the stack trace below), trying to call a
getter that apparently doesn't exist. I'm not sure why this is aggravated
by enabling security manager, but perhaps it is bubbling up? This exception
does not show up with security manager disabled.

I have to keep security manager enabled, and can not allow "all
permissions" to the application.
Any help would be appreciated.

org.apache.wicket.WicketRuntimeException: Error attaching this container
for rendering: [MarkupContainer [Component id = listContainer]]
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1765)

at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)

at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
(Continue reading)

Alex Chard | 27 May 15:22 2014
Picon

[email] - Secure Password Authentication in Outlook

Hi all

I'm using the Apache Commons Email classes to send emails using SMTP. I'm
connecting via SMTP so I don't have to support multiple configurations for
different server providers (Outlook, Notes, ect).

As always, it's not that simple.

One of the options Microsoft provide is Secure Password Authentication. A
bit of research shows this is something to do with NTLM, but I'm struggling
a bit with understanding what bit is SPA, and what bit is NTLM. Not to worry
about that for now.

My main question is, does the Apache Commons Email support SPA? If so, how
do I set that? 

Thanks

Alex

Cédric Couralet | 26 May 14:43 2014
Picon

[configuration] Unexpected trimming when value contains escaped delimiter

Hello,

When parsing a property string value containing a delimiter character,
the resulting String is trimmed.
See the following example :
        BaseConfiguration conf = new BaseConfiguration();
        conf.setProperty("test1", "test\r\n");
        conf.setProperty("test2", "test\\,test");
        conf.setProperty("test3", "test\\,test\r\n");
        System.out.println("*" + conf.getString("test1") + "*");
        System.out.println("*" + conf.getString("test2") + "*");
        System.out.println("*" + conf.getString("test3") + "*");

Expected :

*test
*
*test,test*
*test,test
*

Actual:

*test
*
*test,test*
*test,test*

This is caused by the flatten method in PropertyConverter which calls
the split(value,delimiter) which results in
(Continue reading)

He Shiming | 25 May 08:43 2014
Picon

[compress] Decompressing bzip2 binary produced by Python bz2?

Dear Community,

I'm porting a Python program to Java. The Python program makes use of bz2 (
https://docs.python.org/2/library/bz2.html) to compress the input into a
binary buffer. Its original decompressing code is:

decompressor = bz2.BZ2Decompressor()
decompressor.decompress(buffer)

where buffer is produced by file('binary', 'rb').read() . When using the
bzip2 decompressor in Apache Commons:

BZip2CompressorInputStream bis = new BZip2CompressorInputStream(in);

will produce an exception: "Stream is not in the BZip2 format". I checked
the binary buffer, and it does not have a header. It's not a 'bz2' file,
only a buffer segment. According to
http://commons.apache.org/proper/commons-compress/apidocs/src-html/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.html,
the exception is thrown while detecting a 'bz2' file header of 'BZh' +
'1'. On top of that, there appears to be other segment headers it require.

How do I get around this? Can I decompress a buffer directly, and not a bz2
file?

--

-- 
Best regards,
He Shiming
*Kaoya.com <http://kaoya.com> | Goals.io
<http://itunes.apple.com/us/app/goals.io-realize-your-dreams/id496228828?ls=1&mt=8>
| Toppin'Wiper <https://itunes.apple.com/app/toppinwiper/id553527232?mt=8>
(Continue reading)


Gmane