Elsewhere there are things that we all miss, yet it takes just one to notice...

MS Access Databases

They’re really just as simple as using */UNIX…

Huh…

I’ve been faffing about with my database for most of the night and after relearning a few things, I deleted all my queries and forms and started again.

The relationships screen is where I now layout everything and then I decide to add tables from there well before I start designing the forms.

What I had before would have worked, but I wanted this to be perfect. And that’s why I deleted all my previous work. Using the relationships between Tables and Queries really does make life easier when building up forms and reports.

So far though, with my own project, I’ve not had the need for any VBA unlike at work. The experiences from my own project and the works one too will benefit both projects. I’m hoping that when I decide on changes for the works project, it won’t be too big. Luckily enough, both of them are at the moment small databases.

Just with tonight’s ‘messing’ around, I’ve actually got back to fully understanding the relational side of linking tables and queries. And how it makes creating forms much easier.

It’s only been about two weeks now I think getting back into MS Access, there about.

Ah well… My server and test devices are still running. 🙂

Server bully test

Well, not exactly crashed the server, but I stopped it from running which is a proof of concept.

With a simple Java program which sends legitimate requests from a legitimate device, the server failed after a few minutes. A quick manual restart over ssh got it up and running immediately.

public class BullyServerTest {
    
    public static BullyServerTest bst;

    public static void main(String[] args) {
        bst = new BullyServerTest();
    }
    
    boolean quit = false;
    
    private final String server_host = "SOMEWEBADDRESS"; // LOL
    private final int server_port = SOMESECRETNUMBER;
    
    private final String home = System.getProperty("user.home") + "/";
    
    public BullyServerTest() {
        Runtime.getRuntime().addShutdownHook(new Thread() {
            public void run() {
                quit = true;
                try { Thread.sleep(1000); } catch (InterruptedException ex) {}
            }
        });
        
        while (!quit) {
            try { Thread.sleep(randInt(10, 250)); } catch (InterruptedException ex) {}
            do_hello_world_bully();
        }
    }
    
    Random rand = new Random();
    
    private int randInt(int min, int max) {
        return rand.nextInt((max - min) + 1) + min;
    }
    
    private static final int COMMAND_HELLO = 1234;
    
    private void do_hello_world_bully() {
        int count = randInt(10, 100);
        System.out.println("HELLO WORLD BULLY at " + count + " times");
        
        while (count-- != 0) { // a shed load of threads at once
            new Thread(runnable_HW).start();
        }
        
        System.out.println("Completed...");
    }
    
    Runnable runnable_HW = new Runnable() {
        @Override
        public void run() {
            try {
                WLSocket socket = new WLSocket(server_host, server_port);

                socket.out.writeInt(COMMAND_HELLO);
                String hello = socket.in.readUTF();
                
            } catch (IOException ex) {
                System.out.println("Server failed with HELLO WORLD response");
            }
        }
    };
}

So the next step is to implement a thread pool so that the server will not hang on too many requests. It ran for less than a minute. The above program kept running until my 12Gb RAM ran out which was a bit longer. The current server does only have 4Gb RAM and couldn’t handle the amount of connections at once. I’ve also had to keep the sudden bandwidth usage down as I was hitting my upload and download limits.

Eventually the server and client code will all be rewritten in C++ and handle such things as low latency timeouts.

This has been a very interesting test. I’ll be leaving the hello world server command in for future testing to simulate fake requests.

Project updates

I’ve had the server running for over 3 weeks so far, and although it’s only a few testing devices, it’s looking very promising. The server hasn’t failed once and I’ve even ssh’d into it and run a couple of checks.

My next step, whilst I’m taking the time to build the database software, is to setup another server. More servers means backups and 100% running and up time. The servers can also update each other depending on the regions requirements. That means if I upload content that belongs on other servers, then the servers will organise themselves automatically. A bit like a decentralised distribution of data.

Devices will also receive updates when new servers have been added as periodically they will question what servers are available to them. This will help with manual load balancing as more devices are added. Although were I want to go with this will not need manual load balancing, it is something I want to test out on test servers anyway.

Although all of this is stuck in my head at the moment, I’ve had a few quick browses through my code base and it this seems pretty simply to implement and upgrade without any interruptions to the servers current up time. This is definitely something I want to fully test out. Even down to the servers possibly updating themselves when one has been updated. I will look into this as I’m more leaning towards manually accepting server updates for security.

After long thinking over the weekend I was building myself up to putting this project forward to someone as a partnership proposal. I got home from work today and decided that’s a no. For the time being, this is staying mine.

Updates 2018-Feb-21

My project:

I’ve been taking my time on this project for a damn good reason, I don’t want to rush things and end up making some serious mistakes with it.

There are a few, quite a few bits of code, that will need a rewrite, mainly in C++. This is mainly for future proofing.

I’m currently on stage 2 of this which involves 3 main sections.

The first section involves the database which I am currently working on in MS Access. I used to be an Access master, so I’m getting my hands dirty and learning it all over again. For the past few months I’ve looked for anything that came close to what MS Access can actually do and I’ve found nothing. MS Access is everything for creating a database application from scratch. VBA might be a tad awkward, but it is doing everything I need it for so far. I hope in the future it can also do TCP communications.

The second and third sections of this stage 2 are a lot more involved in prepping for the future. The second being done this next week if all goes well.

The final third of stage 2 will involve the website. I’m hoping that it will be handled by someone I know who is fully capable. This will include handling accounts and payments too. And I’ve been told that it can also handle invoicing.

After that, it’s is just going with the flow. I’m being very weary of contacts because I’ve been bitten before.

Me:

I’ve still got a good few months before the above starts to take shape, although some early testing will be done sooner than expected. Apart from that I’m doing okay with myself apart from slacking with my exercising.

This month has been hard for moving things forward because I lost a lost of money this month. I still get annoyed over that. I could do with a few more devices to put out into the field. And with the lack of testing, I’ve also held back on setting up the cloud server.

Programming has been ‘nicely’ minimal. I’ve mainly been running all my software and fixing bugs. I have been able to chill. Well ‘ish’…

And I’ll get back to a regular weight lifting routine again.

 

Just a few updates

Well, that’s January over. And it seemed to have shot by really quick too.

The first stage of my personal project is complete and has been running 100% for quite a while now. It’s now just testing out in the field that needs doing.

I’ve got everything running through a DNS server that routes back to my home PC, so no matter where devices are running they can easily connect to my home PC for communications over TCP. Eventually this will be running on a cloud service which I’ve been looking into lately, whether that be Google or AWS or something else, I don’t know yet.

All network traffic runs on two way encryption which was actually very easy to implement. At the moment it is not a very complex encryption because I do want to test for speed overheads with this. If I’m handling 1000 plus devices, ‘at the same time’, then I really don’t want the CPU burning the house down. I’ve a few more cryptographic algorithms I want to test out too, but they can wait for now.

Video creation has been non-existent since before Christmas because I’ve been focused on the programming of this project. Over the last two days I’ve loaded up Blender and although I can move things around easy enough, the old knack has gone again. I really like Blender, but when it comes to finishing something off that requires programming, then Blender has to wait just like most other things.

One thing I do need to start focusing on, and I started looking into this before Christmas, was a full accounting database. The only one from the past that I’m familiar with is MS Access, and trying to find one that works on Linux is still a pain. I’m planning on using Linux so MS will not do. So, when it comes to storing all financial records, invoicing, etc, it looks like I’ll have to write my own software. Shame really, I do like the awesomeness of MS Access. (Which I started using at work earlier today)

So, the next stage is to finalise the tests out in the field. To do this, I will take my demo devices to various places and see it running just nicely. The management software will also be tested out in the field too.

Once that stage has been proven successful over time, then it’s the setting up of the rest of the management of the project. This will include accounts, security, moderation, sustainability tests, reviews on scale-ability, moving to an initial cloud server, and more.

Up until this is a showcase-able project then for the most parts, apart from what I write about, this will be under wraps because I want this to be mine with the help of very few and limited resources. Trusting is hard to do when you lived through enough of life to have experienced people take away your ideas in a wink.

Until next time.

A weekend is over. Updates.

Where is the day between Sunday and Monday?

I needed a little more time this weekend to continue building my project up. The manager is nearing completion with only the transfers of media to devices needing doing now. Then it is getting the devices to simply run on their own.

Distractions at home is what mainly slows my pace down. Noise and stuff.

Ah well.

I only get at most an hour and half after work if that during the week so the first thing I will be doing is adding a shed load of comments to my code.

This last section, the media manager was quite easy to get up and running because the device manager had already been done.

I know that in the future it will eventually get a complete rewrite yet again, but at least this version will handle up to 1000 devices. That’s a low estimate. Once it goes live, I’ll update everything so that it can scale up to anything.

The devices themselves will get a full run by the end of the week. That I am looking forward to seeing. All this work finally being showcased.

BASH script VLC player

In just 15 lines of script I’ve got a fully working test player running from BASH and using the VLC player. All I need now is just a simple Java program to fetch the data from the server and if there are changes then restart the player. Ah, scripting makes life easy. From Java I can check the exit status of System.exit(status) in the bash script and act accordingly. This will speed development up a hell of a lot.

Currently the Java server is rock solid. And I do need the much needed device editor so that I can assign playlists to devices. Now that I have the player I will write a simple device manager. Probably in Qt first then I will transfer it over to mobile.

EDIT: Change that to 10 lines of script. Now to get on to a simple device manager.

EDIT 2: Initially I setup a UI in Qt, but then decided to setup the same UI in Netbeans using Swing and Java. This is mainly because the server is written in Java.

LibGdx and Overlap2D issue (and HNY!)

Oh yeah…

Happy New Year!

Anyway, just like the classic meme, I carried on from Dec 31st into Jan 1st. I did watch some fireworks on the CCTV and heard them. That was about as much as I could put up with. Definitely a grump but I don’t care.

The issue I’m having at the moment lies with the latest version of LibGdx, which is 1.9.8, and it’s animation class which doesn’t work with the Overlap2D package. That’s kind of a big ‘DAMN!’ thingy. Apparently it works with version 1.9.4 or less. I found the problem also on stackoverflow too.

Another problem is the Overlap2D website has been down for quite some time, a month or more maybe.

The project is hosted on github, but I’m as of yet unfamiliar with building it even though I’ve downloaded the source. I’ve still yet to get around to that.

So… I’m stuck…

I’ve got my scene loaded up and displaying perfectly. As soon as I add an animated sprite to the scene, it doesn’t want to work. I’ll dig deeper later on today maybe.

One thing I do like about LibGdx is, after spending a lot of time with DarkBasic Pro, many writing C++ plugins, it is much faster and smoother. The only thing I need to add is native libraries to cover all CPU’s.

EDIT:

Up until I find a solution, it’s back to Linux. I can do much more with that OS.

Problems with Overlap2D and LibGdx

Linux… Everything so far I’ve done can be done much faster on Linux when it comes to development.

Then came Overlap2D…

It runs on Linux fine for a short while, but when you really start getting into editing a level, all the graphics start to vanish on the display and all it leaves is the white bounding boxes of the level graphics. So far I cannot find a solution.

I’ve installed IntelliJ and a few other bits on Windows 10 and everything loads up fine, but it’s getting a tad late now.

I’ll report back tomorrow when I finally get something working.

I’m wondering if it is something to do with Linux’s Java and a rendering issue. If I get round to it then I might just look into it sometime over the next few days.

In the meantime, I’m going to get Overlap2D working for both Desktop and Android finally.

EDIT: Overlap2D seems to be working on Windows. Although I really do not like developing on Windows, I think it is about time I tried.

LibGdx and Overlap2D download

I had found what looked to be an awesome utility for LibGdx, Overlap2D. The problem is the website is down and for some time all I could find was the github repo for it here. Now that would be alright if I knew how to build it, only a couple of years into Java. I will get round to getting it to build and I will do another post on how to do that.

There are also plenty of other youtube videos on how to use it which without a doubt make it ‘awesome’. Such as youtube link.

However, to get overlap2d running out of the box, and as I’ve said, the main website is down. I did find buried within a forum post a dropbox link.

Ah crud, I’ve closed the link to the forum post. Instead, just for the time being, the dropbox link:

Overlap2D Java executable

Now I can get on with making use of this excellent piece of kit.

EDIT: The github forum link here.

Posts navigation

1 2 3 4 5 6 7 11 12 13
Scroll to top