Re: WCF bindings readerQuotas element

2011-01-31 Thread Wallace Turner
Hi Peter, I looked into this a while ago and whilst the details escape 
me, the config I settled on was the following:



readerQuotas maxDepth=32 maxStringContentLength=2147483647 
maxArrayLength=2147483647 maxBytesPerRead=4096 
maxNameTableCharCount=2147483647/


Empirically, this allowed me to send large amounts of data over the 
network. Note, attributes not listed are assuming the default.

Sry can't provide more info or answers to those specific fields.



On 31/01/2011 3:36 PM, Peter Maddin wrote:
I am looking at writing a WCF web service to transfer files but I am 
not sure of some of the binding attributes of the readerQuotas element.
If I send binary files I presume with a basicHttpBinding that Soap 1.1 
will be used and the content will be base64 encoded. This bulks up the 
data transferred.


You can get an idea from 
http://msdn.microsoft.com/en-us/library/ms731325.aspx. The details 
provided are not very explanatory. Some examples would have been nice 
as to where to change these attributes and why one should and what the 
effect would be.


I looked at Programming WCF Services by Juval Lowy and it does not 
mention this element. I think my copy is now out of date.


Attribute   Description

maxArrayLength



A positive integer that specifies the maximum allowed array length of 
data being received by Windows Communication Foundation (WCF) from a 
client. The default is 16384. OK this sounds clear enough (I hope)


maxBytesPerRead



A positive integer that specifies the maximum allowed bytes returned 
per read. The default is 4096.
Is this something one needs to adjust for performance reasons or does 
it impact on the amount of data one is trying to transfer (I would 
have though maxStringContentLength and maxReceivedMessageSize would be 
where one needs to adjust things). What does this attribute actually do?


maxDepth



A positive integer that specifies the maximum nested node depth per 
read. The default is 32.


Is this something to be aware of when defining ones DataContracts or 
is it for something else.


maxNameTableCharCount



A positive integer that specifies the maximum characters allowed in a 
table name. The default is 16384.


If one is not passing a table I guess this does not matter

maxStringContentLength



A positive integer that specifies the maximum characters allowed in 
XML element content. The default is 8192.
Is this some needs to be aware of if one is using basicHttpBinding and 
the content is base64 encoded, must one make an allowance for the 
extra bloat?



Regards Peter



--
Wallace Turner | General Manager IT
FEX | ? 61 2 8024 5200 ?  61 2 8024 5234 | | ? w.tur...@fex.com.au ? 
www.fex.com.au


This correspondence is for the named person's use only. It may contain 
confidential or legally privileged information or both.
No confidentiality or privilege is waived or lost by any mistransmission. If 
you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not 
disclose, copy or rely on any part of this
correspondence if you are not the intended recipient.



Re: WCF bindings readerQuotas element

2011-01-31 Thread Stephen Liedig
Hi Peter,

have you considered streaming (
http://msdn.microsoft.com/en-us/library/ms731913.aspx)? Might be the better
option given the variable file sizes.

Regards,

Steve




On 31 January 2011 09:09, Wallace Turner w.tur...@fex.com.au wrote:

  Hi Peter, I looked into this a while ago and whilst the details escape me,
 the config I settled on was the following:


 readerQuotas maxDepth=32 maxStringContentLength=2147483647
 maxArrayLength=2147483647 maxBytesPerRead=4096
 maxNameTableCharCount=2147483647/

 Empirically, this allowed me to send large amounts of data over the
 network. Note, attributes not listed are assuming the default.
 Sry can't provide more info or answers to those specific fields.




 On 31/01/2011 3:36 PM, Peter Maddin wrote:

 I am looking at writing a WCF web service to transfer files but I am not
 sure of some of the binding attributes of the readerQuotas element.
 If I send binary files I presume with a basicHttpBinding that Soap 1.1 will
 be used and the content will be base64 encoded. This bulks up the data
 transferred.

 You can get an idea from
 http://msdn.microsoft.com/en-us/library/ms731325.aspx. The details
 provided are not very explanatory. Some examples would have been nice as to
 where to change these attributes and why one should and what the effect
 would be.

 I looked at Programming WCF Services by Juval Lowy and it does not mention
 this element. I think my copy is now out of date.

   Attribute Description

 maxArrayLength

 A positive integer that specifies the maximum allowed array length of data
 being received by Windows Communication Foundation (WCF) from a client. The
 default is 16384. OK this sounds clear enough (I hope)

 maxBytesPerRead

 A positive integer that specifies the maximum allowed bytes returned per
 read. The default is 4096.
 Is this something one needs to adjust for performance reasons or does it
 impact on the amount of data one is trying to transfer (I would have though
 maxStringContentLength and maxReceivedMessageSize would be where one needs
 to adjust things). What does this attribute actually do?

 maxDepth

 A positive integer that specifies the maximum nested node depth per read.
 The default is 32.

 Is this something to be aware of when defining ones DataContracts or is it
 for something else.

 maxNameTableCharCount

 A positive integer that specifies the maximum characters allowed in a table
 name. The default is 16384.

 If one is not passing a table I guess this does not matter

 maxStringContentLength

 A positive integer that specifies the maximum characters allowed in XML
 element content. The default is 8192.
 Is this some needs to be aware of if one is using basicHttpBinding and the
 content is base64 encoded, must one make an allowance for the extra bloat?

 Regards Peter



 --
 Wallace Turner | General Manager IT
 FEX |  61 2 8024 5200   61 2 8024 5234 | |  w.tur...@fex.com.au  
 www.fex.com.au


 This correspondence is for the named person's use only. It may contain 
 confidential or legally privileged information or both.
 No confidentiality or privilege is waived or lost by any mistransmission. If 
 you receive this correspondence in error, please
 immediately delete it from your system and notify the sender. You must not 
 disclose, copy or rely on any part of this
 correspondence if you are not the intended recipient.




Re: WCF bindings readerQuotas element

2011-01-31 Thread Peter Maddin

Ok Thanks

It would be nice to know what they actually do and what behaviour they 
alter.


If you have maxed out the attribute values and have left maxBytesPerRead 
as the default, I would guess its impact at a performance level with the 
size of  network IO requests. Increase the value for faster throughput 
at the expense of memory consumption. But that's only an educated guess.


I need to transfer files that are are statistically around 4-8 K in size 
with some outliers being up to 10 to 20 times this.


My main concern is that we have lots of clients downloading and I would 
rather keep any memory allocation to a minimum as the server is not that 
well spec'ed  (and is quite old to boot)


Regards Peter


On 31/01/2011 5:09 PM, Wallace Turner wrote:
Hi Peter, I looked into this a while ago and whilst the details escape 
me, the config I settled on was the following:



readerQuotas maxDepth=32 maxStringContentLength=2147483647 
maxArrayLength=2147483647 maxBytesPerRead=4096 
maxNameTableCharCount=2147483647/


Empirically, this allowed me to send large amounts of data over the 
network. Note, attributes not listed are assuming the default.

Sry can't provide more info or answers to those specific fields.



On 31/01/2011 3:36 PM, Peter Maddin wrote:
I am looking at writing a WCF web service to transfer files but I am 
not sure of some of the binding attributes of the readerQuotas element.
If I send binary files I presume with a basicHttpBinding that Soap 
1.1 will be used and the content will be base64 encoded. This bulks 
up the data transferred.


You can get an idea from 
http://msdn.microsoft.com/en-us/library/ms731325.aspx. The details 
provided are not very explanatory. Some examples would have been nice 
as to where to change these attributes and why one should and what 
the effect would be.


I looked at Programming WCF Services by Juval Lowy and it does not 
mention this element. I think my copy is now out of date.


Attribute   Description

maxArrayLength



A positive integer that specifies the maximum allowed array length of 
data being received by Windows Communication Foundation (WCF) from a 
client. The default is 16384. OK this sounds clear enough (I hope)


maxBytesPerRead



A positive integer that specifies the maximum allowed bytes returned 
per read. The default is 4096.
Is this something one needs to adjust for performance reasons or does 
it impact on the amount of data one is trying to transfer (I would 
have though maxStringContentLength and maxReceivedMessageSize would 
be where one needs to adjust things). What does this attribute 
actually do?


maxDepth



A positive integer that specifies the maximum nested node depth per 
read. The default is 32.


Is this something to be aware of when defining ones DataContracts or 
is it for something else.


maxNameTableCharCount



A positive integer that specifies the maximum characters allowed in a 
table name. The default is 16384.


If one is not passing a table I guess this does not matter

maxStringContentLength



A positive integer that specifies the maximum characters allowed in 
XML element content. The default is 8192.
Is this some needs to be aware of if one is using basicHttpBinding 
and the content is base64 encoded, must one make an allowance for the 
extra bloat?



Regards Peter



--
Wallace Turner | General Manager IT
FEX | ? 61 2 8024 5200 ?  61 2 8024 5234 | | ?w.tur...@fex.com.au  
?www.fex.com.au


This correspondence is for the named person's use only. It may contain 
confidential or legally privileged information or both.
No confidentiality or privilege is waived or lost by any mistransmission. If 
you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not 
disclose, copy or rely on any part of this
correspondence if you are not the intended recipient.


Re: WCF bindings readerQuotas element

2011-01-31 Thread Peter Maddin

 have you considered streaming

I had heard of it but hadn't gone into the details (thanks for the link).
I think streaming is more for large volumes of data (video and audio 
streaming).

My downloads are lots of fairly small files (with some exceptions).
I am leaning towards chunked file transfers with the majority of files 
being transferred in the first chunk.


Regards Peter

..

On 31/01/2011 5:35 PM, Stephen Liedig wrote:

Hi Peter,

have you considered streaming 
(http://msdn.microsoft.com/en-us/library/ms731913.aspx)? Might be the 
better option given the variable file sizes.


Regards,

Steve




On 31 January 2011 09:09, Wallace Turner w.tur...@fex.com.au 
mailto:w.tur...@fex.com.au wrote:


Hi Peter, I looked into this a while ago and whilst the details
escape me, the config I settled on was the following:


readerQuotas maxDepth=32 maxStringContentLength=2147483647
maxArrayLength=2147483647 maxBytesPerRead=4096
maxNameTableCharCount=2147483647/

Empirically, this allowed me to send large amounts of data over
the network. Note, attributes not listed are assuming the default.
Sry can't provide more info or answers to those specific fields.




On 31/01/2011 3:36 PM, Peter Maddin wrote:

I am looking at writing a WCF web service to transfer files but I
am not sure of some of the binding attributes of the readerQuotas
element.
If I send binary files I presume with a basicHttpBinding that
Soap 1.1 will be used and the content will be base64 encoded.
This bulks up the data transferred.

You can get an idea from
http://msdn.microsoft.com/en-us/library/ms731325.aspx. The
details provided are not very explanatory. Some examples would
have been nice as to where to change these attributes and why one
should and what the effect would be.

I looked at Programming WCF Services by Juval Lowy and it does
not mention this element. I think my copy is now out of date.

Attribute   Description

maxArrayLength



A positive integer that specifies the maximum allowed array
length of data being received by Windows Communication Foundation
(WCF) from a client. The default is 16384. OK this sounds clear
enough (I hope)

maxBytesPerRead



A positive integer that specifies the maximum allowed bytes
returned per read. The default is 4096.
Is this something one needs to adjust for performance reasons or
does it impact on the amount of data one is trying to transfer (I
would have though maxStringContentLength and
maxReceivedMessageSize would be where one needs to adjust
things). What does this attribute actually do?

maxDepth



A positive integer that specifies the maximum nested node depth
per read. The default is 32.

Is this something to be aware of when defining ones DataContracts
or is it for something else.

maxNameTableCharCount



A positive integer that specifies the maximum characters allowed
in a table name. The default is 16384.

If one is not passing a table I guess this does not matter

maxStringContentLength



A positive integer that specifies the maximum characters allowed
in XML element content. The default is 8192.
Is this some needs to be aware of if one is using
basicHttpBinding and the content is base64 encoded, must one make
an allowance for the extra bloat?


Regards Peter



-- 
Wallace Turner | General Manager IT

FEX |  61 2 8024 5200   61 2 8024 5234 | | w.tur...@fex.com.au  
mailto:w.tur...@fex.com.au  www.fex.com.au  http://www.fex.com.au


This correspondence is for the named person's use only. It may contain 
confidential or legally privileged information or both.
No confidentiality or privilege is waived or lost by any mistransmission. 
If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not 
disclose, copy or rely on any part of this
correspondence if you are not the intended recipient.




Re: EF4 custom views

2011-01-31 Thread Neil Young
Greg,

Sorry I'm no help on this one, we were using EF right out of the box
on a greenfields application, so I suspect that modified our DB design
a little as we went.  We don't have any scenarios like the one you
describe and I haven't done it as yet.

Neil.

On 30 January 2011 13:25, Greg Keogh g...@mira.net wrote:
 Neil and other folks using EF4,



 The most vital thing I need to learn in EF4 is how you are supposed to
 create a strongly typed custom view of multiple tables and fill the thing.



 In classic ADO.NET you would construct an XSD DataSet with the columns you
 want, then write a SELECT with JOINs to fill it. In netTiers the process is
 nearly the same, you write the View then the classes and methods are
 generated, but it's all plain ADO.NET under the covers.



 I can't find the equivalent of this in EF4. I created a new Entity in the
 designer with the combined columns of different tables I'm joining,
 expecting this to represent my view. However, after hours of suffering I
 can't create such a thing because of errors like these:



 EntitySets 'MainLists' and 'Instance' are both mapped to table 'Instance'.
 Their primary keys may collide.

 Must specify mapping for all key properties (MainLists.InstId) of the
 EntitySet MainLists.



 There are hundreds of reports of people pleading about how to overcome these
 sorts of edmx problems, and no clear answers. I have joined the ranks of the
 bewildered and I have corrupted dozens of edmx files attempting to manually
 edit them as some suggest. So I'm wondering if I'm actually trying to do the
 wrong thing, pushing EF4 to do something it doesn't do due to a
 misconception on my part.



 Does anyone know how to make a strongly typed custom view and fill it in
 EF4?



 I'm pleased to see that there are other people posting EF4 questions on the
 web and asking things like why is it so hard?



 Greg


Re: EF4 custom views

2011-01-31 Thread djones147
I hate to be a kill joy.

In the last 4 years I've used EF twice, nhibernate 3 times and even against my 
recomendations we end up 6 months down the line with a hybrid that uses 
straight ado.net connections for the time critical parts and EF / Nhibernate 
for the simple object loading.  

I was a huge nhibernate fan but now when I hear that an object persistance 
framework is a requirement of a project I start planning my exit  for 6 months 
later.

Davy.
When all you have is a hammer, every problem looks like a nail. I feel much 
the same way about xml

-Original Message-
From: Greg Keogh g...@mira.net
Sender: ozdotnet-boun...@ozdotnet.com
Date: Tue, 1 Feb 2011 09:01:27 
To: 'ozDotNet'ozdotnet@ozdotnet.com
Reply-To: ozDotNet ozdotnet@ozdotnet.com
Subject: RE: EF4 custom views

I've ordered the other book on EF4 that was mentioned yesterday. After
reading the Learman book for many weeks, I find when I sit down to code that
the very first seemingly simple and fundamental thing I want to do is
obscure or impossible. The books and magazine articles never prepare you for
what will happen in a real app.

EF4 has shocking up-front difficulty barrier to using it in a serious app.
It seems that you need a PhD in EF4ology before you can get started.

If and when I eventually do get EF4 working to my satisfaction I will report
on it, and I'll report on the two EF4 books.

It's not Friday, but as an aside: You are the only second person I have ever
heard use the word 'greenfields'. A colleague used it two days ago and I
thought he was talking about a company called Green Fields. Is this another
Americanism creeping into our language? Or is it from some other discipline?
My current pet hate is the word impacts. My latest IT books (including
Lerman's) are using it everywhere in sentences like setting this option
will impact performance. Will the word affect be deprecated from the
English language? Even the ABC news and local newspapers are now reporting
how this will impact that. I'm surprised I can't hear all of these
collisions.

I'll have to dogfood the impact and architect a solution before we verbize
anymore nouns.

Greg



Re: EF4 custom views

2011-01-31 Thread Noon Silk
On Tue, Feb 1, 2011 at 9:12 AM,  djones...@gmail.com wrote:
 I hate to be a kill joy.

 In the last 4 years I've used EF twice, nhibernate 3 times and even against 
 my recomendations we end up 6 months down the line with a hybrid that uses
 straight ado.net connections for the time critical parts and EF / Nhibernate 
 for the simple object loading.

 I was a huge nhibernate fan but now when I hear that an object persistance 
 framework is a requirement of a project I start planning my exit  for 6 
 months later.

Have you tried LLBLGen? I really can't comprehend why people waste
time not using it.


 Davy.
 When all you have is a hammer, every problem looks like a nail. I feel much 
 the same way about xml

-- 
Noon Silk

http://dnoondt.wordpress.com/  (Noon Silk) | http://www.mirios.com.au:8081 

Fancy a quantum lunch?
http://www.mirios.com.au:8081/index.php?title=Quantum_Lunch

Every morning when I wake up, I experience an exquisite joy — the joy
of being this signature.


Re: EF4 custom views

2011-01-31 Thread Joseph Cooney
That was my experience with EF also. First thing I tried (a few years back now) 
was to get 'plug-able databases' working. I.e. Target sqlite or SQL server 
based on configuration change. The consensus on forums was to create two 
parallel sets of EF classes and wrap them both in a custom interface (which I 
would have to define and write the wrapper code for). Definitely a 'get off the 
bus and walk' moment for me.

Ado.net or linq2sql get the job done.

On 01/02/2011, at 8:01 AM, Greg Keogh g...@mira.net wrote:

 I've ordered the other book on EF4 that was mentioned yesterday. After
 reading the Learman book for many weeks, I find when I sit down to code that
 the very first seemingly simple and fundamental thing I want to do is
 obscure or impossible. The books and magazine articles never prepare you for
 what will happen in a real app.
 
 EF4 has shocking up-front difficulty barrier to using it in a serious app.
 It seems that you need a PhD in EF4ology before you can get started.
 
 If and when I eventually do get EF4 working to my satisfaction I will report
 on it, and I'll report on the two EF4 books.
 
 It's not Friday, but as an aside: You are the only second person I have ever
 heard use the word 'greenfields'. A colleague used it two days ago and I
 thought he was talking about a company called Green Fields. Is this another
 Americanism creeping into our language? Or is it from some other discipline?
 My current pet hate is the word impacts. My latest IT books (including
 Lerman's) are using it everywhere in sentences like setting this option
 will impact performance. Will the word affect be deprecated from the
 English language? Even the ABC news and local newspapers are now reporting
 how this will impact that. I'm surprised I can't hear all of these
 collisions.
 
 I'll have to dogfood the impact and architect a solution before we verbize
 anymore nouns.
 
 Greg
 


Databases for Windows Phone 7.

2011-01-31 Thread David Loo

Hello
Does anyone know which local databases are available for  Windows Phone 7 ?
Back in the Windows Mobile days MS SQL Compact Edition was available.
Thanks

David Loo