Re: [Jolie-devel] OneWay messages / Doc fix
A service-oriented programming language.
Brought to you by:
fmontesi
From: Matthias D. W. <mwa...@ya...> - 2013-11-21 11:30:00
|
Hi Fabrizio & Saverio, I would propose some doc change to clear this one - since it did not seem obvious to me. Cheers, Matthias Matthias Dieter Wallnöfer schrieb: > Hi Fabrizio, > > this works well, but on the client side >> main >> { >> twice@TwiceService( 5 ) >> } > I get a Java EOF exception. I imagine that this could be a coordination > issue? >> Nov 21, 2013 11:49:30 AM jolie.Interpreter logWarning >> WARNING: [client.ol] java.io.EOFException >> at java.io.DataInputStream.readFully(DataInputStream.java:197) >> at java.io.DataInputStream.readLong(DataInputStream.java:416) >> at jolie.net.SodepProtocol.readMessage(SodepProtocol.java:252) >> at jolie.net.SodepProtocol.recv(SodepProtocol.java:305) >> at jolie.net.SocketCommChannel.recvImpl(SocketCommChannel.java:92) >> at jolie.net.CommChannel.recv(CommChannel.java:198) >> at >> jolie.net.AbstractCommChannel$ResponseReceiver.run(AbstractCommChannel.java:226) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >> at java.lang.Thread.run(Thread.java:724) > Cheers, > Matthias > > Fabrizio Montesi schrieb: >> Hi Matthias, >> this: >>> twice( number ) { >>> result = number * 2; >>> println@Console( result )(); >>> } >> is not a construct in the language. Request-Response operations >> support the { block } construct because it is useful to specify >> something to happen *in-between* the request and the response. For >> one-ways this is not necessary because they just receive something. >> Hence you can just use the semicolon operator for expressing a >> sequence and obtain what you want: >> >> twice( number ); >> result = number * 2; >> println@Console( result )() >> >> >> Cheers, >> Fabrizio. >> >> >> On Thu, Nov 21, 2013 at 11:04 AM, Matthias Dieter Wallnöfer >> <mwa...@ya...> wrote: >>> Hi developers, >>> >>> I got another question: in >>> http://www.jolie-lang.org/?top_menu=documentation&sideMenuAction=getting_started/behavior_and_deployment >>> we have a simple client-server example: >>>> |main| >>>> |{| >>>> |||twice( number )( response ) {| >>>> |||response = number * ||2| >>>> |||}| >>>> |}| >>> But when I change it to be one-way I run into trouble: >>>> interface TwiceInterface { >>>> OneWay: twice( int ) >>>> } >>> and >>>> main >>>> { >>>> twice( number ) { >>>> result = number * 2; >>>> println@Console( result )(); >>>> } >>>> } >>> does not work. Why? >>> >>> Do I need something like this? >>>> main >>>> { >>>> [ twice( number ) ] { >>>> result = number * 2; >>>> println@Console( result )(); >>>> } >>>> } >>> Cheers, >>> Matthias >>> >>> ------------------------------------------------------------------------------ >>> Shape the Mobile Experience: Free Subscription >>> Software experts and developers: Be at the forefront of tech innovation. >>> Intel(R) Software Adrenaline delivers strategic insight and game-changing >>> conversations that shape the rapidly evolving mobile landscape. Sign up now. >>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Jolie-devel mailing list >>> Jol...@li... >>> https://lists.sourceforge.net/lists/listinfo/jolie-devel > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Jolie-devel mailing list > Jol...@li... > https://lists.sourceforge.net/lists/listinfo/jolie-devel |