Jump to content

Making Leadwerks.com More Scalable

Josh

1,575 views

Our website stores a lot of user generated content in the forum of images and attachments.  Before Leadwerks Game Engine was on Steam the demands were even higher, since we had our own downloads and gallery sections that stored data on our server.  Since the implementation of Steam screenshots and Workshop a lot of that has been offloaded onto the Steam servers, relieving our server from some of the data storage and transfer costs.  (If you're interested, all our old content is archived on Google drive here.)

Currently our website weighs in at about 35 GB of data.  This is backed up online daily, and offline about once a month.  The entire server is usually burned onto a Blu-Ray disc and saved away.  The time and storage space this takes is considerable, and as the site keeps growing this approach will not be sustainable.

Screen Shot 2017-10-14 at 5.29.36 PM.png

Amazon S3 allows you to store files in the cloud with an API to write and save files, at a cost of $0.023 (that's 2.3 cents) per GB per month.  I've hooked into the service to offload all user attachments, images, and profile pictures onto Amazon's servers.  This leaves our core site data at an easily manageable 2.5 GB, which I can easily burn onto a DVD.

Now that all user data is stored in the AWS system for dirt cheap prices, we can easily grow the amount of content on our site without it impacting the site responsiveness, backup time, or having much impact on operating costs.  Stay tuned and I will tell you how we are going to use this for game development.

 



3 Comments


Recommended Comments

If you hosted with AWS as well, you could clone the whole server image with the click of a button.

AWS is expensive though IMO.

I have my stuff hosted with Linode. 2 VMs. 1 for the websites, the other for the game server.


If you really wanted to get crazy, you could setup hosting in two different data centers having your database replicated between them. Then if something goes down you can just switch DNS over to the 2nd data center.

Share this comment


Link to comment

Actually, MartyJ is correct. 

You can actually host from an S3 Bucket. I was hosting our company divisions webpage from my AWS page. 

It may save you a lot of hassle Dr Josh. 


Expensive on the other hand? I'm not sure about, then again, I am using S3 as my dropbox and am charged about $2 a month for 120GB of storage. 

But, my EC2 acct, yes, that gets expensive. I was hosting DCS World Flight Sim mmultiplayer games from my EC2 so my russian and french freinds could join. We had great up/downstream, but it cost about 12 bucks a day on thier M class. 
 

Share this comment


Link to comment
On ‎10‎/‎27‎/‎2017 at 3:23 PM, GSFC_1 said:

Actually, MartyJ is correct. 

You can actually host from an S3 Bucket. I was hosting our company divisions webpage from my AWS page. 

It may save you a lot of hassle Dr Josh. 


Expensive on the other hand? I'm not sure about, then again, I am using S3 as my dropbox and am charged about $2 a month for 120GB of storage. 

But, my EC2 acct, yes, that gets expensive. I was hosting DCS World Flight Sim mmultiplayer games from my EC2 so my russian and french freinds could join. We had great up/downstream, but it cost about 12 bucks a day on thier M class. 
 

I think you can only host a static website from an S3 bucket, so no scripts and no databases.

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Blog Entries

    • By Josh in Josh's Dev Blog 0
      A new update is available for beta testers.
      Terrain
      The terrain building API is now available and you can begin working with it, This allows you to construct and modify terrains in pure code. Terrain supports up to 256 materials, each with its own albedo, normal, and displacement maps. Collision and raycasting are currently not supported.
      Fast C++ Builds
      Precompiled headers have been integrated into the example project. The Debug build will compile in about 20 seconds the first run, and compile in just 2-3 seconds thereafter. An example class is included which shows how to add files to your game project for optimum compile times. Even if you edit one of your header files, your game will still compile in just a few seconds in debug mode! Integrating precompiled headers into the engine actually brought the size of the static libraries down significantly, so the download is only about 350 MB now.
      Enums Everywhere
      Integer arguments have been replaced with enum values for window styles, entity bounds, and load flags. This is nice because the C++ compiler has some error checking so you don't do something like this:
      LoadTexture("grass.dds", WINDOW_FULLSCREEN); Operators have been added to allow combining enum values as bitwise flags.
      A new LOAD_DUMP_INFO LoadFlags value has been added which will print out information about loaded files (I need this to debug the GLTF loader!).
      Early Spring Cleaning
      Almost all the pre-processor macros have been removed from the Visual Studio project, with just a couple ones left. Overall the headers and project structure have been massively cleaned up.
    • By Josh in Josh's Dev Blog 6
      An often-requested feature for terrain building commands in Leadwerks 5 is being implemented. Here is my script to create a terrain. This creates a 256 x 256 terrain with one terrain point every meter, and a maximum height of +/- 50 meters:
      --Create terrain local terrain = CreateTerrain(world,256,256) terrain:SetScale(256,100,256) Here is what it looks like:

      A single material layer is then added to the terrain.
      --Add a material layer local mtl = LoadMaterial("Materials/Dirt/dirt01.mat") local layerID = terrain:AddLayer(mtl) We don't have to do anything else to make the material appear because by default the entire terrain is set to use the first layer, if a material is available there:

      Next we will raise a few terrain points.
      --Modify terrain height for x=-5,5 do for y=-5,5 do h = (1 - (math.sqrt(x*x + y*y)) / 5) * 20 terrain:SetElevation(127 + x, 127 + y, h) end end And then we will update the normals for that whole section, all at once. Notice that we specify a larger grid for the normals update, because the terrain points next to the ones we modified will have their normals affected by the change in height of the neighboring pixel.
      --Update normals of modified and neighboring points terrain:UpdateNormals(127 - 6, 127 - 6, 13, 13) Now we have a small hill.

      Next let's add another layer and apply it to terrain points that are on the side of the hill we just created:
      --Add another layer mtl = LoadMaterial("Materials/Rough-rockface1.json") rockLayerID = terrain:AddLayer(mtl) --Apply layer to sides of hill for x=-5,5 do for y=-5,5 do slope = terrain:GetSlope(127 + x, 127 + y) alpha = math.min(slope / 15, 1.0) terrain:SetMaterial(rockLayerID, 127 + x, 127 + y, alpha) end end We could improve the appearance by giving it a more gradual change in the rock layer alpha, but it's okay for now.

      This gives you an idea of the basic terrain building API in Leadwerks 5, and it will serve as the foundation for more advanced terrain features. This will be included in the next beta.
    • By Josh in Josh's Dev Blog 1
      Here are some things I did in the last couple days to fix a computer that was basically unusable.
      It seems that Superfetch was rebranded to "SysMain" in an update and automatically re-enabled. If your computer is grinding away either the CPU or disk usage while doing nothing, this is the culprit. Disable it in Windows services.
      The XBox games bar is suspect. I recommend disabling it now that FRAPS supports Vulkan.
      Some features in Visual Studio are making it unusably slow.
      In Project settings > Link > Debugging, set "Generate Debug Info" to "DEBUG:FASTLINK" (in the debug build only) for faster linking.
      Disable these two settings in the general program Options:
      Enable Diagnostic Tools while debugging Show elapsed time PerfTip while debugging
×
×
  • Create New...