[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1616 times
Been thanked: 1729 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sat May 30, 2015 5:19 am

I used OYS for CFN. For the first 45 minutes, with three of us online, everything went fine. Then it started using up memory. That caused some major lag. I got clearance to land, and about the time I touched down Speky asked if I needed to change runways. Long story short, What they were seeing of me was delayed by about 3 minutes, so they didn't see me land until 3 minutes after I was on the ground! It was great fun until OYS finally kicked us all out.

There's probably a memory leak somewhere.

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sat May 30, 2015 2:08 pm

I was working with VNAF on the project earlier this month actually and noticed that Asynchronous Sending is worse then Synchronous sending - the more people you have online, the worse Asynch gets.

So I reverted the code to Synchronous sending and it works better. There's much to be done though.

Thanks for your feedback! I hope you guys all had fun with the Civ night. Thanks for supporting the project!

I may restructure the threading mechanism to have "time to live" attached to the threads lists... Is the thread goes over say, 30 seconds, the thread will be killed immediately (unless it's meant to do that.)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Wed Jun 24, 2015 1:54 pm

Exciting history was made today - I've mapped the "ordinance spawned" packet - the one that tells YS a missile, bomb, agm, or even flare is created.

I can now launch bombs from the gun cannon for example (in fact I've already done so, it was HILARIOUS!).

I also want to make flare "fireworks" - spawns one flare, once it reaches it's peak hight, it creates a star of other flares from the "fizzle out" point.

I surprisingly have a decent amount of control of the ordinance! Neat!

And for my next trick, I will aim to fix the networking stability fundamentals that is causing OYS to force clients to DC. I'll need peoples help on this one though! so I'll first start proper logging and analysis of all DC's made and WHY they were made, then I'll run a public server to check all this :)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1616 times
Been thanked: 1729 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Wed Jun 24, 2015 5:38 pm

The two biggest problems I've seen are the disconnection problems where it will kick most or all of the clients, and the memory problem. I think the memory usage might be related to old and new versions of YSF being connected at the same time, but I really have no idea. I left OYS running overnight with Guam to SoCal and the memory stayed low and nobody logged in. Whatever is using the memory has to involve clients being connected, I guess.

User avatar
Dragon029
Veteran
Veteran
Posts: 601
Joined: Sun Feb 06, 2011 6:09 am
Favorite Aircraft: F-35A
Location: Australia
Has thanked: 42 times
Been thanked: 85 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon029 » Wed Jun 24, 2015 10:47 pm

OfficerFlake wrote:Exciting history was made today - I've mapped the "ordinance spawned" packet - the one that tells YS a missile, bomb, agm, or even flare is created.

I can now launch bombs from the gun cannon for example (in fact I've already done so, it was HILARIOUS!).
We need vidyas ASAP

Is it possible for you to modify the airspeed or other properties of ordinance?
Royal Australian Air Force
Per Ardua Ad Astra
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Jun 25, 2015 12:15 am

Yep. I can change spawn speed, max velocity. Position and orientation, ordinance type, durationse sender Id...
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Dragon029
Veteran
Veteran
Posts: 601
Joined: Sun Feb 06, 2011 6:09 am
Favorite Aircraft: F-35A
Location: Australia
Has thanked: 42 times
Been thanked: 85 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon029 » Thu Jun 25, 2015 9:19 am

I know you're working on a fair bit (and this would probably come under your existing WIP), but any chance of having a trainer / plugin that reads extra / custom weapon data from an aircraft's .dat (stored within some commented-out section)? :mrgreen:

But yeah, this obviously opens up a ton of opportunity for things like realistic missiles, guided bombs (if you can get rid of the smoke effect of the AGM), laser weapons, etc.
Royal Australian Air Force
Per Ardua Ad Astra
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Jun 26, 2015 6:38 am

Dragon029 wrote:I know you're working on a fair bit (and this would probably come under your existing WIP), but any chance of having a trainer / plugin that reads extra / custom weapon data from an aircraft's .dat (stored within some commented-out section)? :mrgreen:
This is part of the plan! Once I stablise OpenYS and complete the mapping of the YS Protocal, I'll extend server functions! - so aircraft can be modded to have special permissions, for example. Full details when I finally get around to that.

By the way, I have mapped like, 80% of the YSFlight online protocol now. Soon, I'll do the damage packets, and ground object data packet (like flight data packet, but for a ground object). Then the other stuff is really just not even needed. (score reporting, for example)

OYS has been without ground combat for too long (which is what makes YSF fun when alone/with a team)
Last edited by Flake on Sun Sep 06, 2015 3:49 pm, edited 1 time in total.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sun Jul 19, 2015 2:10 pm

Hi all - an update on this.

Their are two major issues with OYS at current stopping further advancement.

1 - The socket structure causing the program to lag behind and use massive ammounts of memory.
2 - The threading structure causing the program to use too many threads and lag to a halt.

These are solvable without destorying the project and restarting it thanks to my recent upgrades to the source code - I only have to re-write the sending/receiving and processing allocators.

However, the flaws are a design flaw. I DO need to use Async sending but not in the method I tried - I can't create my own managed threads and send that way, I need the operating system to do it for me by using callbacks - something I've never used before, so I will have to learn that.

The thread allocation should be tied with that solution.

I'll be doing some research on the asynch sockets with callbacks to make this work - I am told by stack over flow that these socket structures work fine with MMO's with little lag - up to 5000 players! (YSF will never have that many!)

Leave it with me! I haven't forgotton about OYS, but yes, now you know why nothing has happened for a while.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1616 times
Been thanked: 1729 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sun Jul 19, 2015 2:13 pm

OfficerFlake wrote:[post]88579[/post] I haven't forgotton about OYS, but yes, now you know why nothing has happened for a while.
Thanks for the update!

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Tue Jul 21, 2015 11:37 am

Finally implemented the advanced sun-fading I wanted to do, as well as a standardised timing system for the server.

Merging threads into the core thread now to take the load off system resources - less threads, less locks, less lag!

Please enjoy this delicious beverage!

[youtube]https://www.youtube.com/watch?v=sZEtCxBv-Ao[/youtube]
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 205 times

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Barr » Wed Jul 22, 2015 4:40 pm

Aww yeah

Now the time it takes to change from sunset,night, sunrise, day etc adjustable or is it fixed for now?
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Wed Jul 22, 2015 10:59 pm

The day length can be adjusted - the amount of time it takes for sunrise etc. to happen during the day is not - Sunrise/sunset takes 2 in game hours.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Jul 23, 2015 2:34 pm

Okay I've re-done how the sockets work - now there is only one thread for all the incoming data to be processed on - this should stop lockups.

Tested okay on local host but I'm wanting people to check over the network - I have seen socket errors in the console so perhaps I'll need to work that out more gracefully later!
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sun Jul 26, 2015 6:38 am

Now Updated to Version 20150726(1630)

Changes:
+MASSIVE Update to many components of OYS
+Server time uses a tick based system - the environment can now be any time of a 24hr day.
+Environment changes color based on time of day. (2015 YSF+)
+Socket structure massively revamped, hopefully less lag. appears very stable so far. maybe a few more issues to solve.
+Bombs from gun novelty.
-Removed Nukes

Notes:
~Very major updates to code - minor bugs but server stability should be increased. Threads reduced dramatically.
~Pretty please test this version - let me know how your server experience goes!

Download: https://www.mediafire.com/?22tyn9d5f7p8tt5


Last edited by Flake on Tue Sep 01, 2015 1:09 pm, edited 1 time in total.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Kujo
Veteran
Veteran
Posts: 1005
Joined: Fri Feb 08, 2013 2:28 am
Favorite Aircraft: Lockheed Martin F-16 Fighting Falcon
Location: Las Vegas, NV
OS: Windows 8.1 - 64 Bit
Has thanked: 779 times
Been thanked: 723 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Kujo » Sun Jul 26, 2015 9:35 am

OfficerFlake wrote: MASSIVE Update to many components of OYS

Socket structure massively revamped, hopefully less lag. appears very stable so far.

minor bugs but server stability should be increased. Threads reduced dramatically.
One big yes to you, my friend. :D

Image
Image

User avatar
C P
Contributor
Contributor
Posts: 102
Joined: Fri May 24, 2013 12:17 pm
Favorite Aircraft: F-18E SuperHornet
Location: Syracuse, NY
OS: WIN10 8CORE/4GHZ/16G
Has thanked: 22 times
Been thanked: 25 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by C P » Sun Jul 26, 2015 11:56 am

OfficerFlake wrote:[post]88871[/post] let me know how your server experience goes!
Won't start server for me here. Says need to enable LoadFromRemoteSourcesSwitch in .NET?
Old version starts fine 201550227(1339).

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1616 times
Been thanked: 1729 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sun Jul 26, 2015 1:59 pm

I have it running on my end. It caused a buffer overrun the first time I started it up, but I think that was a PC problem. OYS seems to be running fine on a 48 minute day/night cycle. I was able to connect from the 2013 version of YSF, without the color changes, of course. The 2015 version of YSF has the color changes, and they look amazing! Nice work. I will monitor memory use through the day.

User avatar
Bombcat
Staff
Staff
Posts: 935
Joined: Thu Feb 03, 2011 3:08 am
Favorite Aircraft: F-14D Tomcat
Location: Virginia
OS: Windows 7
Has thanked: 138 times
Been thanked: 139 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Bombcat » Sun Jul 26, 2015 4:15 pm

Flake, I received the following error when trying to run the latest update of OYS on a server running Windows Server 2012 R2. I was using the latest official 2015 release of YSFlight.

Image
[CAG171]Bombcat, Commander, Air Wing 171
Team Awesome # 23
YSFHQ administrator.

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sun Jul 26, 2015 11:54 pm

Hi Bombat! Looks like it's struggling to find the dll libraries. I'll try simulating your setup to see what I find.

The resource switch thing... U wot m8? Try reinstalling .Net

Thanks for the feedback pat! I hope it serves you well!
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests