commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ustbcoder" <ustbco...@gmail.com>
Subject [SCXML] A multi-thread supported service and custom action management system for Apache Commons SCXML engine
Date Thu, 01 Apr 2010 13:34:36 GMT
Hi all,

In my daily work, i have develop a demo of "A multi-thread supported service and custom action
management system for Apache Commons SCXML engine". Now, i want to continue this project,
may be i can hold it as a GSoC project under Commons SCXML, i post my idea here to hear your
voice and suggestions. Here is my idea, any advise ? please let me know :-)

-----------------------------------------My idea start below----------------------------------------------------
Title:A multi-thread supported service and custom action management system for Apache Commons
SCXML engine

Abstract:

Apache Commons SCXML is an implementation aimed at creating and maintaining a Java SCXML engine
capable of executing a state machine defined using a SCXML document which is very useful to
handler complex status transfer logic.This project aims to implement a multi-thread supported
service and custom action management system for Commons SCXML.

Description:

State Chart XML (SCXML) provides a generic state-machine based execution environment based
on Harel State Tables and is very useful to handler complex status transfer logic.Apache Commons
SCXML is an implementation aimed at creating and maintaining a Java SCXML engine capable of
executing a state machine defined using a SCXML document. It is just a single thread SCXML
engine,if user want to implement a whole SCXML based application, he must do some secondary
development jobs.
This project aims to develop a open source multi-thread SCXML services management system.
It includes these main function module,and this is also what i need to do:

1.Custom actions management module
All the system custom actions are registered in a configuration xml named system_custom_actions.xml.
Each custom action Java Class must implement interface org.apache.commons.scxml.model.Action,
and write practical code in function execute(final EventDispatcher evtDispatcher, final ErrorReporter
errRep, final SCInstance scInstance, final Log appLog, final Collection derivedEvents)
When system initializate, load all the custom actions Class from system_custom_actions.xml,instance
them and add them into system context environment.User can use this mechanism to add his own
custom actions to the system
Create a Java Swing based Graphics User Interface to add,modify,delete custom actions into
the system.

2.Thread pool management module
Use a thread pool mechanism to manage SCXML engines. The thread pool properties information
is stored in a XML confiuration file named system_thread_pool.xml,it includes these attributes:
min_thead_number,max_thread_number,thread_release_timespan may be some more
When system initializate, it will instance several SCXML engines objects according to min_thread_number.
If these thread are all busy, but one new service is start,system will start a new thread
to handle this service. The thead number can not outstrip max_thread_number. If a thread has
been free for a period of time which is marked by attribute thread_release_timespan,system
will release this thread. 

3.Service management module
Every application service is a SCXML document,all the system services are registered in a
configuration xml file named system_service.xml, each service has a unique id which is used
to mark the service.

4.Service manage and monitor module
Build a Java Swing GUI to check service list,start,stop,deploy or delete some services.And
also, it has a sub system to monitor running service status,look over data in running context,reset
this service or kill it.
5.Event dispatch module
Implement a EventDispather class instance to send Event to the system. Each Event will contain
a service id which is used to mark its owner service and specific event content.

This is a whole SCXML deploy and management system. If user want to implement some SCXML based
application, just write proper SCXML document and corresponding custom actions,register them
in to the system,and start the service,it is done.
I think it is a practical SCXML engine,it will make Apache Commons SCXML more and more popular,In
fact, i have finish some function module, such as custom action management module
.
-------------------------------------------My idea end---------------------------------------------------------------

That is all, thank you

Xunlong Gui
2010-04-01 



ustbcoder 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message