Gil

Switzerland

trustleap.ch

Trying, since 1979, to learn something every day about programming.

Currently working on http://global-wan.ch/ (G-WAN-based Cloud services)

3h
comment Gwan API wrappers and mono_add_internal_call
The request context is (partially) cleared after the request has been processed and then totally cleared after a connection close (not while a servlet is executing). Check that you are accessing the 'right' information context by checking the value of the client socket from your servlet.
3h
comment How to reference Mono C# assemblies with GWAN C# servlets
We don't modify anything either in the system or in the mono runtime settings.
2d
comment Gwan API wrappers and mono_add_internal_call
Loading your persistent code from an ephemeral module. Thanks 'Pete' for the quick reply.
2d
answered Gwan API wrappers and mono_add_internal_call
2d
revised How to reference Mono C# assemblies with GWAN C# servlets
corrected (too long) code lines and URL
2d
comment How to reference Mono C# assemblies with GWAN C# servlets
Using one of the G-WAN scripts at startup, you can load the library in the G-WAN memory-space, and then register its functions in the G-WAN API C# class exported in the /gwan/.../libraries/cs directory. Then your servlets will be able to use any extended C code you wrote, whether this is G-WAN C API function C# wrappers or your own C functions.
Oct
16
revised Gwan C#, how to get HTTP headers?
replied to question "EDIT"
Oct
14
comment GWAN servlet life cycle
"your servlet-wide variables [are] freed when [a] request ended" it only happens when the script has been edited and therefore automatically reloaded by G-WAN. The rest of the time, servlet variables are static (limited to the scope of the servlet), hence the need for "global" (sharable) pointers.
Oct
14
revised GWAN servlet life cycle
typos, grammar, formatting, missing tags...
Oct
13
comment Gwan C#, how to get HTTP headers?
Contact the G-WAN team for more options and a personalized answer.
Oct
13
comment Gwan C#, how to get HTTP headers?
G-WAN being a Web application server (with a rich API), people might not have felt the need to create a framework beyond what is already available. But there's certainly room for DB-agnostic wrappers, template libraries, etc. for people willing to use 'ready-to-wear' solutions, especially if you consider the flexibility of being able to use C/C++, C#/Java/Scala/PH7 native (and therefore superfast) scripts.
Oct
13
answered Gwan C#, how to get HTTP headers?
Oct
12
comment Keep MySQL connection in static variable in function (avoid global variables) in C
@Axan: a static variable will last as long as the code of the module remains in memory - that behavior is not unique for G-WAN. For complex cases, wake_up() lets you create a state machine which is immensely easier to deal with than spaghetti code... and makes it possible to really scale.
Oct
12
comment Keep MySQL connection in static variable in function (avoid global variables) in C
@solisoft: there are already 3 publicly available stream.c examples (4 for registered users) and a few for DBs too (in-memory SQLite is the one to use in most cases). Every user has different skills, ability to learn, and goals so there's no end to how many "how-to" examples one would have to write.
Oct
11
comment Keep MySQL connection in static variable in function (avoid global variables) in C
You are right. There's a lot that could be done to help users with more examples, and even open-source G-WAN applications. But doing this requires time and people, and these resources are currently allocated to our own G-WAN-based developments, which, by the way, are the only reason why G-WAN was developed in the first place.
Oct
10
comment Keep MySQL connection in static variable in function (avoid global variables) in C
Thanks Tommy for the quick answer. Note: the static approach won't work with a multi-threaded application like G-WAN, that is, unless you are using an atomic operation to set and test the value.
Oct
10
answered Keep MySQL connection in static variable in function (avoid global variables) in C
Oct
4
comment It is possible to get G-WAN working on Google Cloud Compute or Amazon EC2?
It all depends on your means and goals, but to help you can develop G-WAN-based applications and/or add-ons, or make us useful features suggestions, or write blog articles to explain your experience with G-WAN, etc.
Oct
1
answered It is possible to get G-WAN working on Google Cloud Compute or Amazon EC2?
Sep
30
awarded Explainer
1 2 3 4 5