Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

Inter Process Communication/Remoting library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-29-2009, 04:10 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default Inter Process Communication/Remoting library

At last I have managed to come up with a dead easy to use inter process communication library. This awesome (if only you knew what was going on behind the scenes) library lets one Basic4ppc client application call the Subs of another Basic4ppc server application on the same computer, over a network or even over the Internet!

It is based on two technologies. The .NET Remoting facility that is built in to the .NET Framework and the Caller code from my Basic4ppc debug suite http://www.basic4ppc.com/forum/addit...html#post27120

Unfortunately this will only work on the desktop as the Compact Framework does not support Remoting although there are a couple of third-party implementations that I may investigate - cost permitting.

As usual library, source, help and deceptively simple demo applications are included.

EDIT: As a clarification. An application is not restricted to a single RemoteObject. So, for example, a pair of comunicating apps could each have two RemoteObjects on different ports and with different remote service names, one a client to the other app and one a server to it. This would enable two-way calling of each others Subs. Things could get a bit confusing though if you aren't careful!

EDIT:- Version 1.1 now posted includes a RemotingCF library that will work on devices and between desktops and devices. See post #10 for details.

EDIT:- Version 2.0 for Basic4ppc v6.90 and later now posted. See post #13 for details.
Attached Files
File Type: zip Remoting1.1.zip (41.7 KB, 148 views)
File Type: zip Remoting2.0.zip (43.0 KB, 83 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 10-30-2010 at 08:10 AM.
Reply With Quote
  #2 (permalink)  
Old 09-29-2009, 05:12 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Andrew
This is beautiful, and I don't want to know what is going on behind the scenes...

I see a mountain of games for two players, using exactly the same code, where each player does his move on his application and his opponents application, without messages.

Thanks
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #3 (permalink)  
Old 09-29-2009, 07:36 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Thank you once again for your magnificent creations
Reply With Quote
  #4 (permalink)  
Old 09-29-2009, 09:24 PM
Basic4ppc Veteran
 
Join Date: Feb 2008
Location: Hilversum, The Netherlands
Posts: 295
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Brilliant!
Reply With Quote
  #5 (permalink)  
Old 09-30-2009, 12:16 PM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

Brilliant.
Reply With Quote
  #6 (permalink)  
Old 10-02-2009, 03:23 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Andrew
Playing with this library, I managed to connect on my home lan, using TCP and the host name, but not when using the host internal IP :

This works - Remote.connect("Tcp" , "main" , 51234 , "Remote")
and this doesn't - Remote.connect("Tcp" , "192.168.0.167" , 51234 , "Remote")

In the second case I get this error:

"Remote.CallGuiSub("Launch",par())
Error description:
Server encountered an internal error. For more information, turn off customerrors in the server's.config file"

What am I doing wrong ?
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 10-02-2009 at 03:26 PM.
Reply With Quote
  #7 (permalink)  
Old 10-02-2009, 03:36 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by derez View Post
and this doesn't - Remote.connect("Tcp" , "192.168.0.167" , 51234 , "Remote")
At the moment it only accepts host names not IP addresses, the next version will.

Quote:
In the second case I get this error ... What am I doing wrong ?
I'm afraid that I don't know! Is that on the client or server? Is it locally or over the network. If it works if you call that on the server oor locally on the client it will most likely be a network problem of some sort.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #8 (permalink)  
Old 10-02-2009, 04:06 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Quote:
At the moment it only accepts host names not IP addresses, the next version will.
I followed the help file which says:
Quote:
The hostname is only used by the client to locate the computer where the server is located and may be a dotted quad IP address or the domain name of the computer
This explains the problem, Thank you.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #9 (permalink)  
Old 10-02-2009, 04:15 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by derez View Post
I followed the help file which says:
Sorry. Yet another cut and past oversight ,
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #10 (permalink)  
Old 10-05-2009, 05:17 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Version 1.1 includes a RemotingCF library that will work on devices as well as desktop. It uses a home grown (i.e.crude!) remoting layer based on TCP. Details in the help.

It is now an error to call an Async method while another is pending and an Exception is thrown if this is attempted.

Dotted quad IP addresses as well as hostnames may now be used.

Async data calls are now provided and all Async calls have a tag parameter that may be retrieved in the AsyncEvent and used to identify what to do.

A sample application for RemotingCF is provided to show that two way calling is possible.

Enjoy .
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to check running process twisted Questions (Windows Mobile) 4 03-11-2009 10:14 PM
Creating process-real!!! Byak@ Code Samples & Tips 6 10-06-2008 01:59 PM
Interprocess communication with the Network library Erel Code Samples & Tips 0 08-19-2008 10:37 AM
Process and Basic4ppc? Byak@ Questions (Windows Mobile) 3 07-22-2008 04:05 PM
Shell and wait while process is running g0dspeed Questions (Windows Mobile) 2 03-22-2008 09:48 AM


All times are GMT. The time now is 06:56 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0