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 16:54:48
|
Indeed, this would be a good idea. Cheers, Matthias Saverio Giallorenzo schrieb: > My proposal is to add a section after "Creating a communication port"[1] > that specifies how ports are used for input/output (via operations). > If you have any ideas or want to write a first draft to discuss on > you are very welcome :) > > [1] > http://www.jolie-lang.org/?top_menu=documentation&sideMenuAction=basics/communication_ports#creating-a-communication-port > > > > 2013/11/21 Saverio Giallorenzo <sav...@gm... > <mailto:sav...@gm...>> > > Ok, > I will sort out something. > > SG > > > 2013/11/21 Fabrizio Montesi <fam...@gm... > <mailto:fam...@gm...>> > > Seems OK! Saverio, is it possible to put it as an aside tip, > not to > confuse the reader? > > Also, "would be defined" => "were defined" > > > - Fabrizio > > On Thu, Nov 21, 2013 at 12:29 PM, Matthias Dieter Wallnöfer > <mwa...@ya... <mailto:mwa...@ya...>> wrote: > > 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... <mailto: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... > <mailto: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... > <mailto:Jol...@li...> > >> https://lists.sourceforge.net/lists/listinfo/jolie-devel > > > > > > > |