thanks for your suggestion and for your confirmation ; in fact I am just using PHP for test purpose and if the test framework fullfills our requirements, I'll develop a C program instead, having itself to get the data from a shared memory.
On Dec 21, 7:22 pm, Johnathan Leppert <[email protected]> wrote: > It's possible to put data into memcache with your PHP application and have > APE read this data via a running javascript application in APE. However, > your solutions sounds fine for initial development and would be the > simplest. > > On Tue, Dec 21, 2010 at 12:33 PM, Jean-Marie <[email protected]> wrote: > > thanks a lot Johnathan for your reply ; > > I am a beginner at APE development so any advice is very welcomed > > since I want to use it in the best way ; > > > just a detail regarding the socket implementation : my php application > > opens a socket once > > which connects to the server socket opened when APE server starts ; > > then the application socket remains open while the data are written to > > the server socket. > > > I am open to the simplest solution ; > > but i don't undestand do you mean by beanstalk or redis client ? > > do you refer to a javascript running in a browser and broadcasting the > > data ? > > > could you give me more details > > > thanks in advance > > > Jean-Marie > > > On Dec 21, 4:35 pm, Johnathan Leppert <[email protected]> > > wrote: > > > Personally I don't think this is the best way. There is a lot of overhead > > to > > > opening up sockets in PHP, and it just seems messy to me. I think you're > > > better off pushing data to APE by way of a simple beanstalk or redis > > client. > > > > On Tue, Dec 21, 2010 at 3:47 AM, Jean-Marie <[email protected]> wrote: > > > > The solution I found is posted further using Ape.sockServer > > > > > JM > > > > > On Dec 15, 6:30 pm, Jean-Marie <[email protected]> wrote: > > > > > Hello > > > > > > I read in APE tutorial that > > > > > "The libape-controller is the easiest way to push data from external > > > > > applications to APE" > > > > > but is it the fastest and the safiest ? > > > > > > In the program below I give an example of an application > > > > > (broadcastframes.php ) > > > > > sending a request to APE server every 10 ms. > > > > > I noticed that the charge memory of aped process is increasing > > > > > regularly until > > > > > all the system gets blocked ( when reaching around the 130000th > > > > > request) > > > > > and a message is eventually displayed regularly such as : > > > > > "PHP Warning: file_get_contents(http://ape.ape-test.local:6969/? > > > > > %5..... > > > > > failed to open stream: Connection refused in /var/www/apejsf/Demos/ > > > > > DisplayFrames/broadcastframes.php on line 23" > > > > > > this line corresponds to the following http request : > > > > > $data = > > > > > file_get_contents($APEserver.rawurlencode(json_encode($cmd))); > > > > > > Is there a mean to send data from an application to APE server at a > > > > > high frequency > > > > > without having this memory trouble ? > > > > > > thanks in advance for any help > > > > > > Jean-Marie > > > > > > -------------------------------------------------------- > > > > > see below the program broadcastframes.php > > > > > > <?php > > > > > $APEserver = 'http://ape.ape-test.local:6969/?'; > > > > > $APEPassword = 'testpasswd'; > > > > > > $messages='1'; > > > > > > $cmd = array(array( > > > > > 'cmd' => 'inlinepush', > > > > > 'params' => array( > > > > > 'password' => $APEPassword, > > > > > 'raw' => 'postmsg', > > > > > 'channel' => 'testchannel', > > > > > 'data' => array( //Note: data can't be a string > > > > > 'message' => $messages > > > > > ) > > > > > ) > > > > > )); > > > > > > for( $i = 1; $i < 1000000; $i++ ) { > > > > > $framesent=$cmd[0]['params']['data']['message']="Frame > > "."$i"; > > > > > $data = > > > > > file_get_contents($APEserver.rawurlencode(json_encode($cmd))); > > > > > print( "data sent = $framesent\n"); > > > > > usleep(10000); > > > > > > } > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "APE Project" group. > > > > To post to this group, send email to [email protected] > > > > To unsubscribe from this group, send email to > > > > [email protected]<ape-project%[email protected]> > > <ape-project%[email protected]<ape-project%[email protected]> > > > > > For more options, visit this group at > > > >http://groups.google.com/group/ape-project?hl=en > > > > --- > > > > APE Project (Ajax Push Engine) > > > > Official website :http://www.ape-project.org/ > > > > Git Hub :http://github.com/APE-Project/ > > > -- > > You received this message because you are subscribed to the Google > > Groups "APE Project" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<ape-project%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/ape-project?hl=en > > --- > > APE Project (Ajax Push Engine) > > Official website :http://www.ape-project.org/ > > Git Hub :http://github.com/APE-Project/ -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
