Phil Lewis wrote:

>I am designing a system that includes a neural network engine. An
equivalent
>system is currently working on the MS platform, but is very unscalable.

>I want to be able to pool neural network beans, as requests for searches
are
>fairly rare, but come from many many clients.

>However, there are many different instances of NN, all represented by the
>same class.

>Specifically, there is a NN for each category that the user can perform a
>search against. These categories are completely unrelated to each other.

>The stae of each net is stored in a file. For a large net, it can take in
>the order of 2 seconds to read the file and build the net, using highly
>optimised C++, so I can't load the net on each request (search turnaround
>must be sub one second).

>I have determined (so far) the following possibilities:

>1.      Maintain a pool of session beans, each of which loads all nets.
However,
>each session bean could become quite large. Is there any way for me to
>determine how large? I know how to work out how many nodes and arcs a net
>will have from a given data set, and how many ints, floats ...etc that
will
>be created, but I don't think that just adding up the storage requirements
>of the native types at the leaves of the object tree will tell me how much
>storage will actually be need by an instance of a bean running in a
>container.

>2.      Represent each net as an entity bean and then have session beans
that do
>findByPrimaryKey to get a handle on the correct net during the session.
What
>happens if two sessions both try to call the same method on it at the same
>time? And how do I cope with the fact that the entity does not actually
>represent a db entity?

>3.      A third aletrnative is to have session beans that use an LRU
algorithm to
>maintain a truncated list of nets. This would mean that the user would
>occaisionally experience slight delay as the appropriate net is loaded.
>(Load time could be reduced to the order of .5 seconds in this scenario,
by
>using a selective load algorithm).

>It seems like in point 3 I am trying to do something that EJB itself
should
>be doing, and I wonder if I'm missing something.

Phil, There are things you haven't told us:

1. What language is the NN engine itself written in - C++ or Java?

2. Assuming C++, then:
   2a. How will java code call the NN engine - JNI or IPC or sockets?
   2b. How will the C++ objects representing the neural networks be
located.

3. Assuming java, then:
   3a. How does the data generated by the C++ net builder get into the JVM
to be operated upon by the engine?
   3b. Can this be done quickly?

Whatever the answers to the above, I don't think entity beans are relevant
here because of their intricate relationship with a transaction manager.

More generally, since you seem basically to be worrying about issues of
caching and locating in-memory data, what problem are you hoping EJB will
solve for you?


Ian McCallion
CICS Business Unit
IBM Hursley
[EMAIL PROTECTED]
Tel: ++44-1962-818065
Fax: ++44-1962-818069

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to