I need to write an RMI server and client in C# and was sort of confused about what this really is considering most of the posts I have read online on the subject have been Java-related. What exactly is C#'s version of Java RMI? Thanks in advance!
You're looking for .Net Remoting. You may also want to look into WCF.
If you are using .net 3.0 or better, look into WCF (Windows Communication Foundation). If you are using .net 2.0 or older, look at .Net Remoting.
You can use anything except WCF if you want fast and lightweight application without writing tons of xml or hours to configure calculator.
Related
By ikvm or any other tool, is it possible to port OrientDb to .NET(C#) ? I asked this because they said this is so tiny database :)
Or converting low level java library to c# is not safe?
Yes someone can say, there is a REST api and we can use it by C# easily. But integrated usage is more effective. For example I could not install OrientDB server to windows. It stole 4 hours of my life! And no chance for me
Surely i think OrientDb is ok for production (web application)
Thx.
There is already Blueprints.NET and Pipes.NET, so you could use it and just port the OrientDB persistency layer to .NET. Happy forking ;)
Is there any (hopefully free/open source) code available that does native TLS/SSL communication? I do not speak about the HTTPListener/Client and WebRequest classes. I'd like to do raw TLS communication in my C# code.
Thanks in advance,
Max
Here's an article on codeproject, it also includes code for using OpenSSL.
Do you mind if I ask what you're trying to achieve? Just curious really; there's lots of high-level wrapper classes for this kind of thing so you don't normally need to work at this level (not that there's anything wrong with that :-)
http://www.mentalis.org/soft/projects/ssocket/ - been using this in a commercial product for the last 5 years in .net 1.0, 2.0 and now 3.0. Very reliable, simple to use and stable.
Built-in (as at time of writing) SslStream object makes this easy - see https://www.medo64.com/2014/09/client-authenticated-tls-in-c/
We have a major body of code in Java that runs on the desktop that we want to reuse with a MS.NET user interface (desktop rather than web). Any do's or don'ts would be very welcome.
You may want to take a look at IKVM.
It is an implementation of the Java Virtual Machine on top of the .NET Framework. There are some parts dealing specifically with interoperability of the .NET and Java worlds so you can (more or less) seamlessly use one from the other.
I suggest creating web services for existing java code to act as a wrapper and call them from .net app. (desktop or web)
If you have the $$$$ you can try mainsoft; it converts your java code in C#, or vice versa, depending on your whim.
Eric Sink has a post about this.
Another possible solution could in the the form of j-interop
I've used it successfully for calling from Java -> DCOM and it claims to be able to do bi-directional stuff so in theory it should be possible to register a Java process as a DCOM server.
You will need to do a bit of work on the java side as it won't be able to just make it work automatically.
I agree with the webservices method suggested by "2009MIPS". It offers the cleanest and most "debuggable" way to do it.
So I have ASP.NET running on the server in IIS7. I think I'm going to use MVC for some static pages and basic dynamic forms - but the majority of the client side is written in Flash/ActionScript.
What's the simplest, most succint, most DRY way of building/generating proxies between client and server?
Which format should I use?
JSON
SOAP
Binary
And which comms protocol should I use?
WCF
HTTP via MVC Controller actions
I'm probably missing some format or protocol, but basically it should be relatively efficient, not require alot of plumbing code and preferably auto-generates client-side proxies.
WSDL web services are very easy to consume in Flash and simple to create in .NET.
I'd also suggest you at least look into AMF, which is Adobe's proprietary binary format for exchanging data between client and server. There are a couple of implementations for .NET, including amf.net and weborb.
I've never used it, but I've heard really great things about weborb: http://www.themidnightcoders.com/products/weborb-for-net/overview.html
i've consumed JSON in swfs .. pretty simple using a3corelib stuff
I have had a good experience with FluorineFX.net - It appears to be very similar to WebORB but its free and open source. I don't think Flash/ActionScript supports WCF..
You should note that (in the research I've done) there is no way to send a packed from the server to the client - the client must make all requests.
We use Weborb at my work. I highly recommend it. There are some gotchas with the way Weborb handles serialization on both ends. Just make sure in your .NET classes you don't have member names the same as class names.
EDIT: The free developer edition of Weborb should meet most people's needs. Weborb has the distinct advantage of speed, because it uses the binary AMF format to talk over the wire instead of JSON or SOAP.
I second WebORB. It uses the AMF protocol which is that fastest way to get data in and out. You can easily expose your .NET services and have typed objects going in and out. You can use RMI and Messaging. It's a free product and does a great job...
WCF supports Flash..! Done with "AJAX-enabled WCF Service" and WebInvoke(Method = "POST")
Is it possible to write a user interface in Java for an application written in C#?
I am working on a user interface of a project that is written in C#, but I have no experience with C# and I am an avid Java user. Is it possible to build the user interface in Java using Java's Swing and AWT libraries that operates an application primarily written in C#.
If this sounds like a really stupid question, I apologize in advance.
You might be able to leverage some of the interoperability features that are integrated into Mono 2.0
http://www.mono-project.com/Main_Page
JNBridge is another possible interoperability solution:
http://www.jnbridge.com/
However, a more optimal approach might be to expose your .NET code as Services - and then access them from the Java client (or through a light-weight ESB).
Of course, time, budget, resources are constraints you'll have to consider.
In addition to http://www.jnbridge.com (proprietary)
you can try http://www.janetdev.org, - open source implementation of a Java 5 SE JDK environment for the .NET platform. Currently it supports .Net 3.5 only (not Mono).
We did this recently and went the route of using a low level socket connection, but pushing xml through it. C# was the server side, and we used the Microsoft 'xsd' tool to generate the XSD schema for the objects and then used JAXB on the java side to generate java code to parse and hold the same objects.
As Barry mentions most of the work/problems was around the socket connection - but that depends on how comfortable you are with that.
Also, for a solution that cross-compiles your java to run in the CLR: http://www.ikvm.net/
I am author of jni4net, open source interprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed. I hope it will help you.