Re:Ask HN: What tech stack is your startup built on?
by briHass on Friday February 15, 2013 @03:23PM
(#5228362)
I am curious as to why you wrote your own session store. Is this to allow true load-balancing without the affinity requirement of a machine-based session?
Re:Ask HN: What tech stack is your startup built on?
by graycat on Friday February 15, 2013 @09:18PM
(#5230037)
Handling session state with my own code let me
improve the UI/UX.
Yes, with the session state store as just a simple program, actually just a console application, communicating with just simple TCP/IP sockets, there is a wide range of options for having many Web servers sharing several session state stores. So, get a 'scalable' solution with some options for more in reliability. And don't need 'session affinity' from a front end Cisco box.
The collection class I used was
SortedDictionary(Of TKey, TValue) Class
as in
I type the code into my favorite text editor, KEdit, and use a lot of KEdit macros I wrote. I don't use an IDE.
The session state store is just a console application communicating with TCP/IP sockets and using two collection classes, one for the key/value pairs of the session ID and session data and the other for a fast way to apply time out. Timings indicate that on a dedicated, single core computer with a 3.0 GHz clock the session state store should be able to serve over 1000 Web pages a second, that is, (A) read the session state, (B) use and update the session state, and (C) write the session state. The code for the Web pages that use the session state store send/receive just byte arrays; a GUID is used for the key, and the values are from de/serialization of an instance of a class for session state.
Visual Basic has been nice, both for console applications and on IIS for the the Web pages. The compiler is astoundingly fast; the resulting EXEs are astoundingly small; the EXEs load quickly; the compiler error messages are from good up to quite nice; and I may have encountered no bugs at all.