in WCF, I can create a udp endpoint discovery to allow client finding the service without knowing the endpoint addresses.
Is there a similar approach using restful servicestack so that the client could discovered the end point address using some kind of discovery detection ?
with the introduction of the ServiceGateway, there are now two options for Service Discovery.
ServiceStack.Discovery.Consul
ServiceStack.Discovery.Redis
Related
What is the difference between a Proxy service and API service in wso2esb?
To expose my service I can give proxy URL and API URL then in which scenario both differs? and in which scenario I can use proxy and in which I can use API?
Please help me in understanding..,
An API has resources so it is suitable when you have to perform multiple operations like CRUD etc. then you can call particular resource which will be performing some particular operation.
A proxy service is suitable when you have to perform an isolated operation (single operation).
So, what you can do is, make an API for multiple operations and then create proxy services for each operation.
Moreover, API can be called as REST service and Proxy service is called as a soap service.
Use a proxy service to expose a SOAP web service
You can consume JMS messages or files with VFS, but since ESB 4.9.0 you can use inbound endpoints for that purpose
Use API to expose a REST service
I've read a couple of articles recently suggesting that Web API can replace WCF; however on the other side some people still defending WCF by saying that it still has its usages.
My question is what are the scenarios where WCF is a must and you have no way of implementing them using Web API?
Basically whenever you need a transport layer other than http webapi cannot be used. For example communication via Message Queues, Inter Process Communication (NamedPipe), direct TCP Socket connections.
WebAPI does not have Peer2Peer Communication, Bi-Directional communication, Reliable Messaging, Transaction Flows, Message Level Security, …
I am reading through the WCF 4.0 Cookbook, I am impressed by the unification protocol capability of WCF, and I just come up with this question:
Is a hosted service using 1 protocol like HTTP\named pipe? or a hosted service can be consumed by different protocol client like HTTP, named pipe at the same time?
If you setup the service with Multiple Bindings then yes it can listen and respond on different transport protocols.
Obviously if you initiate communication on http then you will get a response back over the same transport.
This msdn link provides details on when you would choose the different transports.
http://msdn.microsoft.com/en-us/library/ms733769.aspx
I would like to have a service and a client that consume this service from internet, and I am thinking to use the NetTcpBinding.
I have read that NetTcpBinding use by default security in the transport layer, so my question is if I need to use a certificate or not and I can use the binding with the default settings.
My idea is, from the client, send the login/password to the service. The service see in the database that if the information is correct, and then can apply the level access to the application.
This is a good way to do it or there is better alternatives?
Thanks.
Daimroc.
I have a callback service that is hosted over wsDualHttpBinding. I'm looking to add a client that will poll for the data rather than receive the callback (will be a mobile device using wince for demo purposes). I was curious what the best way to do this is? You cannot create a client proxy using NetCFSvcUtil with a service hosted with wsDualHttpBinding (I understand that), but you cannot host a callback service over basicHttpBinding. I really need the same service hosted over both basicaHttpBinding (clients will poll for data) and wsDualHttpBinding (callback will notify clients of data). Any ideas on the best way to handle this without creating two separate services to host the same data?
What do you mean by two separate services hosting the same data? Do you expect to share same service instance to handle both wsDualHttpBinding and basicHttpBinding requests?
Your current problem is that service interface for duplex communication cannot be used for basicHttpBinding. You have to create second service contract and implement it in the same service. In that case you can expose two endpoints for the service: one duplex with WSDualHttpBinding and one with BasicHttpBinding. Endpoints must have different relative addresses. From the perspective of the client those endpoints are separate services - each of them requires separate client proxy. So unless your service is singleton you will have new service instance for each client proxy. New service instance means no data sharing.
Thera are some possibilities to modify this behavior but it means replacing Instance provider.