|
Hi,
I have a client server architecture, may have 1000+ clients (windows application/winforms) communicate with the hosted server to process some information!
There may have 3 to 4 methods/function to be processed on the server.
Both client and server can be developed in any of the .net technology like we have .net remoting, asp.net web service or WCF Service!
If you can advice which one will be feasible of this requirement.
Like in performance point + load on the server for the request/response time. I am not much worried about the security (its intranet/vpn).
Thanks in advance!
Waiting for the response!
Divyesh
|
|
|
|
|
You can use WCF for the services which the clients will be consuming. It will allow you to communicate with any client (not just .Net) through a lot of means like http/namepipes/tcp etc.
Plus, it being a newer technology, you don't have to worry about an upgrade at least for few years.
|
|
|
|
|
There are two aspects that you need to consider while you choosing among
.NET Remoting Service, Web Service and WCF Service.
1. Portability
-> If you are using .NET Remoting Service then both client and server should be in same
technology (e.g. .NET in this case)
-> While if you consider Web Service or WCF service you can also access it from linux machine
or any other OS based machine (as client).
2. From request/response time point of view or performance point of view .NET remoting service
is always best compared to web service and wcf service.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
divyesh1432 wrote: WCF Service
This is the latest so should be an easy pick.
However, WCF service provides many different types of bindings and picking the best binding for your application will not be easy.
My signature "sucks" today
|
|
|
|
|
Abhinav S wrote: picking the best binding for your application will not be easy
The kind of client you are communicating to would help.
|
|
|
|
|
Hey guys,
I wonder whether anybody can help me out in this problem. I use wcf to get data. After I got the data, I cache them using Enterprise library Cache block. I am trying to incorporate the sqlDependency cache- notification model to invalid my cache.
Anyone have better idea to solve this problem or setup the SqlDependency expiration across wcf end points?
Thanks,
Sen
|
|
|
|
|
I have a piece of hardware with some buttons which when pressed will send an events via a USB interface to an application I have written(let's call it APP1).
I have a 2nd application (let's call it APP2) that reacts to certain keystrokes (for example when it sees a Key Press event for SPACE BAR it will pop-up a dialog). I have no control over the code in this application.
I need to make it so when APP1 sees a button is pressed on the hardware it will send a keystroke to APP2 (or to all windows).
Some constraints:
- I cannot change the hardware to simply send the SPACE BAR, I only have control over APP1.
- There may exist another version of APP2 that will react to a different button such as ENTER key (or any key sequence for that matter) so I would like to have APP1 be configurable in the event it sends to other windows/applications and is in no way dependent on the name of APP2 as I may see many versions of APP2.
What is the best way to handle this? Sendkeys?
What information do I need to know about APP2 from within APP1 to send the keystroke to this window specifically? I'm OK with (and would prefer) sending this event to all Windows if that is possible so if APP2 changes in the future APP1 is not impacted.
I'm fairly new to Windows Programming so all help and insight is appreciated.
Thanks in advance.
KG
|
|
|
|
|
Hi,
you should not send anything to "all windows" or "all applications". A lot of applications and windows are meant for human interaction only, and may suddenly display a dialog, where some of not all keys get interpreted the same as clicking the OK button. You cannot possibly want that.
you should send a keystroke or a sequence of keystrokes to a single window, after making sure you got the right window; and even that is not always fool proof, as it may change soon after you've checked.
There are a couple of ways to do it:
- System.Windows.Forms.SendKeys.SendWait() sends keys to the active app and window;
- SendMessage() could be used to send regular Windows messages such as WM_KEYDOWN and WM_KEYUP.
The former is managed but unsafe as, even when you get the ForeGroundWindow's title text and check it, the active window may change suddenly; the latter is a bit harder to use but should always be OK. I use both, and choose depending on circumstances.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Find a way to have App2 tell App1 that it wants these events.
|
|
|
|
|
Take a look at these articles here and here.
Life is a stage and we are all actors!
modified on Thursday, June 3, 2010 5:22 PM
|
|
|
|
|
APP2 was not to be changed.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I didn't understand the question completely, I've thought that it's about top level windows, which is wrong.Unfortunately SendKeys works only with active application so maybe enumerating all top level windows and their child controls is required so I would strike my previous post.
Life is a stage and we are all actors!
|
|
|
|
|
Enumerate all processes
See if the process has a UI(to distinguish from other background processes)
The code will be like
For Each x As Process In Process.GetProcesses
If x.MainWindowTitle <> "" And x.MainWindowTitle <> Me.Text Then
AppActivate(x.Id) 'If you know the application's title, AppActivate("Title") will also work
SendKeys.SendWait("KEYS YOU WANT TO SEND")
End If
Next
AppActivate(Me.Text)
|
|
|
|
|
|
Each Assembly entry also has a list of referenced assemblies that can be retrieved via GetReferencedAssemblies. It's not quite as simple as just walking through these items to ensure you've satisfied all the assembly constraints because one of the assemblies might be loading things through an IoC container.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
I don't know; I have some ideas though:
1.
can you avoid file:///G:\MSE\VisionC... and try a simple G:\MSE\VisionC...
2.
I've never called (T)requestedType.GetConstructors()[0].Invoke(null);
I tend to go with Activator.CreateInstance for historic reasons.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
I have code that creates a type, then instantiates it, so it basically consists of:
TypeBuilder typeBuilder = modBuilder.DefineType("Hello", TypeAttributes.Public, typeof(object), new Type[] { typeof(IHello) });
Type type = typeBuilder.CreateType();
...
IHello hello = (IHello)Activator.CreateInstance(type);
hello.SayHello("...");
Historic reasons typically are: that is how I did it the first time, it worked for me, and I continued doing it that way.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
I don't load DLLs in this context, I create the types I'm interested in on the spot. With lots of ILGenerator.Emit(). Sorry.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
When using reflection, I suggest you use interfaces as much as possible. When the dynamic types implement a static interface, it becomes a lot easier to call the methods that are part of said interface.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
I mean non-dynamic, known from day one, included in your EXE, hassle-free, aka "normal".
PS: a base class could offer the same advantages of course.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|