[cap-talk] choice of client-side for distributed application (was: network level designation and authorization (RANT))

Toby Murray toby.murray at dsto.defence.gov.au
Thu Jun 8 01:21:02 EDT 2006


John Carlson wrote:

>On Jun 7, 2006, at 5:31 PM, Karp, Alan H wrote:
>
>  
>
>>Far better and far simpler
>>is using unguessable addresses as with web-calculus.
>>    
>>
>
>Okay, let's use web-calculus.  How do I write a client that can
>use web-calculus to manage a capability passing system.
>Say I want to exchange capabilities and build trust between
>people?  And based upon this, how would I write a multiuser
>whiteboard?  So far, what I've seen of the client side of web-calculus,
>it involves using the  POST and GET classes, and the parameters names  
>that
>you are supposed to pass are extremely hard to get ahold of
>(requiring knowledge of XSLT).  How do we make it easier for
>people to write the client side of web-calculus.  Perhaps I am
>missing something from the documentation?
>
>  
>
It sounds like you want to write your own client app in Java (I see you 
say this below). I would consider trying another approach, rather than 
the web calculus, particularly if you've found it not so amenable to the 
job you want to do. (I have no idea if the web calculus libraries are 
designed for client side Java programming by the way.)
If you're not against using another language, why not use E instead? One 
can knock up a distributed application in E *very* quickly. It sounds 
like you're into Scheme. E won't look too unfamiliar to you then. Given 
that the primary E implementation is on Java, it might be a good choice.

(Sorry, I'm no Scheme hacker - the following code is probably bogus but 
I hope you get the idea)

(define objectMaker (lambda (initialValue) (
   (define object (lambda (methodName args) (cond ((eq? methodName 
'incr) (set! initialValue (+ initialValue 1)) )
                                                  ((eq? methodName 
'decr) (set! initialValue (- initialValue 1)) )
                                                  ((eq? methodName 
`getValue) (initialValue) )
                                                  (else () )
                                            )
                  )
    )
)

(define myObject (objectMaker 1)
(myObject incr)
(define two (myObject getValue)

vs.

def objectMaker(var initialValue) :int {
    def object {
        to incr() :void {initialValue += 1)
        to decr() :void (initialValue -= 1)
        to getValue() :int (initialValue)
    }
}
def myObject := objectMaker(1)
myObject.incr()
def two := myObject.getValue()
                                 
If you want to stick with Java, you could make use of the underlying 
libraries on which E is implemented: ELib. They're written in Java and 
might get you a long way towards your goal of a distributed 
capability-based whiteboard system.

-- 
Toby Murray
Advanced Computer Capabilities Group
Information Networks Division
DSTO, Australia

IMPORTANT: This e-mail remains the property of the Australian Defence
Organisation and is subject to the jurisdiction of section 70 of the
Crimes Act 1914. If you have received this e-mail in error, you are
requested to contact the sender and delete the e-mail.



More information about the cap-talk mailing list