IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New C# -> Linux Perl RPC?
I want to come up with the simplest
method of doing RPC calls from Windows to Linux.

The Linux side will execute my Perl code to access
data, run programs, read/write files, etc, ie: full
access.

The Windows side will be running an application
written in C#.

There needs to be a bit of security, but I don't
need to encrypt EVERYTHING. On the other hand, I
certainly don't want to write a deamon that
listens on a port and executes anything thrown at
it.

While I seem to recall there is a variety of methods
to do this, I have very little experience with this
type of interaction.

I've cheated using Postgresql. Using ODBC or .NET
drivers, you can access my Postgresql database.
Postgresql allows me to run Perl code internal to
the database, but this feels a bit dangerous to me
since all Perl code executes as the Postgres user
at that point.

So, in order of importance:
Run perl code on Linux.
Is invokable via a C# program on windows.
Has some type of authentication.
Has enough security to fool a sniffer.
Requires minimal components to confuse me
or make it difficult to hand off to someone
else to support.

Should I stick with my Postgresql hack?
New RPC means...?
What kind of data volume and rates are we talking about? Is this something that can be done using the "pretend I'm a web client" APIs in C# on the client side, and some CGI scripts on the server using Apache and SSL? It's easy to use basic authentication, and SSL makes that snooper-proof.
New Re: RPC means...?
Remote Procedure Call - a way of allowing an outside source to run an 'executable' on a box. Both Unix and most databases support them.

Not sure if Postgres supports it or not.
New When you hear "RPC", it makes sense to ask about context
There's classic RPC, and there's the "RPC" used as a general label for "I'm here, and I need to get a message to there (and maybe back)". There are a bunch of approaches the the latter problem, depending on those pesky details.
New Low volume - interactive
Almost all of my code resides on world of Linux back-end.
Occasionally I need to create a user interface - which I've done lately in C#.

The back-end Linux code is almost always Perl, but will interact with a variety of 3rd party programs.

So (for a trivial example), I need to create a C# interface that queries that status of a back-end production, and this status is an aggregation of Linux stuff (load average, SGE queue size, plus some information in some log tables currently in Postgresql).

My 1st instinct is to create a Perl program on the Linux size, and have it produce some clearly defined text strings on output. This is then callable from any command line.

I would then need to hand this data off to the C# side, since it would be invloked by a user pressing a button, querying the status of the system. I would want the C# to format and present it, since I hate web presentation/interaction and these are all in-house windows clients.

Based on what you said, it seem a CGI interface a decent answer.

Hm - what about SOAP?
New SOAP is a dirty word
Way far over complex for what you need, by the sounds of it. Of course, SOAP is over complex for just about everything.

Just use a simple POST/response interface, and you'll be all happy and stuff.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New REST in the ease of HTTP
[link|http://en.wikipedia.org/wiki/REST|http://en.wikipedia.org/wiki/REST]
New Yep, that's what we support here.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Agreed
[link|http://www.perl.com/pub/a/2004/09/30/drop_the_soap.html|Don't be afraid to drop the SOAP] says it all, from the perspective of someone who loves XML.

Note, SOAP used to stand for Simple Object Access Protocol. It now stands for nothing because people couldn't stand the irony, seeing as how it isn't simple and no objects are involved.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Irony can be so ironic...
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Sure it stands for something
Stupid Object Access Protocol



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New Come on, you can do better than that:
Suppuration Of Access Predicament
Sent Objects Are Punted
Software Originators Aren't Pleased
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I suppose
Syntactic Obfuscation/Augmentation Protocol



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New ROFL
New That works
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Surely Over Agitation Pleases
;-)


Peter
[link|http://www.ubuntulinux.org|Ubuntu Linux]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
New Simple Operations Are Perplexing
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New OT: could you get rid of the animation in your icon
It keeps attracting my eyes and distracting me...

------

179. I will not outsource core functions.
--
[link|http://omega.med.yale.edu/~pcy5/misc/overlord2.htm|.]

New Use your browser features to disable that.
If your browser doesn't allow you to do that, then get a better browser.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Somewhat changed.
New Oh yeah, that's just lovely (new thread)
Created as new thread #205360 titled [link|/forums/render/content/show?contentid=205360|Oh yeah, that's just lovely]



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New I recently had to do something like that.
The problem was that the database had a comprehensive set of APIs to manipulate things. Unfortunately, the API was a PHP library on a web server and an application written in another language on another platform needed to access this.

I considered SOAP and XML-RPC but PHP's support for either was experimental, badly documented and required additional libraries. OTOH, elementary XML parsing was built-in. So I rolled my own interface. A 500-line PHP script accepts a specially constructed POST containing an XML-encoded function call, calls the function, and returns the data in the same type of XML. It has a list of allowed functions that it exposes this way to control what can be done and it leverages the login mechanism used on the rest of the site to prevent any random user calling it. The programmer who calls it loves it's versatility. By the end of the development, I was just adding extra function calls for him in its allowed list.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

     C# -> Linux Perl RPC? - (broomberg) - (21)
         RPC means...? - (dws) - (15)
             Re: RPC means...? - (Simon_Jester) - (1)
                 When you hear "RPC", it makes sense to ask about context - (dws)
             Low volume - interactive - (broomberg) - (12)
                 SOAP is a dirty word - (admin) - (11)
                     REST in the ease of HTTP - (FuManChu) - (1)
                         Yep, that's what we support here. -NT - (admin)
                     Agreed - (ben_tilly) - (8)
                         Irony can be so ironic... -NT - (admin)
                         Sure it stands for something - (tuberculosis) - (6)
                             Come on, you can do better than that: - (admin) - (5)
                                 I suppose - (tuberculosis) - (2)
                                     ROFL -NT - (FuManChu)
                                     That works -NT - (admin)
                                 Surely Over Agitation Pleases - (pwhysall)
                                 Simple Operations Are Perplexing -NT - (ben_tilly)
         OT: could you get rid of the animation in your icon - (Arkadiy) - (3)
             Use your browser features to disable that. - (Yendor)
             Somewhat changed. -NT - (broomberg) - (1)
                 Oh yeah, that's just lovely (new thread) - (tuberculosis)
         I recently had to do something like that. - (static)

Windows - nice body, scrambled brains. It's Jennifer Aniston!
185 ms