Ørb# (Orb Sharp) Development Log

YSFlight addon development, questions, tutorials, & more!
User avatar
Flake
Core Staff
Core Staff
Posts: 4350
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 835 times
Been thanked: 1238 times
Contact:

Ørb# (Orb Sharp) Development Log

Post by Flake » Fri Jan 25, 2013 5:50 am

Orb is getting much much closer to being ported to C#.

Today, I have finally completed the Connection side of the program, the very low level part of the program that handles how data is sent to and from the server and clients.

With the development structure and framework I have in place now, Orb will very quickly be developed as I copy/redesign some parts of code. The good thing about C# is it is a lot more versatile in its data types, so I can readily load TimeSpans rather then compute them the hard way, shit like that.

I think orb will be much much faster once running on C#. Everything is a lot cleaner too, I can actually close the program cleanly without having to catch and suppress errors. :)

The development environment is a lot nicer then python.
Image
I keep the project in my drop box, this way, if something catastrophic was to happen to my computer (like it has in the past) then I can restore it.
Image
As you can see, It has to correct a lot of broken flight data packets. TCP is good for making sure all the data arrives in the right order, however, it doesn't have to get there in one go. I have to make sure for each packet.
Image
As you can see, the Server can clearly tell when a client disconnects due to the ability to use Socket.Connected variable (something python doesn't have!) This saves a lot of hard work.
Image
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
iqmal_97
Senior Veteran
Senior Veteran
Posts: 1765
Joined: Fri Mar 11, 2011 8:47 am
Favorite Aircraft: Sukhoi Su-30MKM
Location: Somewhere in Asia
OS: Windows 10
Has thanked: 767 times
Been thanked: 191 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by iqmal_97 » Fri Jan 25, 2013 7:02 am

Great to hear. Less complications encountered are always welcome in my rule book.
Image
[N007HA]Nynaiqmal_97 <= My usual online callsign
Mein Imgur gallery. Feel free to use any of my screenshots (Crediting me is optional, but greatly appreciated)

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Sun Jan 27, 2013 2:35 am

CONSOLE!

Image
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
wingzfan99
Core Staff
Core Staff
Posts: 687
Joined: Thu Feb 10, 2011 8:03 pm
Favorite Aircraft: Boeing 757-200
Location: Chicago, Illinois
Has thanked: 49 times
Been thanked: 48 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by wingzfan99 » Mon Jan 28, 2013 3:44 pm

Flake, that's awesome.
Wingzfan "The Budgetman" 99
Treasurer, YSFHQ

Founder and Admin of the site once known as YSUpload

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Thu Feb 07, 2013 5:47 am

Code: Select all

--- Log Created 2013/02/07 16:44:04 ---
2013/02/07 16:44:04: Created User: Null
2013/02/07 16:44:04: Loading All Users...
2013/02/07 16:44:04: Created User: BAWB
2013/02/07 16:44:04: Loading Values for User "BAWB"...
2013/02/07 16:44:04: Loaded Values for User "BAWB".
2013/02/07 16:44:04: Created User: Bob
2013/02/07 16:44:04: Loading Values for User "Bob"...
2013/02/07 16:44:04: Loaded Values for User "Bob".
2013/02/07 16:44:04: Created User: BOBBAFETT
2013/02/07 16:44:04: Loading Values for User "BOBBAFETT"...
2013/02/07 16:44:04: Loaded Values for User "BOBBAFETT".
2013/02/07 16:44:04: Created User: Herp
2013/02/07 16:44:04: Loading Values for User "Herp"...
2013/02/07 16:44:04: Loaded Values for User "Herp".
2013/02/07 16:44:04: Created User: Jim
2013/02/07 16:44:04: Loading Values for User "Jim"...
2013/02/07 16:44:04: Loaded Values for User "Jim".
2013/02/07 16:44:04: All Users Loaded.
2013/02/07 16:44:04: MASTERCLOSE: Test Complete
Finally have got UserDB working in full. Users can be: Created, Deleted, Loaded, Saved. ALL Users can be Deleted, Loaded, Saved all at once. Users specifically can also load and save specific settings on the go UserDB can find users by name and keeps a record of all users. There is also a psuedo "Nobody" user to avoid issues with later. (You can't reference a Null object, but a "Nobody" placeholder user CAN be refferenced. This will make coding faster AND cleaner! :ugeek: )

Next step will be Groups, which should be REASONABLY similar.
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
wingzfan99
Core Staff
Core Staff
Posts: 687
Joined: Thu Feb 10, 2011 8:03 pm
Favorite Aircraft: Boeing 757-200
Location: Chicago, Illinois
Has thanked: 49 times
Been thanked: 48 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by wingzfan99 » Thu Feb 07, 2013 6:15 pm

Flake,

Is the UserDB local, or is it something that could be hosted somewhere? (Sorry if you've already answered this somewhere else in the topic)
Wingzfan "The Budgetman" 99
Treasurer, YSFHQ

Founder and Admin of the site once known as YSUpload

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Thu Feb 07, 2013 8:20 pm

I'm not 100% sure what you mean... I think you are referring to where the database is kept? It's in the same folder as the orb EXE. under ./Database/Users/...

The code itself is in my personal dropbox.

Are you wanting to read the database and action it? It's very much possible. I was planning on using this for things like flight logging and signature services.
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
wingzfan99
Core Staff
Core Staff
Posts: 687
Joined: Thu Feb 10, 2011 8:03 pm
Favorite Aircraft: Boeing 757-200
Location: Chicago, Illinois
Has thanked: 49 times
Been thanked: 48 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by wingzfan99 » Thu Feb 07, 2013 9:10 pm

OfficerFlake wrote:I'm not 100% sure what you mean... I think you are referring to where the database is kept? It's in the same folder as the orb EXE. under ./Database/Users/...

...

Are you wanting to read the database and action it? It's very much possible. I was planning on using this for things like flight logging and signature services.
That's exactly what I meant. If the database is located on a server somewhere, or is at least somehow accessible to a website or something, then it could be used to power some online services and maybe be integrated with the forum somehow.
Wingzfan "The Budgetman" 99
Treasurer, YSFHQ

Founder and Admin of the site once known as YSUpload

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Thu Feb 07, 2013 9:22 pm

Yeah I'm thinking of having it work like this:

1) User conencts to server.
2) User signs in with YSFHQ Username and Password.
3) User account is synced with HQ account.
4) Flight time, other data is added to the HQ record.

This way, you can fly as any name you want on any server, and have it link to your HQ.

Now what would be better yet is a reverse bot, that, once synced with HQ, reverse syncs with orb servers to rename a user if they change names, etc...

It'll be something to think about, but it shouldn't be hard to implement.
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: 4350
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 835 times
Been thanked: 1238 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Sat Feb 09, 2013 3:34 am

Code: Select all

--- Log Created 2013/02/09 14:32:37 ---
2013/02/09 14:32:37: Created User: Null
2013/02/09 14:32:37: Created Group: Null
2013/02/09 14:32:37: Loading All Users...
2013/02/09 14:32:37: Created User: BAWB
2013/02/09 14:32:37: Loading Values for User "BAWB"...
2013/02/09 14:32:37: Loaded Values for User "BAWB".
2013/02/09 14:32:37: Created User: Bob
2013/02/09 14:32:37: Loading Values for User "Bob"...
2013/02/09 14:32:37: Loaded Values for User "Bob".
2013/02/09 14:32:37: Created User: BOBBAFETT
2013/02/09 14:32:37: Loading Values for User "BOBBAFETT"...
2013/02/09 14:32:37: Loaded Values for User "BOBBAFETT".
2013/02/09 14:32:37: Created User: Herp
2013/02/09 14:32:37: Loading Values for User "Herp"...
2013/02/09 14:32:37: Loaded Values for User "Herp".
2013/02/09 14:32:37: Created User: Jim
2013/02/09 14:32:37: Loading Values for User "Jim"...
2013/02/09 14:32:37: Loaded Values for User "Jim".
2013/02/09 14:32:37: All Users Loaded.
2013/02/09 14:32:37: Loading All Groups...
2013/02/09 14:32:37: Created Group: CVW-171
2013/02/09 14:32:37: Loading Values for Group "CVW-171"...
2013/02/09 14:32:37: Loaded Values for User "CVW-171".
2013/02/09 14:32:37: Created Group: HAVA
2013/02/09 14:32:37: Loading Values for Group "HAVA"...
2013/02/09 14:32:37: Loaded Values for User "HAVA".
2013/02/09 14:32:37: Created Group: ORB
2013/02/09 14:32:37: Loading Values for Group "ORB"...
2013/02/09 14:32:37: Loaded Values for User "ORB".
2013/02/09 14:32:37: Created Group: YSRAAF
2013/02/09 14:32:37: Loading Values for Group "YSRAAF"...
2013/02/09 14:32:37: Loaded Values for User "YSRAAF".
2013/02/09 14:32:37: All Groups Loaded.
2013/02/09 14:32:37: MASTERCLOSE: Test Complete
GroupDB complete. Was a simple copy/paste/replace from UserDB and I needed to rename values. :D

Next will be "Ranks" and the core server group. Then permissions.
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: 4350
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 835 times
Been thanked: 1238 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Tue Feb 12, 2013 3:31 am

Gosh darn that was not fun...

I've just coded Ranks into Orb. Ranks is a special kind of object because it can be referenced from both the UserDB side of things and the GroupDB side of things, so I really needed to rack my head around ways to avoid collisions and null issues.

So it's really messy, but it works. User has a "GroupReference" object, rather then groups and ranks in their own right. Group reference does the work of linking groups and ranks together. With this, a user can have MANY group references, but only ONE group and rank per group reference.

I've also got the ability to remove groups on the go. This has to itereate over every user in the database, and look for references to the rank, change that to no rank, and THEN remove the rank. This will prevent crashes later, when a usergroupreference tries to reference a rank that doesn't exist anymore.

TL:DR; This was hard, but I'm now tying up the loose ends to get the DB working efficiently.

So I can create and delete and assign ranks atm, but I am not loading and saving them from the DB. That is next. :)

Good news is, once this is all wrapped up, permissions core should be easy, as it's not a interrelatable object, it is just 1:1, not MANY:1 or 1:MANY, meaning I can just use it as a sub class to everything else, and I don't need to tailor it to each class type.
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
TheJuli
Penguin Airways VA
Penguin Airways VA
Posts: 241
Joined: Fri Mar 02, 2012 2:42 pm
Favorite Aircraft: B777
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by TheJuli » Wed Feb 13, 2013 1:44 pm

MAN THAT IS BADA$$. Honestly this is amazing with the filght hours and all of that. GR8!

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Thu Feb 14, 2013 1:27 am

I've got sort of an exciting announcement. I'm working with Soji Yamakawa directly to help develop orb.

I don't have access to YSFlight source code, so please do not ask me or him, and please do not ask him for contact details apart from what he already provides. He is a busy man, after all. That said, if you want to ask me a question and I find it particularly important, I may relay it.

I've got a lot more information on flight data packets now, so I SHOULD be able to work on Server for 1.0 instead, it will be a lot easier I think then a proxy service. I'm not sure what approach I'll take now, so I'll give it some thought.

Perhaps, if you like this project, an email to his public ysflight address giving a thank you for his support wouldn't go amiss...
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: 4350
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 835 times
Been thanked: 1238 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Fri Feb 15, 2013 4:11 am

Image

Database is almost completely finished. I just need to add permissions now, and then I can start on Permissions core. :)
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
wingzfan99
Core Staff
Core Staff
Posts: 687
Joined: Thu Feb 10, 2011 8:03 pm
Favorite Aircraft: Boeing 757-200
Location: Chicago, Illinois
Has thanked: 49 times
Been thanked: 48 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by wingzfan99 » Fri Feb 15, 2013 3:02 pm

Flake,

The progress you've made on this is awesome. Is the user database an actual DB (like, MS SQL, MySQL, etc) or is it a system you developed yourself? Obviously the implications of this user DB are that it could eventually be integrated with or connected to a website like YSFHQ, so that's why I ask.
Wingzfan "The Budgetman" 99
Treasurer, YSFHQ

Founder and Admin of the site once known as YSUpload

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Fri Feb 15, 2013 8:37 pm

It's text based, tab delimited. I'll post some screenshots of how it works this afternoon.

Pretty much, you have ./Database/Users/*(Directory of user)/Info.txt

info.txt will have: "[KEY]<TAB>[VALUE]"

Pretty much the same for groups and ranks as well.

Give me about 5 or 6 hours to have that done for you.
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: 4350
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 835 times
Been thanked: 1238 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Sat Feb 16, 2013 4:00 am

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
wingzfan99
Core Staff
Core Staff
Posts: 687
Joined: Thu Feb 10, 2011 8:03 pm
Favorite Aircraft: Boeing 757-200
Location: Chicago, Illinois
Has thanked: 49 times
Been thanked: 48 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by wingzfan99 » Sat Feb 16, 2013 3:28 pm

Seems like a fairly clean setup, looks like it will be easy to set up permissions and such. Thanks for the explanation!
Wingzfan "The Budgetman" 99
Treasurer, YSFHQ

Founder and Admin of the site once known as YSUpload

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

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Wed Feb 20, 2013 12:44 pm

Just did a bit of restructuring.

I was using a RankDB.Ranks.Rank structure, and Groups would reference ranks from this list. The problem is that ranks would get hard to distinguish this way and instead it should be Groups.Rank.Rank. Now the group itself holds the rank rather then just a reference to it, it's cleaner and it's what I wanted to begin with but I was really confused by this.

Permissions Skeleton is in place, I need to write the references from objects to it (ie: Group.Permissions, Group.Rank.Permissions, User.Permissions), then fill the permissions out as I add permissions to the program.
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: 4350
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 835 times
Been thanked: 1238 times
Contact:

Re: [0.3.2]Orb: YSFlight Proxy Server Script

Post by Flake » Wed Mar 27, 2013 9:00 am

Orb Project - Detailed Explanation

[youtube]https://www.youtube.com/watch?v=ejubnUAL2EI[/youtube]

Finally, all my disputes on youtube were resolved and I was finally able to verify my account, which means i can release this longer then 15 minute video.
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 2 guests