CapableObjects forum



Configuring Persistence Service to use Compression

Posted By ryan_denn 2013-02-19 05:22:42
Add to Favorites0
Author Message
ryan_denn
 Posted 2013-02-19 05:22:42
Supreme Being

Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)

Group: Forum Members
Last Active: 2013-03-05 09:36:54
Posts: 58, Visits: 195
Hi

I have another question:

How can I configure the Windows Persistence Service (not iis) to reduce the data going over the fire? I have heard of compression or binary encoding? But I am really at a loss as to what is best, and also, how to configure the service, and the winforms client's EcoSpace.

Any help would be appreciated
HansKarlsen
 Posted 2013-02-20 00:56:58
Supreme Being

Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)

Group: Administrators
Last Active: 4 hours ago
Posts: 516, Visits: 2 937
You can use any available WCF binding with eco. You need to make sure your client make use of a binding that the server offers.

On the client you add a App.Config if you want to declare the binding that way:

<system.serviceModel>


<bindings>

<wsHttpBinding>
<binding maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600"
receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
<readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600"/>
<!--<security mode="None"/> -->
<security mode="TransportWithMessageCredential" >
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>


<endpoint name="THENAMEOFTHEENDPOINT"
binding="wsHttpBinding" contract="Eco.Wcf.Common.IPersistenceMapperWCF" />

You can then set the persistenceMapperWCFClient.EndpointConfigurationName to match you enpoint name (THENAMEOFTHEENDPOINT)

I usually set the endpoint address-url in code but it could also be in the config file:

persistenceMapperWCFClient.Uri = "theserveraddress.svc"

Your server need to expose a Eco.Wcf.Common.IPersistenceMapperWCF service and have binding that match the one the client use.

I always use BoringPredictable as PersistenceServer (zero hassle and very robust IIS hosted). Its web.config has this:

<services>
<!-- services exoposed by the server-->
<service name="AppCompleteGeneric.A0_PMPWCF" behaviorConfiguration="AppCompleteGenericPMPWCFBehavior">
<endpoint binding="wsHttpBinding" contract="Eco.Wcf.Common.IPersistenceMapperWCF" />
</service>
</services>
<bindings>

<wsHttpBinding>
<binding maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600"
receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
<readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600"/>
<!--<security mode="None"/> -->
<security mode="TransportWithMessageCredential" >
<message clientCredentialType="UserName" />
</security>
</binding>

HansKarlsen
 Posted 2013-02-20 00:56:58
Supreme Being

Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)Supreme Being - (9 976 reputation)

Group: Administrators
Last Active: 4 hours ago
Posts: 516, Visits: 2 937
You can use any available WCF binding with eco. You need to make sure your client make use of a binding that the server offers.

On the client you add a App.Config if you want to declare the binding that way:

<system.serviceModel>


<bindings>

<wsHttpBinding>
<binding maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600"
receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
<readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600"/>
<!--<security mode="None"/> -->
<security mode="TransportWithMessageCredential" >
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>


<endpoint name="THENAMEOFTHEENDPOINT"
binding="wsHttpBinding" contract="Eco.Wcf.Common.IPersistenceMapperWCF" />

You can then set the persistenceMapperWCFClient.EndpointConfigurationName to match you enpoint name (THENAMEOFTHEENDPOINT)

I usually set the endpoint address-url in code but it could also be in the config file:

persistenceMapperWCFClient.Uri = "theserveraddress.svc"

Your server need to expose a Eco.Wcf.Common.IPersistenceMapperWCF service and have binding that match the one the client use.

I always use BoringPredictable as PersistenceServer (zero hassle and very robust IIS hosted). Its web.config has this:

<services>
<!-- services exoposed by the server-->
<service name="AppCompleteGeneric.A0_PMPWCF" behaviorConfiguration="AppCompleteGenericPMPWCFBehavior">
<endpoint binding="wsHttpBinding" contract="Eco.Wcf.Common.IPersistenceMapperWCF" />
</service>
</services>
<bindings>

<wsHttpBinding>
<binding maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600"
receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
<readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600"/>
<!--<security mode="None"/> -->
<security mode="TransportWithMessageCredential" >
<message clientCredentialType="UserName" />
</security>
</binding>

ryan_denn
 Posted 2013-02-20 10:33:16
Supreme Being

Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)

Group: Forum Members
Last Active: 2013-03-05 09:36:54
Posts: 58, Visits: 195
I am at a bit of a loss on how to configure bindings in code (my EcoSpace is in a seperate assembly, and I presume that is where the bindings need to be configured). I am using the EcoSpace generated my the template.

Likewise, I am not sure where to configure bindings in the PServerWindowsService produced by the template.

Can somebody help out?
ryan_denn
 Posted 2013-02-20 10:33:54
Supreme Being

Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)Supreme Being - (1 467 reputation)

Group: Forum Members
Last Active: 2013-03-05 09:36:54
Posts: 58, Visits: 195
One more question, what is the default binding that is used by the templates?

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top