|
Polling is trivial (a client side timer or other mechanism that repeatedly makes a request to the service asking about updates).
The comet method I haven't heard of before, but it seems to be an abuse of the TCP timeout mechanism whereby you stall a request until there is an update. I'm not sure there is a way to do that with a WCF service without going in at the low level. This form of polling is bad though (for the reason that persistent connections are: while that request is open, it counts against your machine socket resources, concurrent connections etc which are generally more precious than bandwidth), except for very specific cases where you know there will be an update soon (within a second or so).
You can use callbacks in a WCF client to respond to a service request asynchronously (i.e. you fire it off, continue processing and respond to the request you initiated later). This would typically be used as part of polling, as you don't want to stall client interaction while you want for a response.
Honestly, for a chat application, you are better off either using persistent connections (think IRC) for an update-critical standalone app, or using simple HTTP with client side polling (either through AJAX or thick client code doing a similar thing) for a less update-critical one or a web (in browser) chat. This is not what web services are for and they will get in the way rather than helping you.
|
|
|
|
|
nitin_ion wrote: do you have any articles on polling, comet or callbacks which gives knowledge on
how to use it in wcf
You have already been given an answer to this. Your post here is just plain rude.
|
|
|
|
|
|
Web services don't technically push. They're based on a request/serve paradigm, meaning you have to connect, call a method, and accept the output.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Thanks, this is correct. I just looked at some articles and accordingly if we use basichttpbinding we cannot create duplex service but with wshttpbinding we can.
but with it then we need to make sure that ports, firewall issues are taken care of on client machine.
I am not sure but there should be some way using using basichttpbinding by which i can create callback methods.
|
|
|
|
|
You obviously don't have even the most rudimentary understanding of the mechanics of a web service. Once more, a web service is a request/response system, and nothing more. If you want to "push" data somewhere, you cannot do it with a *web* service.
If you want to push data without it being requested, your best bet is to use a *windows* service that listens for connections, and broadcasts the data (via WCF or some other transport mechanism) to any client that might be listening and that knows how to interpret and react to the data being pushed.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
You could always have a little node.js server up and running, and when various client actions occur (log on, etc), it sends a message to your node.js server, which would then broadcast another (push) message. And then the client "listener" js file on your front end could handle the pushed message in whatever way you see fit. And basically any active client node would accept the message/action.
________
John Y.
Developer
|
|
|
|
|
Hi,
If possible Please explain me DI with very simple example.
Even share me if u have any ppt for the same.....
|
|
|
|
|
This[^] should help you out.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
Nowadays , i am developing a device that uses force feed back effect of a game.i want to learn that after i created the device , how can windows will be recognize my device for example the engines etc..
A driver must be written for the device...I know c# language.Does c# has any compenant to use a device? can i write code for driver in c#?
|
|
|
|
|
After a quick Google search, I've come to the conclusion that the answer to your question is both yes and no. You can write some drivers in C# (see User-Mode Driver Framework (UMDF)[^]), but kernel-mode drivers cannot be created with C# because it "produces intermediate language that is interpreted by a virtual machine (.NET)". The general consensus is to use C/C++ for drivers.
Source: http://stackoverflow.com/questions/994600/writing-drivers-in-c[^]
If I had a nickel for every time I tried to teach someone some programming, they didn't pay a cent of attention, then gave up, claiming it was too difficult - well, you know the rest... sadly, I'm just a programmer in an endless sea of cubes, typing my life away.
|
|
|
|
|
burhankaraman wrote: can i write code for driver in c#?
No.
Start here[^].
Bastard Programmer from Hell
|
|
|
|
|
I developing a simple retail POS. I want to know is the barcode for all items are standard? dose it have the same string conditions, length, contents? or I have to develop conditions for every item / item category?
|
|
|
|
|
What I do know is that a barcode is just a representation of a number, which is always printed below or close to the barcode somewhere in case the need to manually enter it arises. Most barcode readers simply return that number as a string on a COM port or sometimes even a keyboard connection, like someone manually typing it in.
A string of 20 chars should do it.
Regards,
Rob Philpott.
|
|
|
|
|
is it unique for everything like CDs, Shampo, Books, etc?
|
|
|
|
|
A barcode is indeed a sequence and has a structure to it.
and these structures, standards differ in different industries.
have a look at the following
www.gs1ca.org
Kribo
htt://blog.kribo.be
|
|
|
|
|
Yes, they are standard, within a few parameters.
There are two classes of bar code you need to look at: Those for Consumer Units and those for Traded Units. They use different barcode types to prevent misreads.
Consumer Units are items which are sold to the customer directly - a tube of toothpaste, a case of beer.
Traded Units are groups of items which are sold to retailers, not to customers - a carton of tubes of toothpaste, a pallet of cases of beer.
Each Unit has it's own barcode number (called an Article Number): the code for a tube of Tesco toothpaste (30g) would be different from that for a tube of Tesco toothpaste (50g) or a carton of tubes of Tesco toothpaste (30g), and this number is unique worldwide. Each country has it's own Article Number issuing authority who come down on you like a ton of bricks if you start using them willy-nilly.
Consumer units generally use EAN8, EAN-12 or EAN-14 (now known as GTIN codes).
Traded units generally use ITF14.
Mostly, scanners to read Consumer units are set to not-recognise ITF Traded unit codes, and vice versa.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
jrahma wrote: I want to know is the barcode for all items are standard?
No - there are different kinds of barcodes.
You need to know the type of barcode you are reading in order to be able to parse it.
The first thing you will need to determine is the barcode type.
You can get libraries to parse barcode(fonts) which will do the difficult work for you - all you then need to do is to look up the code in your database...
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
|
Hi,
How do I accessing&change a corelDRAW file throught C# Application?
Please Gude me!
This is very importance for me!
modified on Monday, September 5, 2011 9:45 AM
|
|
|
|
|
How about this: You ask an actual question?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Mahtab777 wrote: How do I accessing&change a corelDRAW file throught C# Application?
You can try to automate Coreldraw, like done here[^], but that requires the user to have CorelDraw installed.
Mahtab777 wrote: Please Gude me!
This is very importance for me!
I'm a volunteer, answering questions. Providing guidance would be a somewhat deeper investment. You're asking for broad help on a vague project - we're providing answers on specific questions.
Bastard Programmer from Hell
|
|
|
|
|
Please Giude me!
Please Giude me!
Please Giude me!
|
|
|
|
|
You've already been given one answer. If this isn't acceptable to you, you are going to have to modify it via the file format - in which case, you've got a lot of work ahead of you.
|
|
|
|
|
IS the complete defination for Polymorphism....?
Polymorphism:-
When child class inherits from a parent class and it gains all the method's properties of the parent class.
To resolve this problem a class member from a parent class, the parent class has to be declare as virtual while the child class should declare as override..
this whole process is called polymorphism
MUHAMMAD FAROOQ
|
|
|
|