I'm looking for an open source alternative for commercial use to the RemObjects Remoting SDK.
I'm currently using Remoting SDK in the following scenario:
A number of windows service applications (5 to 10) act as servers and retrieve/provide data. These applications are developed using .Net Framework 4.6 (Windows service C#).
Several client applications (50 to 100) connect to each of the servers to consume the data provided by the servers. These clients are developed using .Net Framework 4.6 (WPF C#).
Remoting SDK RODL file defines the methods used by clients and servers to exchange data. Some of the methods are common calls that each client fires to retrieve data from the servers, some others are events that the servers fire and the clients receive automatically.
I would like to find an alternative open source library/framework to implement the communication between clients/servers in this scenario with the possibility to have both the clients calling the servers and the servers informing the clients when a certain event happens.
I have really basic knowledge regarding RPC and MESSAGE QUEUES and I've heard about gRPC, MQTT and RabbitMQ (which I've started to study in depth).
I would like to receive some suggestions/observations/links/guides by developers who are using one or more of these technologies in the .Net environment to solve scenarios like the one I've described to suggest me which solution will better fit the case.
Related
I am interested in deploying a server to GoDaddy as a C# web application, then have desktop clients developed in C# and Java be able to subscribe/publish to the server using WebSockets (RFC 6455).
WebSocket supported libraries I am looking at are XSockets.Net and SignalR.
I am not able to find anything on using XSockets.Net (not to be confused with XSocket.org) in Java. I understand that XSockets targets MS .Net framework and Mono environments. However, looking at SignalR, there is also SignalA which is a Java based SignalR client for Android.
Thinking-out-loud... I understand there are many WebSocket libraries for Java, which suggests the idea that if I am able to publish a message (using WebSocket) from a Java application to a server, then I should be able to read it and processes it in C#, since WebSocket protocol is a standard.
Thus far, I believe a SignalR solution will satisfy my requirement to allow C# & Java applications to talk on the Web, but due to transport requirments of SignalR, my communication will not utilize WebSockets. Reading through SignalR requirements, to get WebSockets transport activated I must use Windows8+ with .Net Framework for 4.5+. GoDaddy does not use Windows8 for windows hosting, and even if it did, then all my clients must also use Windows8, which is not a guarentee.
So the question is: How can I get C# & Java desktop clients to talk on the web via WebSockets, othan than using SignalR and XSockets.Net?
Any help is very much appreciated!
EDIT: I will now look into deploying a C# XSockets.NET Server and have a C# XSockets.NET client and a Java JWebSocket client since both JWebSockets and XSockets support the WebSocket RFC6455 protocol. I will post my findings here and close this question if that was a successful effort.
You can implement a RFC6455 client in any language and use XSockets. However do note that XSockets uses a publish/subscribe pattern that you will have to implement as well to take benefit of the platform.
The upside is that you actually wont have to implement RFC6455 since you can implement a custom (non websocket protocol) and use that when communicating from desktop (or anything else). Since everything in XSockets is a plugin you can add custom protocols and still communicate with client talking RFC6455 since XSockets will offer cross-protocol communication.
So the thing you have to implement is actually only the publish/subscribe functionality in the java client.
There are probably not any Java clients out there that implements the IXSocketClient interface today, and we focused on Mono instead of Java when covering multi-platform support.
We will help you out in any way we can if you decide to write your own java implementation.
Note: as of the next version (not far away) it will be very easy to implement your custom protocol and connect from any device talking TCP/IP
In my humble opinion, you have misunderstood some things.
XSockets and SignalR are libraries which are totally oriented to a specific platform, .NET. They both wrap the functionality of WebSockets, a platform independent standard, to ease its use. This does not by anyway mean that you could use XSocket, or SignalR libraries in all platforms.
I suppose that creating a java client for XSockets or SignalR would be an overkill and would lead you to heavily depend on a 3rd party library. In your situation, I would go on with using WebSockets directly on my server side. Then I would use a library handling the WebSockets standard for each client, which could be different for each client development platform. Therefore, you would depend on one universal standard and you would minimize dependencies on 3rd party libraries.
Hope I helped!
We are currently implementing a windows service which needs to publish information that a windows or web application can subscribe to. The information published should consist primarily of strings and will be used to log tasks that the service is performing, so there will be a constant stream of information being sent to subscribed applications.
I have been researching technologies such as MSMQ, WCF, and ESBs such as Nservicebus, but as I am very new to working with both windows services and application subscriptions, it has been difficult so far to get an idea of the strengths of each and which (if any) would be ideal for this type of project. Can anyone who is more familiar with these options offer some of the pros/cons that these technologies provide?
To better summarize my earlier paragraph, the project is expected to operate under the following conditions:
Messages are continuously published from the service to any subscribed applications
Communication is expected to be one-way (service to application), so downtime from any application should not affect the work of the service
The service must publish to both windows applications and web applications
New applications may need to subscribe in the future without disrupting the work of the service (seems like a given, but as I said, I am unfamiliar with the options)
The preferred language for the program is C#.
Thank you very much for your time, and any advice regarding these or more suitable technologies would be greatly appreciated.
There's a lot of options around MSMQ and WCF. There are a couple of different methods and frameworks that could help, depending on many factors.
If you would like to do it you self with a little guidance, i suggest that you take a look at Tom Hollanders great posts:
http://blogs.msdn.com/b/tomholl/archive/2008/05/17/building-a-pub-sub-message-bus-with-wcf-and-msmq.aspx
http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx
There are other more "complete" options if you're into using an existing servicebus such as BizTalk, nServiceBus or MassTransit.
Another option is Multicasting wich is available since MSMQ 3.0, which is such a feature that will support scenarios where you have one publisher (your windows service) to multiple recievers (your windowsapp and webapp). Both sender and recievers can use the MsMqIntegration binding to interact with the queues.
I suggest that you take a look at: http://blogs.msdn.com/b/solutions/archive/2005/09/20/471615.aspx
I want to know the best way to implement a system where 2 or more instances of an application deployed in different systems in a network communicate with each other without using any central server(either db or on application acting as server).
I am trying to develop an IP Messenger type application in C#.net.
you can use WCF and netTCP binding, see here for more information:
Peer-to-Peer Programming with WCF and .NET Framework 3.5
I would like to have a client-server application written in .NET which would do following:
server is running Linux
on the server there is SQL database (mySQL) containing document URLs
What we want:
- server side would regularly crawl all URLs and create a full text index for them
- client side would be able to perform a query into this index using GUI
The client application is written in .NET using C#. Besides of searching in documents it will be able to do a lot of other things which are not described here and which are done client-side very well.
We would like to use C# for the server side as well, but we have no experience in this area. How are things like this usually done?
Clarifying question now based on some answers:
The thing which is most unclear to me is how client-server communication is usually handled. Is client and server usually using sockets, caring about details like IP addresses, ports or NAT traversal? Or are there some common frameworks and patters, which would make this transparent, and make client-server messaging or procedure calling easy? Any examples or good starting points for this? Are there some common techniques how to handle the fact a single server is required to server multiple clients at the same time?
To use c# on Linux you will need to use Mono. This is an open source implementation of the CLR specification.
Next you need to decide on how to communicate between server and client, from the lowest level of just opening a TCP/IP socket and sending bits up and down, to .Net remoting, to WCF, to exposing webservices on the server. I do not know how compleat WCF implementation is on mono, also I think you may have issue with binary remoting between mono and MS .Net .
I would suggest RPC style WebServices offer a very good solution. WebServices also have the advantage of alowing clients from other platforms to connect easily.
EDIT
In response to the clarification of the question.
I would suggest using mono/ASP.NET/WebServices on the server, if you wish to use c# on both server and client.
One assumption I have made is that you can do a client pull model, where every message is initiated by the client. Using another approach could allow the server to push events to the client. Given the client has the ability to pole the server regularly I don't consider this much of a draw back but it may be depending on the type of application you are developing.
Mono allow execution of c# (compiled to IL) on a Linux box. Mono ASP.NET allows you to use the standard ASP.NET and integrate into Apache see http://www.mono-project.com/ASP.NET and finally WebServices allow you to communicate robustly in a strongly typed manner between you client and your server.
Using this approach negates most of the issues raised in your clarification and makes them someone else's problem.
Sockets/SSL - is taken care of by standard .Net runtime on the client and Apache on the server.
IPAddress/ports/NAT traversal - Is all taken care of. DNS look up will get the servers IP. Open socket will allow the server to respond through any firewall and NAT setup.
Multiple Clients - Apache is built to handle multiple clients processing at the same time as is ASP.NET, so you should not encounter any problems there.
As many have already mentioned there are a number of thing that you have mentioned which are going to cause you pain. I'm not going to go into those, instead I will answer your original question about communication.
The current popular choice in this kind of communication is web services. These allow you to make remote calls using the HTTP protocol, and encoding the requests and responses in XML. While this method has its critics I have found it incredibly simple to get up and running, and works fine for nearly all applications.
The .NET framework has built in support for web services which can definitely be called by your client. A brief look at the mono website indicates that it has support for web services also, so writing your server in C# and running it under mono should be fine. Googling for "C# Web Service Tutorial" shows many sites which have information about how to get started, here is a random pick from those results:
http://www.codeguru.com/Csharp/Csharp/cs_webservices/tutorials/article.php/c5477
have a look at Grasshopper:
"With Grasshopper, you can use your favorite development environment from Microsoft® to deploy applications on Java-enabled platforms such as Linux"
Or see here
The ideea is to convert your app to Java and then run it on Tomcat or JBoss.
Another approach: use the Mod_AspDotNet module for Apache, as described here.
This Basic Client/Server Chat Application in C# looks like a kind of example which might be a starting point for me. Relevant .NET classes are TcpClient and TcpListener
I am interested in using a free library that has features similar to MSMQ to send/receive messages among 3 app domains in a win form application.
I only need the private queue functionality (No public queues or AD support)
Please provide links and some advantages/disadvantages . I am happy to open sub questions if you think you need more points for finer details.
Note: Unfortunately I have some users that do not have Windows XP professional edition (MSMQ is not available)
I saw Apache ActiveMQ and rabbit MQ but it seems a bit overkill for what I need to do.
http://activemq.apache.org/
http://www.rabbitmq.com/
It is possible to implement this feature using a singleton Queue protected by a named mutex, but I would not like to spend the time if somebody has already done it.
There is Rhino Queues. The author is considered to be a pretty good developer.
How about NServiceBus using the shared memory transport? The creator, Udi Dahan, is a well respected individual in the message based architecture space.
If it's all in the same application then sharing a synchronized queue is what you want, have a look at the Queue.Synchronized method in MSDN, that provides you with a thread-safe queue.
At some point, there is going to have to be some client specific code to accept messages. If the users need to accept messages on their machines, it sounds like a smart client situation. In the Windows world, there is a smart client which does messaging, and allows users to work with data in a disconnected way.
I can't imagine any one library which will allow messaging on different operating systems. Even if a singleton is used, there has to be some cross-platform way to send/receive the messages. It seems like the client end would always have to be OS specific.
It might be possible to try Mono on the non-windows side. There is a tool you can use to see if a third party library has dependencies which will not run in Mono. It was released with the Mono tools for Visual Studio. It is called the Mono Migration Analyzer (MoMA).
See also this system:
http://www.codeproject.com/Articles/193611/DotNetMQ-A-Complete-Message-Queue-System-for-NET
DotNetMQ is an open source Message Broker that has several features:
Persistent or non-persistent messaging.
Guaranteed delivery of persistent messages even in a system crash.
Automatic and manual routing of messages in a custom machine graph.
Supports multiple databases (MS SQL Server, MySQL, SQLite, and memory-based storage for now).
Supports don’t store, direct send style messaging.
Supports Request/Reply style messaging.
Easy to use client library to communicate with the DotNetMQ Message Broker.
Built-in framework to easily construct RMI services upon message queues.
Supports delivering messages to ASP.NET Web Services.
GUI-based management and monitoring tool.
Easy to install, manage, and use.
You might want to look at Retlang http://code.google.com/p/retlang/