Hi,
I have just merged an improvement to UmpleOnline that in my experiments
speeds up Umpleonline considerably.
I need as many of you as possible to please test the 'test' version
located at:
http://cruise.eecs.uottawa.ca/umpleonline/test/
to see if you encounter notable problems before I promote to master. Could
you please all go to the test server and spend 5-10 (or more) minutes
trying out as many options as you can think of (displaying examples,
editing editable diagrams, editing text with the diagram updating,
creating new models, changing options, displaying different diagram types,
generating output in different languages, etc.).
Essentially what I have done is to change core functionality so that
whenever Umple's php web front-end needs to call the compiler (to update a
diagram, update text from a diagram, generate code, generate a new
diagram, etc) it no longer does an 'exec' of a whole new JVM. Instead a
single running instance of the UmpleSync.jar continues to run indefinitely
as an internal server, that communicates with the php front end.
My experiments is that this reduces the load on the CPU by about 80%,
allowing many more simultaneous users. The process of a JVM starting up,
loading the jar and doing the jit of the code seems to have constituted
80% of UmpleOnline's CPU consumption. UmpleOnline before these changes
would slow down with about 20 people working actively, and grind to almost
a halt at 40 people working simulaneously. With the new setup we should be
able to accommondate over 100 before we get serious impact (and for that
we need other cloud-based solutions, to come).
However, if a single instance of the Umple Compiler is running and
serving potentially 100,000 requests in a day (which is what happens when
a large class has an assignment due, as an average student may work for
hours), then if the server crashes it needs to recover.
I don't believe crashes have been occurring often; most of the 'failures'
have been due to excessive slowness. But every now and then I have noted
Umple going into an infinite loop, which clearly would be a problem for a
server!
I have designed the system such that it PhP will start a new server if it
can after it can't connect (e.g. a server has crashed, or is running so
slowly it can't accept connections, or has not started yet). And if the PH
code still can't get through then, it falls back to the old slow exec
approach.
But I haven't yet incorporated a mechanism to deal with infinite loops
(i.e. monitoring threads, and killing them or restarting the server if one
of them is taking excessive CPU for an extended period). So what I want to
do is see if a bunch of you using the server for an extended period can
get it into an infinite loop situation or encounter other issues that need
resolving. If the current test setup seems stable, I think it worth
risking putting it into production.
I have instrumentation set up so I can measure what is going on. Please
report anything odd that you notice.
Thanks
Tim
Timothy C. Lethbridge, PhD, P.Eng., I.S.P., CSDP
Professor of Software Engineering and Computer Science
/ Professeur Titulaire de génie logiciel et d'informatique
and Vice-Dean (governance) / et vice-doyen (gouvernance)
Faculté de genie / Faculty of Engineering
University of Ottawa / Université d'Ottawa
Tel:
613-562-5800x6685 Fax:
613-562-5664 Mobile:
613-252-1850
http://www.eecs.uottawa.ca/~tcl