|
Posted
about 12 years
ago
by
sky1248
Is it possible to add fastjson or protobuf-net? the BinaryFormatter is not good enough.
|
|
Posted
about 12 years
ago
by
yallie
Hi sirinath.
Since I've got no specific answers from you so far, I assume that you've got no real-world use case in mind.
Now back to your questions:
Is it possible to add Complex Event Processing / Event Stream Processing capabilities?
... [More]
Zyan allows publishing events from your server components and handling events on clients.
It's up to you to handle incoming events in any possible way, but Zyan won't provide you any specific help with so-called CEP.
Perhaps this can be done through Rx
Zyan works with RX as demonstrated in the sample above.
Have a look at: http://esper.codehaus.org/, http://www.jboss.org/drools/drools-fusion.html, http://technet.microsoft.com/en-us/library/ee362541.aspx (most closet to .net use case)
Zyan doesn't mean to compete with these libraries as they serve different purposes. Here is a quick list:
Zyan allows you composing multi-tier distributed applications with transparent support for LINQ and events, while CEP libraries don't.
Zyan can host distributed event-based components (EBC) while these libraries don't.
Zyan enables RPC interoperation between .NET (Windows), Mono (MacOS/Linux) and Xamarin.Android applications while these libraries don't.
CEP libraries provide means for aggregating/analyzing incoming stream events, while Zyan don't.
In my opinion, Zyan doesn't look like a tool you're searching for.
[Less]
|
|
Posted
about 12 years
ago
by
yallie
I know what is RX, I just haven't used it in a real-world applications.
That's why I asked you for your usage scenario.
I.e. what exactly are you going to do with RX.
|
|
Posted
about 12 years
ago
by
sirinath
Have a look at: http://esper.codehaus.org/, http://www.jboss.org/drools/drools-fusion.html, http://technet.microsoft.com/en-us/library/ee362541.aspx (most closet to .net use case)
|
|
Posted
about 12 years
ago
by
sirinath
Rx is similar to Linq but mainly for streaming push data: rx.codeplex.com
|
|
Posted
about 12 years
ago
by
yallie
Please give me an example of what you're talking about. What is complex event processing?
Zyan supports events out of the box. It tries its best to make distributed events look and behave exactly like normal local .NET events. So you should be able
... [More]
to do just everything you would do with normal events. For example, use Observable.FromEventPattern to wrap around your proxy's event. Here is an example:
// client-side code
using (var conn = new ZyanConnection(url, protocol))
{
// create a proxy and an ordinal event handler
var proxy = conn.CreateProxy<ISampleService>();
proxy.RandomEvent += (s, e) => Console.WriteLine("Random event ocured.");
// create RX observable with throttle option
var observable =
Observable.FromEventPattern<EventArgs>(proxy, "RandomEvent")
.Throttle(TimeSpan.FromSeconds(1));
observable.Subscribe(e =>
{
Console.WriteLine("Occured later than 1 second after the last event.");
});
// let server start sending events to our proxy
proxy.RaiseRandomEvents();
Console.ReadLine();
}
Full code for the example console program is available here: https://gist.github.com/yallie/7525678
To compile the sample using console C# compiler, run
csc rxtest.cs /r:Zyan.Communication.dll /r:System.Reactive.Core.dll /r:System.Reactive.Linq.dll /r:System.Reactive.Interfaces.dll /r:System.Runtime.dll /r:System.Threading.Tasks.dll
The first run of the application starts the server. The second run starts the client.
The client connects to the server using IPC protocol and displays events generated by server.
It uses Observable class to aggregate and filter remote events.
Here is the sample output of the console client program:
Connected to server. Press ENTER to quit.
Random event ocured.
Random event ocured.
Random event ocured.
Random event ocured.
Occured later than 1 second after the last event.
Random event ocured.
Occured later than 1 second after the last event.
Random event ocured.
Occured later than 1 second after the last event.
Random event ocured.
Random event ocured.
Random event ocured.
Random event ocured.
Occured later than 1 second after the last event.
Let me know if it answers your question.
[Less]
|
|
Posted
about 12 years
ago
by
yallie
No, you can only use .NET languages with Zyan.
Zyan is just an advanced RPC framework with easy to use API. It's not a general purpose networking library.
Zyan connection requires Zyan server on the other side of the wire.
|
|
Posted
about 12 years
ago
by
yallie
Hi sirinath.
I've never used RX in my projects.
To answer your question I need to know what usage scenario are you asking about.
It does say Linq enabled on the main page.
Yes, Zyan supports LINQ. It means that if you server component has
... [More]
method such as
public IQueryable<T> GetTable<T>()
{
return myDataContext.GetTable<T>();
}
you can create a proxy for it on the client and use it in a LINQ query:
var proxy = zyanConnection.CreateProxy<IMyDataContext>(); // your service interface name
var query =
from u in proxy.GetTable<User>()
where u.Name.StartsWith('Bozo')
select u;
var bozos = query.Count(); // execute remote LINQ query and get the result
Your LINQ expression will be serialized and sent across the wire, executed on server and transferred back to client.
But this feature has nothing to do with RX.
You can use RX to wrap around events on the client side.
Zyan will transfer events raised by server component to your client-side proxy and raise them just like as normal local events.
You can create observable wrapper for them and use it in your LINQ queries.
This scenario should work, but I'm not sure if that's what you're talking about?
[Less]
|
|
Posted
about 12 years
ago
by
sirinath
Is it possible to add Complex Event Processing / Event Stream Processing capabilities?
Perhaps this can be done through Rx
|
|
Posted
about 12 years
ago
by
sirinath
Is it possible to have other language binds where the you can use Zyan client with Socket data sent in by 3rd party applications on which we do not have control over the formats.
Certain data has a certain encoding, certain encryption and format (binary or text based). Is there a out of the box solutions for this? At least for major formats.
|