Re: [FRIAM] Charging agents for the computations they do

2011-03-08 Thread Dale Schumacher
One thread that has run through much of Carl Hewitt's writing on
Actors is the concept of a sponsor for a computation.  This can be
used to control things like execution of multiple independent
solutions to the same problem so that alternatives can be terminated
when any one of them finds a solution.  It also could provide a basis
for very fine-grained cost allocation.  Carl's recent work on
ActorScript, and technologies relating to privacy friendly cloud
computing, may support something like what you want.

I plan to include this kind of capability in my Organix/Humus system,
but it's not really ready for commercial use.  Contact me directly if
you would be interested in having me work on a custom solution for
you.

On Mon, Mar 7, 2011 at 11:48 PM, Russ Abbott russ.abb...@gmail.com wrote:
 Thanks, Stephen.  How come you only post announcements to Friam?

 About Google, they have an advantage over my situation. They can start and
 stop the clock when they start and stop the application. I don't know that I
 can do that for agents. Also, I have no control over whether something else
 runs while an agent's code is running. In a side conversation it occurred to
 me that this might be a good application for Aspect Oriented Programming.
 But it would still be more work than I was hoping to do. It's strange this
 hasn't been considered before.

 -- Russ




 On Mon, Mar 7, 2011 at 1:54 PM, Stephen Guerin stephen.gue...@redfish.com
 wrote:

 Hey Russ,

 You might look at how Google App Engine tries to get a handle on this
 when charging for CPU:
  http://code.google.com/appengine/docs/billing.html

 Josh has pointed out that there's some weird interpretations. For
 instance, they quote $0.10 per cpu hour but don't specify the CPU. Is
 it the canonical CPU at standard atmosphere? :-)

 Google google app engine calculating one cpu hour to see interesting
 corner cases.

 -S

 On Mon, Mar 7, 2011 at 12:56 PM, Gary Schiltz
 g...@naturesvisualarts.com wrote:
  Interesting idea. Most Common Lisp implementations compile to native
  machine
  code, so it might not be too hard to instrument the generated code to do
  some kind of bookeeping. There are quite a few open source
  implementations
  out there, e.g. Steel Bank Common Lisp (www.sbcl.org) or Clozure Common
  Lisp
  (trac.clozure.com/ccl).
  ;; Gary
 
 
  On Mar 7, 2011, at 12:38 PM, Russ Abbott wrote:
 
  I'm considering the development of an ABM in which the agents are
  charged
  for the computations they do.  But I can't think of a language that
  facilitates that. I know that in most languages one can look at the
  real-time clock, but I can't think of a language in which one can look
  at a
  dynamic count of (virtual) instructions executed -- or even an dynamic
  measure of the amount of CPU time devoted to executing
  the instructions of
  each agent. Am I missing something obvious? Can anyone help.
  Thanks.
 
  -- Russ
 
  
  FRIAM Applied Complexity Group listserv
  Meets Fridays 9a-11:30 at cafe at St. John's College
  lectures, archives, unsubscribe, maps at http://www.friam.org
 



 --
 --- -. .   ..-. .. ...    - .-- ---   ..-. .. ... 
 stephen.gue...@redfish.com
 624 Agua Fria, Santa Fe, NM 87501
 office: 505.995.0206 mobile: 505.577.5828

 redfish.com  |  sfcomplex.org  |  simtable.com  |  ambientpixel.com

 
 FRIAM Applied Complexity Group listserv
 Meets Fridays 9a-11:30 at cafe at St. John's College
 lectures, archives, unsubscribe, maps at http://www.friam.org


 
 FRIAM Applied Complexity Group listserv
 Meets Fridays 9a-11:30 at cafe at St. John's College
 lectures, archives, unsubscribe, maps at http://www.friam.org



FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org


Re: [FRIAM] Charging agents for the computations they do

2011-03-08 Thread Rikus Combrinck
The Linux C library (probably most *nixes) has a time() function that can
return, amongst others, the actual time that the CPU dedicated to the
calling process, as opposed to simple elapsed time.  Unfortunately, I don't
think it can be made to report on thread level, which is probably what you'd
like.  For what it's worth:
  http://linux.die.net/man/2/times

There is an associated shell command that can report the same information:
  http://linux.die.net/man/1/time

Related:
  http://linux.die.net/man/2/getrusage

I'm almost certain the Win32 API does not support anything similar.

Rikus


On Mon, Mar 7, 2011 at 19:38, Russ Abbott russ.abb...@gmail.com wrote:

I'm considering the development of an ABM in which the agents are charged
 for the computations they do.  But I can't think of a language that
 facilitates that. I know that in most languages one can look at the
 real-time clock, but I can't think of a language in which one can look at a
 dynamic count of (virtual) instructions executed -- or even an dynamic
 measure of the amount of CPU time devoted to executing the instructions of
 each agent. Am I missing something obvious? Can anyone help.

 Thanks.

 *-- Russ*


FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Re: [FRIAM] Charging agents for the computations they do

2011-03-08 Thread Owen Densmore
Russ: could you say more about the ABM?  

Is it distributed? Cloud (AWS or GAE)? What language? GIS/Location Aware? 
Browser capable? Graphically intense (i.e. openGL/GLES/webgl or vanilla 2D)? 
GPU based?  Scale (single system or cluster; how many agents)? .. and about 
another billion possibilities!

Environment will have a lot to do with the cost strategy.

One ABM approach we use on projects here is to sketch in NetLogo to get the 
basics down, then for a fairly useful performance gain, move on to Processing.  
This gives us roughly 100,000+ agents fairly easily.  Then on to specialized 
systems depending on needs.  We also combine systems, for example do runs in 
NetLogo, possibly headless, and then output the run to a 3D display 
environment.

Doug Roberts can pipe in on really large scale, clustered systems.

We are looking into a new architecture that uses tiny servers built on Node.js 
scattered world wide using backbone networking.  For example, we measured 
Google-Amazon-Joyent communication to be 50Mb/s (all are in a NOC: Network 
Operations Center or have high bandwidth access to it.)  For a bit extra, we 
can get over 100Mb/s but its not a standard feature yet.

-- Owen

On Mar 8, 2011, at 9:40 AM, Rikus Combrinck wrote:

 The Linux C library (probably most *nixes) has a time() function that can 
 return, amongst others, the actual time that the CPU dedicated to the calling 
 process, as opposed to simple elapsed time.  Unfortunately, I don't think it 
 can be made to report on thread level, which is probably what you'd like.  
 For what it's worth:
   http://linux.die.net/man/2/times
 
 There is an associated shell command that can report the same information:
   http://linux.die.net/man/1/time
 
 Related:
   http://linux.die.net/man/2/getrusage
 
 I'm almost certain the Win32 API does not support anything similar.
 
 Rikus
 
 
 On Mon, Mar 7, 2011 at 19:38, Russ Abbott russ.abb...@gmail.com wrote:
 
 I'm considering the development of an ABM in which the agents are charged for 
 the computations they do.  But I can't think of a language that facilitates 
 that. I know that in most languages one can look at the real-time clock, but 
 I can't think of a language in which one can look at a dynamic count of 
 (virtual) instructions executed -- or even an dynamic measure of the amount 
 of CPU time devoted to executing the instructions of each agent. Am I missing 
 something obvious? Can anyone help.
 
 Thanks.
  
 -- Russ
 
 FRIAM Applied Complexity Group listserv
 Meets Fridays 9a-11:30 at cafe at St. John's College
 lectures, archives, unsubscribe, maps at http://www.friam.org



FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org


Re: [FRIAM] Charging agents for the computations they do

2011-03-08 Thread Russell Standish
On Tue, Mar 08, 2011 at 06:40:16PM +0200, Rikus Combrinck wrote:
 The Linux C library (probably most *nixes) has a time() function that can
 return, amongst others, the actual time that the CPU dedicated to the
 calling process, as opposed to simple elapsed time.  Unfortunately, I don't
 think it can be made to report on thread level, which is probably what you'd
 like.  For what it's worth:
   http://linux.die.net/man/2/times
 
 There is an associated shell command that can report the same information:
   http://linux.die.net/man/1/time
 
 Related:
   http://linux.die.net/man/2/getrusage
 
 I'm almost certain the Win32 API does not support anything similar.
 
 Rikus
 

Yes it does, although in typical Microsoft fashion, the details differ:

http://msdn.microsoft.com/en-us/library/ms683223(v=vs.85).aspx

(I had cause to look into this recently :).

Also my jellyfish model distributed with the EcoLab library is a case
of using times to weight the agents by how much CPU time they
consume. Unfortunately for the OP, this used a distributed memory
message passing model for parallelism, so it worked in this case. I
can't see how to get CPU time reporting at the thread level.

Cheers


-- 


Prof Russell Standish  Phone 0425 253119 (mobile)
Mathematics  
UNSW SYDNEY 2052 hpco...@hpcoders.com.au
Australiahttp://www.hpcoders.com.au



FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org


Re: [FRIAM] Charging agents for the computations they do

2011-03-08 Thread Rikus Combrinck
Thanks, that's good to know!  --Rikus


On Tue, Mar 8, 2011 at 23:22, Russell Standish r.stand...@unsw.edu.auwrote:


 Yes it does, although in typical Microsoft fashion, the details differ:

 http://msdn.microsoft.com/en-us/library/ms683223(v=vs.85).aspx

 (I had cause to look into this recently :).


FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

[FRIAM] Charging agents for the computations they do

2011-03-07 Thread Russ Abbott
I'm considering the development of an ABM in which the agents are charged
for the computations they do.  But I can't think of a language that
facilitates that. I know that in most languages one can look at the
real-time clock, but I can't think of a language in which one can look at a
dynamic count of (virtual) instructions executed -- or even an dynamic
measure of the amount of CPU time devoted to executing the instructions of
each agent. Am I missing something obvious? Can anyone help.

Thanks.

*-- Russ*



On Mon, Mar 7, 2011 at 5:42 AM, Dale Schumacher
dale.schumac...@gmail.comwrote:

 Parsing Expression Grammars, part 2 (http://bit.ly/gDrbmi) goes beyond
 simple matching with semantic values, predicates and actions.

 
 FRIAM Applied Complexity Group listserv
 Meets Fridays 9a-11:30 at cafe at St. John's College
 lectures, archives, unsubscribe, maps at http://www.friam.org


FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Re: [FRIAM] Charging agents for the computations they do

2011-03-07 Thread Gary Schiltz
Interesting idea. Most Common Lisp implementations compile to native machine 
code, so it might not be too hard to instrument the generated code to do some 
kind of bookeeping. There are quite a few open source implementations out 
there, e.g. Steel Bank Common Lisp (www.sbcl.org) or Clozure Common Lisp 
(trac.clozure.com/ccl).

;; Gary


On Mar 7, 2011, at 12:38 PM, Russ Abbott wrote:

 I'm considering the development of an ABM in which the agents are charged for 
 the computations they do.  But I can't think of a language that facilitates 
 that. I know that in most languages one can look at the real-time clock, but 
 I can't think of a language in which one can look at a dynamic count of 
 (virtual) instructions executed -- or even an dynamic measure of the amount 
 of CPU time devoted to executing the instructions of each agent. Am I missing 
 something obvious? Can anyone help.
 
 Thanks.
  
 -- Russ


FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Re: [FRIAM] Charging agents for the computations they do

2011-03-07 Thread Stephen Guerin
Hey Russ,

You might look at how Google App Engine tries to get a handle on this
when charging for CPU:
  http://code.google.com/appengine/docs/billing.html

Josh has pointed out that there's some weird interpretations. For
instance, they quote $0.10 per cpu hour but don't specify the CPU. Is
it the canonical CPU at standard atmosphere? :-)

Google google app engine calculating one cpu hour to see interesting
corner cases.

-S

On Mon, Mar 7, 2011 at 12:56 PM, Gary Schiltz
g...@naturesvisualarts.com wrote:
 Interesting idea. Most Common Lisp implementations compile to native machine
 code, so it might not be too hard to instrument the generated code to do
 some kind of bookeeping. There are quite a few open source implementations
 out there, e.g. Steel Bank Common Lisp (www.sbcl.org) or Clozure Common Lisp
 (trac.clozure.com/ccl).
 ;; Gary


 On Mar 7, 2011, at 12:38 PM, Russ Abbott wrote:

 I'm considering the development of an ABM in which the agents are charged
 for the computations they do.  But I can't think of a language that
 facilitates that. I know that in most languages one can look at the
 real-time clock, but I can't think of a language in which one can look at a
 dynamic count of (virtual) instructions executed -- or even an dynamic
 measure of the amount of CPU time devoted to executing the instructions of
 each agent. Am I missing something obvious? Can anyone help.
 Thanks.

 -- Russ

 
 FRIAM Applied Complexity Group listserv
 Meets Fridays 9a-11:30 at cafe at St. John's College
 lectures, archives, unsubscribe, maps at http://www.friam.org




-- 
--- -. .   ..-. .. ...    - .-- ---   ..-. .. ... 
stephen.gue...@redfish.com
624 Agua Fria, Santa Fe, NM 87501
office: 505.995.0206 mobile: 505.577.5828

redfish.com  |  sfcomplex.org  |  simtable.com  |  ambientpixel.com


FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org


Re: [FRIAM] Charging agents for the computations they do

2011-03-07 Thread Russ Abbott
Thanks, Stephen.  How come you only post announcements to Friam?

About Google, they have an advantage over my situation. They can start and
stop the clock when they start and stop the application. I don't know that I
can do that for agents. Also, I have no control over whether something else
runs while an agent's code is running. In a side conversation it occurred to
me that this might be a good application for Aspect Oriented Programming.
But it would still be more work than I was hoping to do. It's strange this
hasn't been considered before.

*-- Russ
*



On Mon, Mar 7, 2011 at 1:54 PM, Stephen Guerin
stephen.gue...@redfish.comwrote:

 Hey Russ,

 You might look at how Google App Engine tries to get a handle on this
 when charging for CPU:
  http://code.google.com/appengine/docs/billing.html

 Josh has pointed out that there's some weird interpretations. For
 instance, they quote $0.10 per cpu hour but don't specify the CPU. Is
 it the canonical CPU at standard atmosphere? :-)

 Google google app engine calculating one cpu hour to see interesting
 corner cases.

 -S

 On Mon, Mar 7, 2011 at 12:56 PM, Gary Schiltz
 g...@naturesvisualarts.com wrote:
  Interesting idea. Most Common Lisp implementations compile to native
 machine
  code, so it might not be too hard to instrument the generated code to do
  some kind of bookeeping. There are quite a few open source
 implementations
  out there, e.g. Steel Bank Common Lisp (www.sbcl.org) or Clozure Common
 Lisp
  (trac.clozure.com/ccl).
  ;; Gary
 
 
  On Mar 7, 2011, at 12:38 PM, Russ Abbott wrote:
 
  I'm considering the development of an ABM in which the agents are charged
  for the computations they do.  But I can't think of a language that
  facilitates that. I know that in most languages one can look at the
  real-time clock, but I can't think of a language in which one can look at
 a
  dynamic count of (virtual) instructions executed -- or even an dynamic
  measure of the amount of CPU time devoted to executing
 the instructions of
  each agent. Am I missing something obvious? Can anyone help.
  Thanks.
 
  -- Russ
 
  
  FRIAM Applied Complexity Group listserv
  Meets Fridays 9a-11:30 at cafe at St. John's College
  lectures, archives, unsubscribe, maps at http://www.friam.org
 



 --
 --- -. .   ..-. .. ...    - .-- ---   ..-. .. ... 
 stephen.gue...@redfish.com
 624 Agua Fria, Santa Fe, NM 87501
 office: 505.995.0206 mobile: 505.577.5828

 redfish.com  |  sfcomplex.org  |  simtable.com  |  ambientpixel.com

 
 FRIAM Applied Complexity Group listserv
 Meets Fridays 9a-11:30 at cafe at St. John's College
 lectures, archives, unsubscribe, maps at http://www.friam.org


FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org