[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

IIS, stateful objects and Sessions

Elp

6/10/2004 9:03:00 PM

Hi,

I know that it is impossible to host a stateful (singleton) .NET Remoting
object under IIS 6 because IIS has the habit to recycle its worker process
from time to time without notice, which has the side effect to destroy the
state of any hosted singleton.
However, Web Sites and Web Services have the ability to use Sessions to
store previous requests made by a particular client.I assume that those
sessions are not destroyed when IIS recycles its worker process so how are
they handled? Are they managed on the client side? Or stored in a file on
the Web Server hard drive?

I guess that you've seen that i know little about Web Site and Sessions
managment but i'm just curious here.

Thanks.


16 Answers

zaimoni

2/20/2008 6:06:00 PM

0

On 2008-02-20 18:40:25, Ido Yehieli <Ido.Yehieli@gmail.com> wrote:

> On Feb 20, 6:28 pm, "Michal Bielinski" wrote:
> > I counted all C and C++ projects together.
>
> It would be less wrong to count c++ and java together than c & c++.

Except that C++ and Java won't compile each other at all.

C++, at least, compiles almost all C programs unaltered. Also, one convenience
of C++ is *intentionally* doing things the C way when that's superior (e.g.,
calloc/realloc/free for known POD types).


Jeff Lait

2/20/2008 6:11:00 PM

0

On Feb 20, 12:40 pm, Ido Yehieli <Ido.Yehi...@gmail.com> wrote:
> On Feb 20, 6:28 pm, "Michal Bielinski" <Dungeon_Kee...@tlen.pl> wrote:
>
> > I counted all C and C++ projects together.
>
> It would be less wrong to count c++ and java together than c & c++.

No, it would be more wrong. Unless you are going to claim that "C++"
implies OOP, which it doesn't. I can write C-style code inside C++.
My use of // comments hardly makes it C++ (Indeed, for all I know //
comments are now part of C...) This, I presume, is why the two are
grouped together - it is very hard to look at the project and
determine from the outside if it is a "C" project or a "C++" project.

POWDER, for example, would be classified as C++, but I'd hazard a
guess that its structure reflects C-style thinking more than Java-
style thinking.

That said, I strongly encourage you to run over the actively
developing list
(http://thelist.roguelikedevelo...), classify the C/C++
projects into one of those two buckets, and report back to us on the
results. The current list matches the one that Michal used (thanks to
Michal for giving me the updated list!) so you should get comparable
results.
--
Jeff Lait
(POWDER: http://www.zincland....)

Ido Yehieli

2/20/2008 6:56:00 PM

0

On Feb 20, 7:10 pm, Jeff Lait <torespondisfut...@hotmail.com> wrote:
> No, it would be more wrong. Unless you are going to claim that "C++"
> implies OOP, which it doesn't. I can write C-style code inside C++.
> My use of // comments hardly makes it C++ (Indeed, for all I know //
> comments are now part of C...) This, I presume, is why the two are
> grouped together - it is very hard to look at the project and
> determine from the outside if it is a "C" project or a "C++" project.

Jeff, you are right that in some cases people write c++ in a way which
is very similar to c. But in my experience it is normally not so. I
also believe that code which is considered "good" c is not considered
"good" c++. I would say that among most (or at least a very large
portion) of modern c++ code bases, at least one of:
* classes
* exceptions
* STL/Templates

is used, each of which is fundamentally opposed to the c way of doing
things.

-Ido.

Derek Ray

2/20/2008 7:28:00 PM

0

On 2008-02-20, Ido Yehieli <Ido.Yehieli@gmail.com> wrote:
> On Feb 20, 7:10 pm, Jeff Lait <torespondisfut...@hotmail.com> wrote:
>> No, it would be more wrong. Unless you are going to claim that "C++"
>> implies OOP, which it doesn't. I can write C-style code inside C++.
>> My use of // comments hardly makes it C++ (Indeed, for all I know //
>> comments are now part of C...) This, I presume, is why the two are
>> grouped together - it is very hard to look at the project and
>> determine from the outside if it is a "C" project or a "C++" project.
>
> Jeff, you are right that in some cases people write c++ in a way which
> is very similar to c. But in my experience it is normally not so.

Then your experience is extremely narrow.

Stop trying to make the data fit your predetermined results.

--
Derek

Game info and change log: http://spo...
Beta Server: telnet://sporkhack.com
IRC: irc.freenode.net, #sporkhack

zaimoni

2/20/2008 9:20:00 PM

0

On 2008-02-20 19:55:32, Ido Yehieli <Ido.Yehieli@gmail.com> wrote:

> On Feb 20, 7:10 pm, Jeff Lait wrote:
> > No, it would be more wrong. Unless you are going to claim that "C++"
> > implies OOP, which it doesn't. I can write C-style code inside C++.
> > My use of // comments hardly makes it C++ (Indeed, for all I know //
> > comments are now part of C...) This, I presume, is why the two are
> > grouped together - it is very hard to look at the project and
> > determine from the outside if it is a "C" project or a "C++" project.
>
> Jeff, you are right that in some cases people write c++ in a way which
> is very similar to c. But in my experience it is normally not so. I
> also believe that code which is considered "good" c is not considered
> "good" c++. I would say that among most (or at least a very large
> portion) of modern c++ code bases, at least one of:
> * classes
> * exceptions
> * STL/Templates
>
> is used, each of which is fundamentally opposed to the c way of doing
> things.

You could, like, actually *name* something where C++ and C actually opposed each
other, instead of C++ providing syntactic sugar for doing things the C way.

Like the major differences I have to consider for my own projects:
* C vs C++ I/O (and with the way C++ stream implementations bloat executable
size, I strongly recommend C I/O even in C++ programs. I just reimplemented
Boost.Rational for Zaiband specifically to get rid of the <</>> operators which
were worth 780K in executable size on MingW32).
* C setjmp/longjmp does horrible things (basically, nothing between a
setjmp/longjmp is allowed to throw exceptions. That includes your floating
point coprocessor, which is capable of throwing exceptions in any language
whatsoever including C.)
* The Curiously Recurring Template Pattern has no C equivalent.

In contrast:
* Classes are glorified structs whose non-static member functions get a first
parameter of their own type for free. Virtual functions go further and spare
you the hassle (but not the binary overhead) of maintaining arrays of function
pointers that depend on the runtype type.
* Exceptions are a glorified goto with even fewer syntactical restrictions than
the real thing: they don't even need to know their target label.
* STL/templates are mostly an overpowered, klunky weak-typechecked macro
system.

Plain Old Data (POD), including POD-structs, *should* do things the C way even
in C++.

Ido Yehieli

2/20/2008 9:54:00 PM

0

On Feb 20, 10:19 pm, Kenneth 'Bessarion' Boyd <zaim...@zaimoni.com>
wrote:
> * C vs C++ I/O (and with the way C++ stream implementations bloat executable
> size, I strongly recommend C I/O even in C++ programs. I just reimplemented
> Boost.Rational for Zaiband specifically to get rid of the <</>> operators which
> were worth 780K in executable size on MingW32).

Avoidable by not using the stl

> * C setjmp/longjmp does horrible things (basically, nothing between a
> setjmp/longjmp is allowed to throw exceptions. That includes your floating
> point coprocessor, which is capable of throwing exceptions in any language
> whatsoever including C.)

Avoidable by not using exceptions

> * The Curiously Recurring Template Pattern has no C equivalent.

Avoidable by not using templates


Aren't these all (at least partially) consequences of the c++ features
I've mentioned? ;)

-Ido.

zaimoni

2/20/2008 11:11:00 PM

0

On 2008-02-20 22:54:00, Ido Yehieli <Ido.Yehieli@gmail.com> wrote:

> On Feb 20, 10:19 pm, Kenneth 'Bessarion' Boyd
> wrote:
> > * C vs C++ I/O (and with the way C++ stream implementations bloat executable
> > size, I strongly recommend C I/O even in C++ programs. I just reimplemented
> > Boost.Rational for Zaiband specifically to get rid of the operators which
> > were worth 780K in executable size on MingW32).
>
> Avoidable by not using the stl

Yes, but it is counterintuitive how many different fragments of the GCC STL pull
in iostreams superfluously...and how many of those are mandated by the
standard.

The problem is that the following generally are worth the learning curve (most
automation benefit in doing C things)
* STL functional
* STL algorithm
* STL utility (for std::pair), although std::pair is so simple it's worth
re-implementing for intentional POD (to get rid of the constructor, make the
reimplemented version a POD-struct).

> > * C setjmp/longjmp does horrible things (basically, nothing between a
> > setjmp/longjmp is allowed to throw exceptions. That includes your floating
> > point coprocessor, which is capable of throwing exceptions in any language
> > whatsoever including C.)

I forgot to mention non-trivial destructors are also prohibited. As well as
malloc/freed memory (the longjmp triggers a memory leak).

> Avoidable by not using exceptions

Too bad the floating point coprocessor won't cooperate.

> > * The Curiously Recurring Template Pattern has no C equivalent.
>
> Avoidable by not using templates

But not worth avoiding -- it's actually a godsend.

> Aren't these all (at least partially) consequences of the c++ features
> I've mentioned? ;)

That doesn't exclude the normal use of the features, which is to compress C code
and/or make it humanly maintainable. E.g.:
* RTTI (required to dynamic-cast classes, thus is included) usually prevents
hand-rolling a runtime type system.
* Template functions are type-checked macros that automatically evaluate each
argument only once. Conditionally-defined template functions are even better
(they're what my custom-written C++ memory management library uses to
automatically decide whether to use malloc/free or new/delete). Template
classes are slightly less glamorous, they just give you indefinitely many
classes for the code of one.
* Virtual member functions spare the programmer the hassle the hassle of
explicitly maintaining an array of function pointers indexed by a runtime type
system. (The Curiously Recurring Template Pattern is, in turn, an esoteric way
of de-virtualizing functions...)
* Exceptions allow using goto-based error handling without knowing the full
source code when writing the goto. [Whether making spaghetti code easier to
write is a good thing, is another question entirely....]

Ido Yehieli

2/20/2008 11:39:00 PM

0

On Feb 21, 12:11 am, Kenneth 'Bessarion' Boyd <zaim...@zaimoni.com>
wrote:
> That doesn't exclude the normal use of the features, which is to compress C code
> and/or make it humanly maintainable.

That's all nice and well, and probably the reason why they were added
to c++ - but that doesn't change the fact that all of these are
diametrically opposed to the c spirit of avoiding "magic". Anyway,
this conversation is getting rather off topic and I am not sure what
it is we are arguing about.

-Ido.

Michal Bielinski

2/21/2008 3:44:00 AM

0

On Thu, 21 Feb 2008 00:38:41 +0100, Ido Yehieli <Ido.Yehieli@gmail.com>
wrote:
[snip]
> Anyway, this conversation is getting rather off topic and I am not sure
> what
> it is we are arguing about.

Well, people look more interested in issues like "why the guy over
there did it like that" more than the actual data. I threw Pascal and
Object Pascal into one bucket too but nobody complained about it. The
same applies for QBASIC and VB.NET.

The purpose of my work was to make survey about languages and check
for patterns. Here are some of my observations.

Most roguelikes written in less popular languages are still actively
maintained. "Exotic" languages have more projects discontinued than
developed ones. I would never guess that Python falls into last group.

There are 13 Pascal projects overall, four of them belonging to Kornel
Kisielewicz, another five to Joseph Hewitt. Together they "control"
almost 70% of games written in that language.

Santiago Zapata having four Java projects is deveoper with most non
nDRL projects taken off ground. However, Kornel announced that
AliensRL will be continued, so they may tie in future.

Majority (3/5) of released Lisp work is authored by Timofei Shatrov.
Rest is Micromoog's Zombies! 1DRL and LAngband.

There is something written in Caml. It is ARID, Another Roguelike
in Development. There have been roguelikes in JavaScript (Seven Days
Quest) and Flash (The Tombs).

BASICs scored 4,4,4. Four active, four 7DRLs, four unmantained.

Projects designed to be <programming language> roguelike seem to be
all halted. LAngband (CLisp), EmotionRL (previously PerlRL) and Pyro
(PYthon ROguelike).

Similarly with roguelike engines. Ng Java Roguelike Engine and H-World
are no longer deveoped. Carceri is right now vapourware. You don't
need engine unless you want to make game with it. ToME is alive and
kicking.

Of 177 projects 21 either have no website or provide no way to guess
programming language used. That's alomst 12%.

Refer to Actively Developing Roguelikes list for links.

As a side note I could run Marin's criteria against source files on my
HDD but I see no point in doing it. Thus I won't do it unless someone
convinces me.

--
Michal Bielinski

Gerry Quinn

2/21/2008 12:41:00 PM

0

In article <op.t6uvbrua3r3gf7@localhost.localdomain>,
Dungeon_Keeper@tlen.pl says...

> Most roguelikes written in less popular languages are still actively
> maintained. "Exotic" languages have more projects discontinued than
> developed ones. I would never guess that Python falls into last group.

I'm not sure what you mean by "discontinued"? Are these roguelikes that
are actually finished?

- Gerry Quinn