B4J Tutorial [GCE] For Noobs, Part 1 - Intro

Discussion in 'B4J Tutorials' started by Ed Brown, Nov 4, 2017.

  1. Ed Brown

    Ed Brown Active Member Licensed User

    As promised, I present to you a trilogy of short tutorials allowing you to learn some of the basics of Google Compute Platform/Engine (GCP/E). The knowledge you gain from these tutorials will allow you to host a B4J (or any other .jar) console app on a Virtual Machine (VM). By ‘console’ I mean ANY console app including a web app because a web app is simply just another console app. You will also need to have a credit card handy to sign up for the free stuff offered by Google - I know, I know!? It’s free so why do you need to provide credit card details?? Well, I’ve got nothing helpful to add there.

    Disclaimer: Before we continue I just want to say that I am not an expert! I have had to learn this stuff the hard way and yes, I’ve made plenty of noob mistakes along the way. I’ll do my best to help steer you through the cloud and come to terms with some of the technical thingys that get will cross your path. If you follow along EXACTLY as written/stated then you will have a working B4J console app running on a GCE VM.

    I have tried to make the tutorials easy to follow along and to read. I’ve read manuals that have given me mental paralysis after a couple of pages and I have tried to avoid that.

    I’ll also be showing you how I do things. There are other ways of doing things of course, but I’ll be showing how to do things using the tools that I use. Don’t worry! I’m sure that most of you, reading this, are already using the same tools. Below is a comprehensive and very long list of the tools that I use. Make sure that you have them all installed and ready to follow along. If you need to clear out some space on your hard disk now would be a good time to do it.

    List of the tools I use:
    • B4J
    • Google Chrome (the browser)
    Phew! But, yes there’s a but, if you want to use something like MySQL then I would add to this list MySQL Workbench CE (https://www.mysql.com/products/workbench/). Using MySQL is outside the scope of this tutorial I will not be covering it. However, I will show you how to install MySQL / MariaDB onto a GCE VM (by the end of these tutorials you’re going to LOVE all these little abbreviations and acronyms :D ).

    BTW, in case you’re wondering what a ‘noob’ is, and even if you’re not, a ‘noob’ is someone that is new to something that lesser noobs enjoy having around because it makes them feel less like a noob. :) In other words, a noob is someone new to something. We’re all noobs at everything - it’s a good thing! ;)

    Why do I use GCE? I find using GCE easier to use than Amazon Web Services (AWS). GCE’s terminology and naming conventions for most of the services on offer make more sense to me than those used by AWS. I will not be covering AWS in this tutorial or any other tutorial as I just do not grasp the naming conventions used by AWS.

    Another reason why I use GCE (or any other Virtual Private Server (VPS) or Virtual Machine (VM)) is that I can use port 80 for my web apps! Yes, you heard right! Port 80! This is something that you just cannot easily do with shared web hosting. VM’s give you a lot of flexibility on the port/s you can use (with some exceptions) and gives you control over the resources the VM can have. By ‘resources’ I’m referring to the number of CPUs and the amount of RAM.

    Okay, I’m going to wind this first tutorial up with a look at some of the topics that will be covered in future tutorials. The list is not comprehensive and I’m sure that more tutorials will be added over time and the list below will become out of date.

    In following tutorials we’ll cover the following topics (not in any particular order):
     
    Last edited: Nov 8, 2017
    juvanum, Ferbis, magi6162 and 17 others like this.
  2. alwaysbusy

    alwaysbusy Expert Licensed User

    What a fantastic series of tutorials! Thank you, I will be trying this very soon. Little sugestion: maybe put up a link in this post to each sub post so we can use this one as the starting point (the posts will get seperated in time by other posts).
     
  3. Cableguy

    Cableguy Expert Licensed User

    Please, Please, Please! Link the parts using this post as a starting point! This way we have only to bookmark this thread!
     
    lemonisdead and OliverA like this.
  4. Piero Salandin

    Piero Salandin New Member

    Hi there, Ed! AFAIK oe of the best tutorials I've ever seen.
    But a question: in Part 8 you are rfeferring to a file named GCEDemo.jar; wher does it come from?
    Thank you very much!
     
  5. Ed Brown

    Ed Brown Active Member Licensed User

    Sorry everyone! Links added. Good idea in hind sight :oops:
     
  6. Ed Brown

    Ed Brown Active Member Licensed User

    Hi @Piero Salandin,

    Thanks for the kind words :)

    The file in question is a very simple sample I put together to show how to use the Buckets. It can be any file.
    I have added the sample to the tutorial. It does nothing more than display the time second. ;)
     
  7. Ed Brown

    Ed Brown Active Member Licensed User

    Hi @alwaysbusy, thank you for the encouragement and kind words!
    I have added the links - great idea!
     
    alwaysbusy likes this.
  8. alwaysbusy

    alwaysbusy Expert Licensed User

    @Ed Brown I may have missed this, but can you give us an example of how a typical url for a webapp would look like using GCE? If you use a 'normal' VPS, it is the IP address + port + appname. Is this the same using GCE?
     
    Ed Brown and Cableguy like this.
  9. Cableguy

    Cableguy Expert Licensed User

    Actually, if you use port 80 in your app, and the rootFilter handler, your address will be as simple as "www.mywebapp.com"
    just remember to enable both UDP and TCP protocols in the port.
    I use this system in my vps
     
    Ed Brown likes this.
  10. Ed Brown

    Ed Brown Active Member Licensed User

    That's a really good point and I can't believe I missed that! I've update Tutorial 9 and added more details on what to look for and how to do it.

    That's spot on! There'll be a separate tutorial covering the use of domain names and Content Delivery Networks (CDNs) - it's a more advanced topic.

    Thank you both :)
     
    Harris, Cableguy and alwaysbusy like this.
  11. yaqoob

    yaqoob Member Licensed User

    Thank you Ed. Very nice work and very useful. This what I was looking for.
     
  12. magi6162

    magi6162 Well-Known Member Licensed User

    great!!..:):)
    when PHP and apache?:rolleyes:
     
  13. Ed Brown

    Ed Brown Active Member Licensed User

    Apologies to all for being quiet/er - work has been more than a little hectic.

    But, I'm having a break in week's time and I'll be able to roll out more the promised tutorials - stay tuned! ;)
     
  14. magi6162

    magi6162 Well-Known Member Licensed User

    maybe even SSH?
     
  15. magi6162

    magi6162 Well-Known Member Licensed User

    I have successfully used your tutorials and installed my web app in one instance in GCE.:)
    I kindly ask you for some advice and / or suggestions for the following two questions:

    1. at the moment to access the web app use:
    http://abc.abc.abc.abc:XXXXX/myApp
    how can I instead recognize
    http://MySite.org/MyApp? [I have a domain on One (like mysite.org), and I would like to move it to the instance in GCE]

    2. How can I change to "https" in my instance on GCE?

    I tried on google, but I can not figure out how to proceed.:confused:
    Thank you for your patience and for the tutorials that opened up a world that I thought was out of my reach.o_O
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice