Imagine a simple Rev program running simultaneously on many different PCs, each sending a unique set of search parameters to a central server somewhere on the internet. The server receives the data from each PC and does the search, then sends the specific results to the requesting PC.
This would be like using an Ebay web page to search for data.
In principle, how does this process work? I cannot understand how the sent parameters can be picked up, processed and the data sent back if Rev is also used on the server.
How can I use Rev to interact with a server
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
there's more then a dozen possible routes to take. So i can't go into too much details, but generally:
You could make a tcp server and client. This would work like chatrev (see my page), opening sockets and inventing a protocoll (accept connections, open socket). The main advantage is total control over every aspect of implementation.
The same general approach also works with udp sockets, but you need to make your own packet loss correction code, if you need that. On the plus side, this is a bit faster, if lots of real time data is required (multiplayer games, video streaming etc.).
You could send data to a rev cgi, or any other server side scripting language (php, perl, etc.). Using http post and get, you can do this exactly as a web browser works with a web server (get url http://...). This is ideal if you know a bit about how websites and http work, and you do not want to implement a server from scratch. Of course there's limitations to what you can stretch the http approach, if your user case doesn't fit it perfectly.
You can use one of the other protocols that are easy to implement with rev, like ftp or telnet services. Again this depends on what your exact needs are, and how well the existing protocol and server infrastructure fits that.
There's also the possibility to use terminal calls for doing all the networking stuff, this is advantageous if you have lots of experience with those, but not cross platform (for example the rev shell function with wget).
So do you like to implement this all from scratch, or do you prefer to piggyback on an existing protocol?
You could make a tcp server and client. This would work like chatrev (see my page), opening sockets and inventing a protocoll (accept connections, open socket). The main advantage is total control over every aspect of implementation.
The same general approach also works with udp sockets, but you need to make your own packet loss correction code, if you need that. On the plus side, this is a bit faster, if lots of real time data is required (multiplayer games, video streaming etc.).
You could send data to a rev cgi, or any other server side scripting language (php, perl, etc.). Using http post and get, you can do this exactly as a web browser works with a web server (get url http://...). This is ideal if you know a bit about how websites and http work, and you do not want to implement a server from scratch. Of course there's limitations to what you can stretch the http approach, if your user case doesn't fit it perfectly.
You can use one of the other protocols that are easy to implement with rev, like ftp or telnet services. Again this depends on what your exact needs are, and how well the existing protocol and server infrastructure fits that.
There's also the possibility to use terminal calls for doing all the networking stuff, this is advantageous if you have lots of experience with those, but not cross platform (for example the rev shell function with wget).
So do you like to implement this all from scratch, or do you prefer to piggyback on an existing protocol?
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
I appreciate your reply BvG, unfortunately the methods you suggest would be beyond my ability at the moment.
I have decided to adopt the following process.
The sending PCs send the search data with a return URL/address to the server as a file named with, say, an internet time as a unique filename , so it is sequential, and this awaits processing by the server in due course, with any other requests.
I propose to use something like the files() function as described in “basic files and folders, Runrev helpâ€
I have decided to adopt the following process.
The sending PCs send the search data with a return URL/address to the server as a file named with, say, an internet time as a unique filename , so it is sequential, and this awaits processing by the server in due course, with any other requests.
I propose to use something like the files() function as described in “basic files and folders, Runrev helpâ€