Messaging/Eventing Framework - c#

I am looking for a messaging/eventing framework that will allow changes in one application to be subscribed to by other applications. My situation is I have an ASP.NET web application that allows users to perform CRUD operations. I also have multiple unknown applications that are used to synchronize data in our application with data in a clients application. What I would like to do is allow our ASP.NET app to send out a notification that Company A has been created. I would like the client application to be able to "subscribe" to the event from our application. I basically want to get away from the need to modify our ASP.NET code each time a new client app is needed. What sort of technologies exist to handle this sort of situation?

Check out NServiceBus: www.nservicebus.com
Excellent framework for handling communication between different business services.

Related

N-Tier Application Authentication (RabbitMQ as Broker and C# as Business Tier) - WIF possible?

I'm currently devoloping a N-Tier Application with C# as Business Tier. It's a kind of ERP and I need authentication (email/password) for this app.
I need also permissions based on the login (create orders, delete articles)
All this informations should be stored in one database.
As UI Clients I planned to make WPF Client, ASP.Net and maybe in future iPhone/Android.
As message broker I use RabbitMQ (Clients talk to Business Layer only over AMQP. Due to the advanteges I have more than one Business Layer for round robin dispatching).
On my research for authentication in N-Tier applications I found one advise for Windows Identity Foundation. WIF is completly new for me. All the examples I found handle only ASP.Net Applications.
My question now is:
Is WIF the right thing for me or should I implement this session handling on my own?
If WIF can fit my needs, what is the best way to handle this?
Do I have to implement a custom STS and place it within a WCF Service?
As you are explicitly mentioning RabbitMq, I am suggesting ServiceStack for your service interface.
One issue with MQs in general is that they are decoupled from any meta information, such as HTTP Headers, to inject authentication. You should in contrast provide a property Session (with pre authentication) or UserName and Password in your message (where the later one is not prefered, as the credentials are passed in plain). A sample solution with the built-in SessionFeature of ServiceStack is available in their documentation.
Another nice feature of ServiceStack is that you can decorate your handlers not only with AuthenticateAttribute but also with RequiredRoleAttribute and RequiredPermissionAttribute.
Also: How do you plan to queue a message with Android? Can you expose the internal MQ to the outside, and is there a client available for eg Android? Therefore I suggest a dual endpoint over HTTP to queue messages in whatever MQ you choose to use. More information on how to integrate MQ in your HTTP service is available in the documentation.
With ServiceStack you can spin as many consumer instances you want, as there is a plain communication without all the serivce stuff available.
Trivia: As I am authoring an upcoming book on Mastering ServiceStack I am a little bit biased. Nevertheless I do cover most of your questions in the book, and provide code examples: Bits and pieces to your scenario are already covered here (do not get frightened by specific MQ, they are interchangeable).

Gmail-like notification Service in ASP.NET/C#

I have a web-based application developed in ASP.NET. It is a business application and people do regular deals & transactions from this portal.
The application has two types of user:
1) Front-office User - who makes the deal
2) Back-office User - who look at all accounting & voucher generation work for the deal
The current problem is, to check a new deal created by a front-office user, the back-office user needs to refresh the web page every few minutes, which is very time-consuming.
I want to develop a small windows-based notification service through which I can show them notifications without going to the browser. It will be in the same manner as the Gtalk desktop tool, which notifies us of newly-received mail.
So to achieve the above thing what should I use and how to use & implement the solution ?
I need to develop the solution using .Net framework
I would look into SignalR and use that to keep a persistent connection open to your server and notify the client when new data is available. If you use SignalR, you don't even need a windows application, you can use their javascript client and show the notifications directly in the browser (you can of course still go the Windows Application route as well).
If you are in a cloud hosting environment, your cloud provider should have a service of use for you as well.

ERP Integration using C#/Windows Application

I need to insert some fields of data (example: Customer Phone etc) from outside(Externally) into the already developed/working (Installed) ERP Invoicing application. When I open the ERP application those fields should automatically appear in the application for the particular order in the form. Currently the the external data is entering manually into the ERP application. I need to integrate from the different place to ERP Application using some another application, like C# Windows Application. We can access ERP database. How can I approach this for the solution to the problem using C#/windows application externally.
I am not sure what approach you used for Integration, but as it seems from your question that you have enough knowledge about their database structure and flow of data you can directly write to the tables to reflect the updated information in that ERP.
But this is not a recommended approach to integrate with any ERP, by directly interacting to their database tables, even if you have access to them and you very well understand the data flow. Integration to any ERP should only be done through API's provided by that ERP, or through some connectors available in market which are recommended by the ERP vendor.
You should look for an API or interface your ERP application provides to integrate external applications and/or modules, otherwise, if you have enough knowledge of how this ERP works and underlying database structure, than you can directly interact with the data...

Use of database for multiple Places in windows application in c#

I have a developed a application that is gonna to be used at multiple places.
So how should i maintain one database for all?
Or is there only one way of using remote database for this software.
If i use remote database, i am facing problem with loading controls in forms.
Please Suggest Solution.
Thanks
Typically you'd design a system leveraging multi-tiered architecture, which often consists of:
Front-end user interface
A database back-end
Middle tier/business layer that let's your web pages access the database and provides additional business logic (perhaps a web service?)
You don't give much to go on as far as details go, but it seems like you have several physical locations that need to access a single database. So you can:
Develop an (web or desktop) application that handles the front-end UI and the middle tier (which will access data and do other stuff)
Develop an application that handles only front-end UI, but calls a web service that accesses a database and does other stuff. In this case, you may have several locations with different front-end applications that consume the same centralized web service.

C# architecture for long-lived data collecting server apps

We are about to start a new project for a server application, for the purpose of collecting data from several data sources and storing it in a database.
For a quick test, we created a WinForms app which uses the core functionality from a custom library, and now have to start migrating it towards the final product.
From what we've done so far, the best way to do this should be to make it a Windows service and then expose basic monitoring and configuration to a thin Win or Web client through remoting/web services.
Is there a more appropriate way to make such an application?
You could consider exposing the service itself using the WCF/ADO.NET Data Services: http://msdn.microsoft.com/en-us/library/cc668792.aspx
Also see this for a quick walkthrough on how to expose a WCF Data Service: http://www.msteched.com/2010/NorthAmerica/DEV324

Categories

Resources