Re: [Mono-dev] .Net 2.0 asynchronous web pages

2007-09-11 Thread Konstantin Triger
Hello Svetoslav,

The feature actually consists of 2 sub-features:
1. Runtime support (Page API).
2. Aspx parser support.

Several months ago we completed (1). So currently someone needs to ensure (2) 
works too.
While implementing it, we did not find any really useful scenario why someone 
may need this feature. Can you please explain what your use case is?

Thanks,
Kosta

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:mono-devel-list-
 [EMAIL PROTECTED] On Behalf Of Sunny
 Sent: Monday, September 10, 2007 9:01 PM
 To: mono-devel-list@lists.ximian.com
 Subject: Re: [Mono-dev] .Net 2.0 asynchronous web pages
 
 On 8/5/07, Adar Wesley [EMAIL PROTECTED] wrote:
 
  As far as I know the Async pages feature is not fully implemented.
 
 
 Is there any timeline for this? Does someone work on it?
 
 --
 Svetoslav Milenov (Sunny)
 
 Even the most advanced equipment in the hands of the ignorant is just
 a pile of scrap.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] asp.net menu StaticSelectedStyle

2007-09-11 Thread Onur Gumus
I use that control successfully as of 1.2.5. I have digged all options but
here's my decleration:

 asp:Menu  style=position:absolute; top:200px;
   Id=menu1 DataSourceID=srcSiteMap

 StaticMenuItemStyle-Font-Size=16
 StaticHoverStyle-ForeColor=white
 StaticHoverStyle-BackColor=Red

  StaticHoverStyle-ItemSpacing=2
  StaticMenuItemStyle-ForeColor=Red
  StaticMenuItemStyle-BackColor=White

   DynamicMenuItemStyle-Font-Size=16
 DynamicHoverStyle-ForeColor=white
 DynamicHoverStyle-BackColor=Red

  DynamicHoverStyle-ItemSpacing=2
  DynamicMenuItemStyle-ForeColor=Red
  DynamicMenuItemStyle-BackColor=White
 Runat=server  /


This works exactly I expected (successfully). One important note . You must
get rid of the !DOCTYPE decleration at top of the aspx page for this to
work


I hope it helps
On 9/11/07, Anton Andreev [EMAIL PROTECTED] wrote:

 Hi,

 It seems that there is a problem with StaticSelectedStyle in Microsoft
 version of Asp.NET Menu control.
 Does someone know something about that?
 Is it Mono Menu control stable enough, so I can use it instead of
 Microsoft one?

 Cheers,
 Anton

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




-- 
Warning: If you are reading this then this warning is for you. Every word
you read of this useless fine print is another second off your life. Don't
you have other things to do? Is your life so empty that you honestly can't
think of a better way to spend these moments? Or are you so impressed with
authority that you give respect and credence to all that claim it? Do you
read everything you're supposed to read? Do you think every thing you're
supposed to think? Buy what you're told to want? Get out of your apartment.
Meet a member of the opposite sex. Stop the excessive shopping and
masturbation.Quit your job. Start a fight. Prove you're alive. If you don't
claim your humanity you will become a statistic. You have been warned - Onur
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .Net 2.0 asynchronous web pages

2007-09-11 Thread Sunny
On 9/11/07, Konstantin Triger [EMAIL PROTECTED] wrote:
 The feature actually consists of 2 sub-features:
 1. Runtime support (Page API).
 2. Aspx parser support.

 Several months ago we completed (1). So currently someone needs to ensure (2) 
 works too.
 While implementing it, we did not find any really useful scenario why someone 
 may need this feature. Can you please explain what your use case is?

Hi Kosta,
the scenario is the same as with async web services - to free a
threadpool thread not to be used for a long term operations.

I have a web page (I can use web service, but it returns a blob of 1M
binary data, so with soap, etc, it will be at least doubled) which
returns a blob of binary data, which is collected after a lot of web
service and database requests in different threads (async, so io
threads from the thread pool). When you have too many incoming
requests, which block for a long time thread pool threads, and in the
same time your execution occupies thread pool threads for the outgoing
requests, the result may be a dead lock, and dropped requests, because
no one knows the order of thread assignment (i.e. the order in which
you will receive incoming requests, and when your own requests will
start). As elementary example (thread pool with only 4 threads):
- receive first request and block untill finish - 3 in the pool
- receive sec. request and block - 2 in the pool
- first req. starts 3 own threads to get data - they in term need 3
thread pool threas - 2 are available, and one queued
- third request is received, and queued (not pool threads)
- forth request is received, and queued (not pool threads)
- fifth request is received, and queued (not pool threads)
- second req. starts 3 threads as well, and the framework queues them
- one of the requests from the first request is finished and thread
pool thread is freed
- it is assigned to the third call made by the first request
- next req. finishes, and the thread is assigned to the third incoming
request, and block, because its processing stops to wait thread pool
threads (3 of them).
- now, when the 3th thread from the first incoming is finished, it
will go to the forth incoming request and blocked

now you have your thread pool blocked on requests, which in terms wait
on the tread pool. Eventually this will end with some time-outed
requests, but may end with really bad dead lock.

That's why using async web services is good for such a scenario, and
because I need web page instead web service, I need the async
approach.

Of course, there are online some examples how to do this with 1.1 and
creating your own aspx handler, so you make the call async.

And, of course, maybe I can rethink the design. But lets say that this
is the approach which serves me best.

Basically, I have the application, implemented for 2.0, and now I just
have to decide what server to use - win or linux. And I would prefer
linux. So, maybe I'll go with some of the workarounds, i.e. to
implement my own handler, or I may wait some time, if this is planned
feature.

For reference:
http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/

And this is a comparison in the performance when using async vs sync
pages, when the page logic makes a lot of async requests itself:
http://www.pluralsight.com/blogs/fritz/archive/2004/10/19/2892.aspx

Pls, note, that I could not find the original article I read about the
dead blocking scenario, so I just tried to reproduce it (maybe
inaccurate).

Cheers

-- 
Svetoslav Milenov (Sunny)

Even the most advanced equipment in the hands of the ignorant is just
a pile of scrap.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [Gtk.Application.Invoke] Thread to up date a Gtk.Label

2007-09-11 Thread David Arnaud-Goddet
Hi all,

I have a problem (again and again...) with my mono application.
After having created a GUI with gtk#, and configured a serial port
connection, now I have to mix these 2 applications!
In fact I would like to set the text of a label to indicate the state of the
serial port.
I created a thread which do that but the label aren't update properly.
I read this page : http://www.mono-project.com/Responsive_Applications but
my english level isn't very high. So I understand that:
= the operations cross thread are not allowed (a thread can't modify the
object's properties which another Thread has created).
= I must use delegate.

That why I do that : (but it doesn't work!!!)

t = new System.Threading.Thread(new ThreadStart(thread_Process));

private void readData_Clik(object sender, System.EventArgs e)
{
t.Start();
}


private void thread_Process()
{
   OpenSerialPort();
   Gtk.Application.Invoke(delegate
   {
   myLabel.Text = The serial
port is open;
   });
string[] rxdata = new string[];
rxdata = ReadData();
Gtk.Application.Invoke(delegate
   {
   myLabel.Text = The data have
been read;
   labelVal1.Text = rxdata[0];
   labelVal2.Text = rxdata[1];
   });
CloseSerialPort();
Gtk.Application.Invoke(delegate
   {
   myLabel.Text = The serial
port is close;
   });
}

The labels are not update each time! Moreover the code execution time is
slower than if I do that not in a thread...
I don't understand.

Thanks in advance.


-- 
David ARNAUD-GODDET
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Linq In Mono

2007-09-11 Thread Kevin Kubasik
Hey! I saw that work has gotten started on the implementation of Linq
(at least the backend classes at the moment) in mono. I wanted to get
involved a bit and offer my help. While I've been using Mono for some
time now, I haven't worked on the Microsoft class libraries before,
and I had a few quick questions, and would appreciate any
advice/guidance on how to really get started.

1) With regards to working on the Linq stuff(or the Olive module in
general), is there a separate mailing list or anything that I should
subscribe to/direct discussion towards?

2) Where's a good place in the implementation to start? I see plenty
of todo tags etc. I just don't want to step on someones feet.
Furthermore, with the abundance of new code when implementing new
classes like this, what elements of deign are coordinated, and what
are just the first dev to get to it?

3) What/How much research is fair game when checking the reference
implementation? I would assume that ildasm and reflector are major
no-no's, along with any other means of decompilation. But can the MS
dll's be run in Linux without concern? I've been reading a lot over at
msdn, specifically
http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx
is that a problem? (I would assume it isn't but I don't want any trouble ;) )

If this is the wrong place or time or tone or mood to be asking this
or getting involved with this extension of the class library just let
me know!
-- 
Cheers,
Kevin Kubasik
http://kubasik.net/blog
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list