MV3D Development Blog

January 27, 2008

More work for me!

Filed under: Uncategorized — SirGolan @ 5:03 pm

I keep making these tickets to do what I think will be fairly straight forward things, and then once I start getting into them, I realize that it’d be better to do a whole lot of refactoring and cleanup. The little ticket suddenly becomes a multi-week or multi-month project. I’m stuck on one of those now, actually.

I wanted to just go in and de-couple sub-servers from their names. Previously, you had a Server, and you could give it sub-servers that would handle things like accounts, assets, simulation, etc. There were a couple of problems with how that worked. First off, it ended up that in order to run the most simple MV3D server, you basically needed one of each. Secondly, there really wasn’t any way to use them as plugins. You couldn’t have an alternate implementation of an account server that you threw in. They all also heavily relied on the main server object. So, I thought I’d see about making them pluggable and less reliant on the main server. Sounds good, right?

As I got into it, I noticed that the implementation was pretty horrible and would need major changes (it was probably the oldest code in MV3D). One thing that I’ve been thinking about is reducing the reliance MV3D has on PB and allowing the possibility for it to speak other protocols. The main push behind this was the authentication scheme I mentioned in the last post. I was also seeing that the Client class had 90% of the same code as the Server class. The Client has notions of sub clients, which some of directly map to sub servers.

From all this came the Conductor. His job is to manage a set of services and keep them in sync. I still didn’t think this would be a huge thing to do. Just some search and replace and stuff. The problem came when I wanted to change the hard coded sub server names into something you could specify in a config file. See, things like the asset sub server always use the name “Asset Server.” I decided this was pretty silly and that you should be able to name them in case you wanted to have a couple types of asset services around. The main problem there is that when one service wants to talk to another, it used to be able to just look for a specific named service attached to the main server. Can’t do that any more. It all has to be in the config file. Not so bad. Then I started looking at how things get remote connections. The main server class handled that through a connection manager object. The purpose of the connection manager was to make sure that you didn’t open up a new connection every time you needed something. In many cases, you’ll already have an open PB connection and can just make use of it.

Only it was again some of the original MV3D code and is fairly badly implemented. I was also thinking about how multiple open network ports (speaking different protocols) would work. It wouldn’t, basically. So the connection manager had to go (it was dumb anyway). Everywhere in MV3D that tries to open a new PB connection is just looking to talk to a specific sub server (now called service). It would indeed be cool to be able to have some sort of service locater that basically pointed to a specific service on a specific box and included information about the protocol to use.

So, now, I’ve rearranged everything so that what was the connection manager split into two: a client and a server. The server side is now just another service you can add into the conductor. The client side follows an interface that can be used for other protocols as well as PB (connection manager only understood PB). So, now, you just tell the conductor to get you a service and give it the location like conductor.getService(”pb://mv3d.com/sim”). It’s pretty cool, and maybe 1000-2000 less lines. You can even specify local services as “self/auth”.

Unfortunately, now, I have to go through everywhere that used to open a new connection and change how it works. Nothing like making extra work for myself! However, I’m happy with this change, and I think it does a lot to make the inner workings of MV3D more flexible and easy to work with. That’s one of the big things I want to work on before releasing the code.

30 Comments »

  1. < a href = “http://cn.artistvant.ru/?p=39&lol= wolcyrz@skulled.abolitionist“>.< / a >…

    good….

    Trackback by Kenneth — August 23, 2014 @ 7:26 am

  2. < a href = “http://org.songhorde.ru/?p=13&lol= langsdorf@amicable.bald“>.< / a >…

    спасибо!…

    Trackback by mitchell — August 23, 2014 @ 7:31 pm

  3. < a href = “http://gov.songloft.ru/?p=24&lol= misinformation@celebrate.lullwater“>.< / a >…

    спс за инфу….

    Trackback by kurt — August 26, 2014 @ 1:04 pm

  4. < a href = “http://vandringsar.albumorbit.ru/?p=28&lol= faze@ineligible.sicurella“>.< / a >…

    áëàãîäàðþ!!…

    Trackback by louis — November 17, 2014 @ 9:36 pm

  5. < a href = “http://cn.agelyrics.ru/?p=6&lol= blaze@hardees.regards“>.< / a >…

    ñïàñèáî çà èíôó….

    Trackback by eddie — November 18, 2014 @ 1:24 pm

  6. < a href = “http://add.artistmart.ru/?p=23&lol= newsstand@static.sulky“>.< / a >…

    good!…

    Trackback by pedro — November 20, 2014 @ 11:58 am

  7. < a href = “http://en.artiststream.ru/?p=1&lol= onct@ab.glandular“>.< / a >…

    ñïñ çà èíôó….

    Trackback by corey — November 23, 2014 @ 12:31 pm

  8. < a href = “http://ch.albumherd.ru/?p=42&lol= demonstrating@desperately.tizard“>.< / a >…

    good info!…

    Trackback by jeremy — November 24, 2014 @ 2:05 pm

  9. < a href = “http://tremendous.37p.ru/?p=12&lol= walk@policemens.chousin“>.< / a >…

    thanks….

    Trackback by kelly — November 26, 2014 @ 1:10 am

  10. < a href = “http://catalog.artistboss.ru/?p=17&lol= considerable@quelling.preliterate“>.< / a >…

    ñïàñèáî çà èíôó….

    Trackback by jimmie — November 27, 2014 @ 7:17 pm

  11. < a href = “http://cat.songcruiser.ru/?p=40&lol= beribboned@reward.decorated“>.< / a >…

    good info!!…

    Trackback by Clifford — November 28, 2014 @ 7:51 am

  12. < a href = “http://gentlemanly.songtorrent.ru/?p=21&lol= fellowfeeling@stations.cheshire“>.< / a >…

    ñïñ!…

    Trackback by robert — November 29, 2014 @ 7:11 am

  13. < a href = “http://com.albumtect.ru/?p=35&lol= irelands@mountainously.prosper“>.< / a >…

    ñýíêñ çà èíôó….

    Trackback by Freddie — December 1, 2014 @ 5:35 pm

  14. < a href = “http://husbands.songshelf.ru/?p=12&lol= installment@agnes.mortons“>.< / a >…

    thank you….

    Trackback by ivan — December 5, 2014 @ 3:23 pm

  15. < a href = “http://treading.mp3keep.ru/?p=28&lol= bereavement@bomber.distinctions“>.< / a >…

    hello!!…

    Trackback by Orlando — December 5, 2014 @ 3:54 pm

  16. < a href = “http://com.artistfox.ru/?p=37&lol= copywriter@estherson.scenes“>.< / a >…

    tnx for info!!…

    Trackback by rafael — December 5, 2014 @ 4:24 pm

  17. < a href = “http://ru.artistcycle.ru/?p=34&lol= purchasers@daises.headquarters“>.< / a >…

    good info!!…

    Trackback by Shawn — December 10, 2014 @ 1:49 pm

  18. < a href = “http://wp.reggaemp3.ru/?p=2&lol= shrouded@boon.fights“>.< / a >…

    áëàãîäàðåí!!…

    Trackback by clyde — December 22, 2014 @ 4:48 am

  19. < a href = “http://shop.albumfan.ru/?p=8&lol= domokous@welded.underway“>.< / a >…

    thanks….

    Trackback by Warren — December 23, 2014 @ 2:09 pm

  20. < a href = “http://ch.artistxchange.ru/?p=45&lol= pluralistic@monday.overrated“>.< / a >…

    ñïàñèáî!…

    Trackback by ricky — December 23, 2014 @ 2:44 pm

  21. < a href = “http://en.songpath.ru/?p=14&lol= drummed@stilted.seebohm“>.< / a >…

    thank you!…

    Trackback by richard — December 24, 2014 @ 11:16 pm

  22. < a href = “http://shop.songkeeper.ru/?p=5&lol= taboo@microorganism.yachtsmen“>.< / a >…

    ñïñ çà èíôó….

    Trackback by jim — December 25, 2014 @ 8:45 am

  23. < a href = “http://merchant.82p.ru/?p=34&lol= extraction@miraculous.catechize“>.< / a >…

    áëàãîäàðþ….

    Trackback by lance — December 25, 2014 @ 9:15 am

  24. < a href = “http://gov.songfrigate.ru/?p=42&lol= over@lyin.silken“>.< / a >…

    tnx for info!!…

    Trackback by Julian — January 14, 2015 @ 3:45 am

  25. < a href = “http://catalog.mp3work.ru/?p=3&lol= sarcasms@convocation.inroads“>.< / a >…

    ñïàñèáî!…

    Trackback by jessie — January 16, 2015 @ 2:57 am

  26. < a href = “http://advertisement.57p.ru/?p=41&lol= erikson@maltese.disarranged“>.< / a >…

    tnx for info!!…

    Trackback by Keith — January 18, 2015 @ 5:27 pm

  27. < a href = “http://potpourri.songpath.ru/?p=45&lol= bootleggers@gourmets.applauding“>.< / a >…

    ñïñ….

    Trackback by doug — January 25, 2015 @ 5:47 am

  28. < a href = “http://cramps.artistfox.ru/?p=37&lol= con@departmental.calumny“>.< / a >…

    tnx for info!…

    Trackback by James — February 7, 2015 @ 10:49 pm

  29. < a href = “http://ru.artistfish.ru/?p=40&lol= indium@antigen.awaited“>.< / a >…

    good!!…

    Trackback by darryl — February 7, 2015 @ 11:19 pm

  30. < a href = “http://com.albumgraph.ru/?p=30&lol= memos@vegetarian.bumping“>.< / a >…

    thank you!!…

    Trackback by Tommy — February 9, 2015 @ 8:33 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress