-
Notifications
You must be signed in to change notification settings - Fork 39
Home
tylerje edited this page Oct 23, 2014
·
10 revisions
(Note: This wiki content was imported and needs to be cleaned up. Please excuse the refactoring mess.)
ServiceWire is a very fast and light weight service host and dynamic client library that simplifies the development and use of high performance remote procedure call (RPC) communication between .NET processes over Named Pipes or TCP/IP.
- Why ServiceWire
- History of ServiceWire
- Like us on Facebook
- Two fast binary protocols: TCP and Named Pipes
- The only RPC service library under active development that supports out and ref parameters
- Dynamically generated client proxy in-memory assembly
- Very fast serialization
- Host multiple service interfaces on single endpoint
- Singleton hosting on multiple protocols and endpoints
- Aspect oriented interceptor with pre-, post- and exception handling cross cutting
- Injectable Logging and Performance Instrumentation
- Optional parameter and return value compression
Write an interface like this:
public interface IMyService
{
Guid GetId(string source, double weight, int quantity, DateTime dt);
TestResponse Get(Guid id, string label, double weight, out long quantity);
long TestLong(out long id1, out long id2);
List<string> GetItems(Guid id);
}
Write your implementation and then host it this easily:
var tcphost = new TcpHost(ipEndpoint, logger, stats);
tcphost.AddService<IMyService>(myService);
Then write your client code to use the service this easily:
using (var client = new TcpClient<IMyService>(ipEndpoint))
{
var id = client.GetId("test1", 3.314, 42);
int q2 = 4;
var response = client.Get(id, "mirror", 4.123, out q2)
var list = client.GetItems(id, new int[] { 3, 6, 9 });
}