Thanks for sharing too. I hope that I can see a way to convert tasks or schedulers into threads from your work.
I've since updated the scheduler.ijs file and wiki page with more task examples and stress tests. http://www.jsoftware.com/jwiki/PascalJasmin/OOP%20scheduler%20and%20ZeroMQ ________________________________ From: Joe Bogner <[email protected]> To: [email protected] Sent: Friday, November 22, 2013 10:39:43 AM Subject: Re: [Jprogramming] wiki: task scheduler and zeromq intro Thanks for sharing. I am also interested in this topic and your post motivated me to make more progress on my j-fork-server[1] toy example. I added logic to the spawned jconsole to return a HTTP response. It's crude, but I was just curious what was possible. I was pleased to see that I could run it against a http benchmarking tool (boom) and supported 16 requests per second with 5 concurrent workers on 100 requests on my windows box. I intend to build it out more as a basic concurrent web server example. It was important to me to support concurrency in case requests take a long time to return. Also, concurrency will enable parallelism. A client could execute parallel requests to the J web server with each request performing a task or operating on a block of work. The client could then collect the results and present them. The code is very messy so I will attempt to explain the framework. 1. jconsole listener has a loop that is listening for socket requests * note: I also have an example that runs sdselect on a Windows timer callback. It allows interaction with the jconsole but is not very stable. I've had it crash with more than 3 concurrent requests 2. When a request comes it, it creates a new jconsole process and writes the socket handle to a shared text file. The spawned console process gets the socket handle from the text file and duplicates the the handle. It can then handle the request. I don't expect that this will ever compete with a node.js or nginx or any other hardened solution. It could be an interesting, non-mission critical option. [1] - https://github.com/joebo/j-fork-server/ On Thu, Nov 21, 2013 at 11:27 PM, Pascal Jasmin <[email protected]>wrote: > http://www.jsoftware.com/jwiki/PascalJasmin/OOP%20scheduler%20and%20ZeroMQ > > Thanks to Scott for getting this started. Its a work in progress, but its > probably more helpful to see the simplest core version first, than just the > bloated version. > > > The scheduler is a framework for multitasking several polling (endless) > loops within a single J instance. The simplest multithreading > synchronization library is avoiding multithreading altogether, and an in > process scheduler allows what are semantically seperate processes to work > together without concerning yourself about the possibilities of one process > writting to a variable that is being read or written to by another process. > > It can integrate with other "real" multiprocessing setups by grouping > together tasks that need tight cooperation. The canonical usefulness is for > socket programing, which typically involve polling loops for each client > and server that add testing tedium even with just a single client and > server. The scheduler eases development and testing of several clients and > servers all in a single application, and simplifies testing/learning of > frameworks like ZeroMQ and its J implementation. > > ________________________________ > From: Björn Helgason <[email protected]> > To: Programming forum <[email protected]> > Sent: Thursday, November 21, 2013 12:50:09 PM > Subject: Re: [Jprogramming] fif addons > > > thx > > pretty nice > On 21 Nov 2013 17:02, "bill lam" <[email protected]> wrote: > > > Have your android device rooted and install busybox. Then grep > > will be available. > > > > Чт, 21 ноя 2013, Björn Helgason писал(а): > > > When I try to run plot in either console or jhs on android I get a > value > > > error on StartActivity. > > > > > > Knowing from former experiments that addons can ruin my installation I > do > > > not want to install all addons. > > > > > > It may take a long time to go through the addons one by one so I am > > looking > > > for a way to search the addons I have not installed for which one > > contains > > > what I need. > > > > > > The help might also be a bit more specific of how to use fif in jhs on > > the > > > android if I want to look through everything. > > > > > > Examples would be nice. > > > > > > It would also be good to be able to chose where the J folders are > > installed. > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > -- > > regards, > > ==================================================== > > GPG key 1024D/4434BAB3 2008-08-24 > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
