Hi,
Thank you for considering my application.
Warm Regards

On Wed, Oct 14, 2020 at 11:28 AM Nicolas <[email protected]> wrote:

> Hi Pablo,
>
> Yes, we are still using it for our board gaming platform
> www.happymeeple.com
> It is now a 10 year project so I am not sure how easy it really is to
> switch. I am a little bit worried. I suppose the installation of
> websocket/nodejs would not be the hardest part. But adapting the code on
> the server and client side would. We have 9000 lines of code on the server
> alone. Most of it is quite simple, and would not require much work but some
> parts would certainly be a bit problematic. I suppose the client side could
> be more difficult as interactions with APE are scattered everywhere and it
> is impossible to test every scenario.
> We rely on APE for:
> - playing moves obviously
> - chat (quite a few chats zones (one-on-one, by country and general chat)
> - playing some AI on the server side (as well as client side), the same
> (game and AI) code is used on both sides.
> - Mysql calls
>
> How easy it would be to rewrite the platform for websocket/nodejs is not
> clear to me right now.
>
> And APE is not that bad. Overall, it crashes maybe 5-6 times per year. It
> is not that unstable. It is much less since I recompiled it to increase the
> memory it uses (which is fixed). Before that, I reached the memory limit
> too quickly and boom.
>
> I'll write an email to you with extra information.
>
> Thanks for offering your help!
>
> Nicolas.
>
>
>
> On Wednesday, 14 October 2020 at 06:40:29 UTC+2 Pablo wrote:
>
>> Hello Nicolas,
>>
>> I still can't believe you have not given up on APE yet. You are probably
>> the only person keeping APE alive in the wild. When I first joined this
>> project the server was very unstable so it is very hard to believe someone
>> is still relying on this server unless they are running a really old
>> version which is somewhat stable or are running a custom build like
>> yourself.
>>
>> I remember when I first picked up APE, at first glance and for proof of
>> concepts the technology looked great until you tried to do something more
>> serious. Then all of its issues and shortcomings become clearly apparent.
>> Having to constantly restart the server to keep a somewhat stable service
>> is far from ideal.
>>
>> What site or business are you running, was it a gaming or bidding site?
>> Anyhow, I've been looking to do some additional coding in my spare time
>> since I don't have a good project to work of my own. Let me know if you
>> need help coming up with a strategy to migrate your service to something
>> like Pusher, Firebase or Socket.io
>>
>> On Tue, Oct 13, 2020 at 2:25 PM Alok Vad <[email protected]> wrote:
>>
>>> Hi,
>>> Thank you for your help.
>>>
>>> On Tue, Oct 13, 2020 at 12:15 PM Nicolas <[email protected]> wrote:
>>>
>>>> I know this is a very old thread and not many of you are still around.
>>>> But let me try my luck once more.
>>>>
>>>> I can confirm that my APE server sometimes crashes a few hours after
>>>> being restarted.
>>>>
>>>> Oct 13 01:21:03 server56405 kernel: [8981559.624862] traps:
>>>> aped_2[19153] general protection ip:418dce sp:7ffeff989060 error:0 in
>>>> aped_2[400000+2a000]
>>>>
>>>> I had recompiled the code a few years ago (to increase memory) so I
>>>> guess I have got the last corrections.
>>>> The error is 0, pointing to a division by 0. Which I find a bit strange
>>>> here. I don't see any division in the code below.
>>>> The ip given above leads to ape_disconnect() function from servers.c.
>>>> And more precisely to the line:
>>>>              if (co->fd == sub->client->fd) {...
>>>> I suspect the error does not come from this if statement, but rather
>>>> the inside of the if.
>>>> It could be the call to http_headers_free()
>>>> Or most likely the line: deluser(sub->user, g_ape);
>>>>
>>>> I don't expect a full resolution of the case and will not recompile a
>>>> modified version of the code. But here are a few questions I have. If you
>>>> have any clue for any of them, let me know!
>>>> 1) From the general protection error line, is there any way to be more
>>>> precise as to where the general protection  exactly kicks in? Can we know
>>>> if it is on the if statement or below? Could it be in an inner function?
>>>> 2) My best guess is that the problem is related to deleting users or
>>>> sub-users. And it looks to me that users that were connected before the
>>>> program was restarted find a way to interact with the new instance and make
>>>> it crash (like a non-existent user asks to logout and boom!).
>>>> Do you have any clue how this can be possible?
>>>> If I knew that, I could maybe modify my client so that it does not send
>>>> a request that makes a new instance crash.
>>>>
>>>> Some of the C code below.
>>>>
>>>> Many thanks!
>>>>
>>>>
>>>> static void ape_disconnect(ape_socket *co, acetables *g_ape){
>>>> subuser *sub = (subuser *)(co->attach);
>>>> if (sub != NULL) {
>>>> if (sub->wait_for_free == 1) {
>>>> free(sub);
>>>> co->attach = NULL;
>>>> return;
>>>> }
>>>> // THIS IS WHERE THE GENERAL PROTECTION KICKS IN.
>>>> // THIS IS WHERE THE GENERAL PROTECTION KICKS IN.
>>>> // THIS IS WHERE THE GENERAL PROTECTION KICKS IN.
>>>> // THIS IS WHERE THE GENERAL PROTECTION KICKS IN.
>>>> // THIS IS WHERE THE GENERAL PROTECTION KICKS IN.  ------------>>>
>>>> if (co->fd == sub->client->fd) {
>>>>  
>>>> <<<<<<<<<<-------------------------------------------------------------------------
>>>> sub->headers.sent = 0;
>>>> sub->state = ADIED;
>>>> http_headers_free(sub->headers.content);
>>>> sub->headers.content = NULL;
>>>> if (sub->user != NULL) {
>>>> if (sub->user->istmp) {
>>>> deluser(sub->user, g_ape);
>>>> co->attach = NULL;
>>>> }
>>>> }
>>>> }
>>>> }
>>>> }
>>>>
>>>> void http_headers_free(http_headers_response *headers){
>>>> struct _http_headers_fields *fields;
>>>> if (headers == NULL) {return;}
>>>> fields = headers->fields;
>>>> while(fields != NULL) {
>>>> struct _http_headers_fields *tmpfields = fields->next;
>>>> free(fields->value.val);
>>>> free(fields);
>>>> fields = tmpfields;
>>>> }
>>>> free(headers);
>>>> }
>>>>
>>>> void deluser(USERS *user, acetables *g_ape){
>>>> if (user == NULL) {
>>>> return;
>>>> }
>>>> left_all(user, g_ape);
>>>> FIRE_EVENT_NULL(deluser, user, user->istmp, g_ape);
>>>> /* kill all users connections */
>>>> clear_subusers(user, g_ape);
>>>> hashtbl_erase(g_ape->hSessid, user->sessid);
>>>> g_ape->nConnected--;
>>>> if (user->prev == NULL) {
>>>> g_ape->uHead = user->next;
>>>> } else {
>>>> user->prev->next = user->next;
>>>> }
>>>> if (user->next != NULL) {
>>>> user->next->prev = user->prev;
>>>> }
>>>> clear_sessions(user);
>>>> clear_properties(&user->properties);
>>>> destroy_pipe(user->pipe, g_ape);
>>>> /* TODO Add Event */
>>>> free(user);
>>>> }
>>>>
>>>>
>>>>
>>>> void left_all(USERS *user, acetables *g_ape){
>>>> CHANLIST *list, *tList;
>>>> if (user == NULL) {
>>>> return;
>>>> }
>>>> list = user->chan_foot;
>>>> while (list != NULL) {
>>>> tList = list->next;
>>>> left(user, list->chaninfo, g_ape);
>>>> list = tList;
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>> void clear_subusers(USERS *user, acetables *g_ape){
>>>> while (user->subuser != NULL) {
>>>> delsubuser(&(user->subuser), g_ape);
>>>> }
>>>> }
>>>>
>>>>
>>>>>
>>>>> --
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "APE Project" group.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/ape-project?hl=en
>>>> ---
>>>> APE Project (Ajax Push Engine)
>>>> Official website : http://www.ape-project.org/
>>>> Git Hub : http://github.com/APE-Project/
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "APE Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ape-project/051fe946-6512-4486-92b7-9ecdcbe1cba9n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ape-project/051fe946-6512-4486-92b7-9ecdcbe1cba9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "APE Project" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/ape-project?hl=en
>>> ---
>>> APE Project (Ajax Push Engine)
>>> Official website : http://www.ape-project.org/
>>> Git Hub : http://github.com/APE-Project/
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "APE Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ape-project/CAOx4vSSg9R%2BNQa1i8uz6BOZ3mw%3DYh_kQnWMCbW5bDjagt%2B_PJA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ape-project/CAOx4vSSg9R%2BNQa1i8uz6BOZ3mw%3DYh_kQnWMCbW5bDjagt%2B_PJA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/
>
> ---
> You received this message because you are subscribed to the Google Groups
> "APE Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ape-project/36c4399b-4fca-40d3-a85c-44524f38238fn%40googlegroups.com
> <https://groups.google.com/d/msgid/ape-project/36c4399b-4fca-40d3-a85c-44524f38238fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--- 
You received this message because you are subscribed to the Google Groups "APE 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ape-project/CAOx4vSQrfKrdS8wdnkHMmxzWQf9jyBrnY%2BHfEe4DOrSBUEVbCQ%40mail.gmail.com.

Reply via email to