EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Fault tolerance

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#28782
Posted: 03/14/2014 09:52:13
by Boris Levy (Basic support level)
Joined: 03/14/2014
Posts: 2

I would like to know if MsgConnect is the right tool for our application and would appreciate some guidance on how to set it up.

We have several independent computers which will send messages with processing requests, some of them from a C++ DLL, others from a .NET web application (lets call these "nodes").

The recepients of these messages will be another set of computers which will be running a .NET desktop application (the "processors"). The nodes will wait for a response to each message or fail after a timeout is reached.

We need to set up these processors in such a way that:

1- if one of the processors fails, the node will be able to detect this with a minimal delay and try another available processor.

2- if processing demand from the nodes increases, is it possible to distribute the load among various processors? In other words, can different processors be servicing the same queue?

I would also like to know if each processor has to be polling the queue constanly or if there is a way to trigger the process every time a message is available.
#28783
Posted: 03/14/2014 09:57:38
by Eugene Mayevski (EldoS Corp.)

Quote
Boris Levy wrote:
1- if one of the processors fails, the node will be able to detect this with a minimal delay and try another available processor.


Please define "fails". If you send the message using SendMessageTimeoutCallback function, you get different callbacks on error or on timeout. Then you can send the message to some other processor.

Quote
Boris Levy wrote:
2- if processing demand from the nodes increases, is it possible to distribute the load among various processors? In other words, can different processors be servicing the same queue?


This is a question of higher-level protocol. For your task you need to treat MsgConnect as a transport for messages. What you transfer with this transport and how you route messages is up to you as the transport user.

Quote
Boris Levy wrote:
I would also like to know if each processor has to be polling the queue constanly or if there is a way to trigger the process every time a message is available.


Not sure that I understand you here. You can have the incoming message processed by either calling DispachMessages() method or by calling GetMessage/ProcessMessage pair of methods in a loop. Execution flow is not interrupted within a thread - you decide when to pick messahes using one of the above mechanisms.


Sincerely yours
Eugene Mayevski
#29048
Posted: 03/31/2014 06:51:25
by Boris Levy (Basic support level)
Joined: 03/14/2014
Posts: 2

Hello again.

On the trigger issue:

We need to receive messages within a C++ DLL which is performing other tasks simultaneously. Just wanted to know if there is a mechanism similar to MSMQ triggers where the arrival of a message can trigger an event in the DLL. We wanted to avoid calling the reception method every two seconds, as messages are time critical and we have to process them immediately upon arrival.
#29049
Posted: 03/31/2014 07:27:59
by Eugene Mayevski (EldoS Corp.)

No, at the moment there's no such mechanism. There must be some call in a thread which you want to process the message in. Potentially we can add a hook which will trigger some other event in some transport thread, and from which you will be able to process the message. With the product being open-source you can do this as well (though there's a fair amount of places to change) or we can do the change as a custom service.


Sincerely yours
Eugene Mayevski
#29077
Posted: 04/02/2014 01:15:55
by Eugene Mayevski (EldoS Corp.)

BTW I have found a simple solution. You can use a background thread which will call MCMessenger.WaitMessageEx method in a loop and set some event or semaphore to signal your handling threads that they need to pick and process the message.


Sincerely yours
Eugene Mayevski
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

Topic viewed 3624 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!