Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Kosani
Jun 30, 2004
Ni ni.

Vanadium posted:

If the user reassigns V, you've lost control of the loop. If they reassign _node, it's their own fault for touching a variable with a name starting with an underscore, they should know better.

Makes sense, thanks.

Kosani fucked around with this message at 04:32 on Aug 2, 2014

Adbot
ADBOT LOVES YOU

PS. Love the cabin
Dec 30, 2011
Bee Lincoln
I had this crazy idea to help with scrolling RTS games on a tablet but I'm not sure how feasible it is.

My thought was to take a windowed game, center it, and shrink it by about 20 pixels on all sides.
Then, another blank window behind it would read touch events and pass along something like a keyboard event to the game to scroll around.

So far what I've noticed with Warcraft 3 is that the second it loses focus to the app receiving touch input it will slow itself way down.
I could spam SetActiveWindow() but I'm not sure how effective that is.

Alternately there is using SetWindowsHookEx to prevent it from thinking it's lost focus, but I'm not sure if that would be detected by anti-cheat engines.
Any thoughts?

Alfred P. Pseudonym
May 29, 2006

And when you gaze long into an abyss, the abyss goes 8-8

Anybody in here any good with LabVIEW? I'll crosspost my question from the DIY electronics thread:

I'm using LabVIEW to control a set of stepper motors through an Arduino with LIFA. I would like for the stepper motors to have a smooth custom velocity profile. The subVI I'm using (Stepper Write.vi, I think this is a standard one), only gives a trapezoidal velocity profile. When I try to feed a new velocity value to the subVI, the motor stops, then enters a new trapezoidal profile. This makes coordinating motion between two motors difficult or impossible. Is there any way to use Stepper Write to get a smooth profile? Is there some other way to approach this? I'm looking into LINX but I don't really know anything about it and also I am pretty lovely at LabVIEW.

shrughes
Oct 11, 2008

(call/cc call/cc)

Alfred P. Pseudonym posted:

Anybody in here any good with LabVIEW?

Well, one time I wrote a Brainfuck interpreter in LabVIEW. And some other stuff that talked over a USB or Firewire interface at one time.

Alfred P. Pseudonym posted:

I'm using LabVIEW to control a set of stepper motors through an Arduino with LIFA. I would like for the stepper motors to have a smooth custom velocity profile. The subVI I'm using (Stepper Write.vi, I think this is a standard one), only gives a trapezoidal velocity profile.

A quick search shows https://github.com/labviewhacker/li...pper%20Write.vi which suggests there's a good chance this function is part of some kind of "LabVIEW Interface for Arduino".

Alfred P. Pseudonym posted:

When I try to feed a new velocity value to the subVI, the motor stops, then enters a new trapezoidal profile. This makes coordinating motion between two motors difficult or impossible. Is there any way to use Stepper Write to get a smooth profile?

I don't know. I never used LabVIEW to work with Arduinos. If you can look at the source code for the .vi you're working with, you can figure out what interface it supports. In my experience, vi's in a library like this are either super-organized or a complete hairball mess, but there's nothing stopping you from understanding what it does.

Alfred P. Pseudonym posted:

Is there some other way to approach this?

If it's impossible to smoothly transition from from one velocity profile to another (because it brings the velocity to zero and continues from there, instead of allowing you to smoothly accelerate to the different velocity), you should look at the source code of the .vi and make a modified version to suit your needs. You should see if it uses a lower-level API that would be useful to you. It probably does: it would be very weird for the most primitive interface to be one such that it had to stop before accelerating to a different velocity. I would expect your vi in question to either use some kind of "set the velocity to X" interface with a timer, or some kind of "set the position to X" interface with a timer -- I don't know much about stepper motors besides what they are.

PS. Love the cabin
Dec 30, 2011
Bee Lincoln

PS. Love the cabin posted:

I had this crazy idea to help with scrolling RTS games on a tablet but I'm not sure how feasible it is.

My thought was to take a windowed game, center it, and shrink it by about 20 pixels on all sides.
Then, another blank window behind it would read touch events and pass along something like a keyboard event to the game to scroll around.

So far what I've noticed with Warcraft 3 is that the second it loses focus to the app receiving touch input it will slow itself way down.
I could spam SetActiveWindow() but I'm not sure how effective that is.

Alternately there is using SetWindowsHookEx to prevent it from thinking it's lost focus, but I'm not sure if that would be detected by anti-cheat engines.
Any thoughts?

e:
Nevermind, random loving around discovered the solution.
:D

PS. Love the cabin fucked around with this message at 03:54 on Aug 4, 2014

Alfred P. Pseudonym
May 29, 2006

And when you gaze long into an abyss, the abyss goes 8-8

shrughes posted:

Well, one time I wrote a Brainfuck interpreter in LabVIEW. And some other stuff that talked over a USB or Firewire interface at one time.


A quick search shows https://github.com/labviewhacker/li...pper%20Write.vi which suggests there's a good chance this function is part of some kind of "LabVIEW Interface for Arduino".


I don't know. I never used LabVIEW to work with Arduinos. If you can look at the source code for the .vi you're working with, you can figure out what interface it supports. In my experience, vi's in a library like this are either super-organized or a complete hairball mess, but there's nothing stopping you from understanding what it does.


If it's impossible to smoothly transition from from one velocity profile to another (because it brings the velocity to zero and continues from there, instead of allowing you to smoothly accelerate to the different velocity), you should look at the source code of the .vi and make a modified version to suit your needs. You should see if it uses a lower-level API that would be useful to you. It probably does: it would be very weird for the most primitive interface to be one such that it had to stop before accelerating to a different velocity. I would expect your vi in question to either use some kind of "set the velocity to X" interface with a timer, or some kind of "set the position to X" interface with a timer -- I don't know much about stepper motors besides what they are.

Thanks for the reply. The more I think about it, the more I think you're right. Those subVIs are some stuff I've never seen though and I'm reluctant to mess with things I don't understand but I'll look into it. I'm also interested in trying to look at the code that's on the arduino itself, but I remember the guy who was working on this program before me had some trouble dealing with that. I'm positive there has to be some reasonably simple way to do this that I haven't found yet. It seems like such a basic function.

Wicaeed
Feb 8, 2005
This is going to sound like a retarded as gently caress question, but here goes: How do you write a script to use an API?

Our company is moving over to Highwinds as our CDN provider and I want to take a crack at writing some scripts to automate clearing cache for content when we update it on our servers.

I realize the question is kind of open ended, so if details are needed please say so!@

P.S. Yes I'm a fucktard.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Wicaeed posted:

This is going to sound like a retarded as gently caress question, but here goes: How do you write a script to use an API?

Our company is moving over to Highwinds as our CDN provider and I want to take a crack at writing some scripts to automate clearing cache for content when we update it on our servers.

I realize the question is kind of open ended, so if details are needed please say so!@

P.S. Yes I'm a fucktard.

curl. Here is some random Google result that looked like it'd get you off the ground.

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

I need to store and parse some structures - pools of objects and their configurations and associations and whatnot. I'm guessing something like JSON is a good bet, but does anyone have any good introductions to the subject so I can actually get a feel for how things are done, and what the pros and cons of different options might be?

I realise this might be a bit vague but that's because I haven't had to do anything like this before :shobon:

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

baka kaba posted:

I need to store and parse some structures - pools of objects and their configurations and associations and whatnot. I'm guessing something like JSON is a good bet, but does anyone have any good introductions to the subject so I can actually get a feel for how things are done, and what the pros and cons of different options might be?

I realise this might be a bit vague but that's because I haven't had to do anything like this before :shobon:

What language? Is the data at rest (saving to a file) or in motion (sending it through a network)?

All I can suggest without knowing the above is don't use XML.

Hughmoris
Apr 21, 2007
Let's go to the abyss!

Thermopyle posted:

AutoIt solution:

code:
$aFile = FileReadToArray("C:\Path\To\File.au3")

$hOutFile = FileOpen("C:\Path\To\New\File.au3", 1)

For $i = 0 To UBound($aFile) - 1
	FileWriteLine($hOutFile, $aFile[$i])
	FileWriteLine($hOutFile, "Sleep(500)")
Next

FileClose($hOutFile)

Just to follow up, this didn't work for me. I was receiving an ErrorStdOut (I believe, not at work at the moment). I tried changing the $hOutFile to several different paths, and I included <FileConstants.au3>. I'm guessing its probably user error. I ended up going old school and just brute forced it with key presses and a For loop. :smug:

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Hughmoris posted:

Just to follow up, this didn't work for me. I was receiving an ErrorStdOut (I believe, not at work at the moment). I tried changing the $hOutFile to several different paths, and I included <FileConstants.au3>. I'm guessing its probably user error. I ended up going old school and just brute forced it with key presses and a For loop. :smug:

Dunno.

~works for me~ ~wontfix~

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

pokeyman posted:

All I can suggest without knowing the above is don't use XML.

I was like you, once. Then I learned the pain that comes with trying to parse a data structure without a fixed schema.

Until you surrender to XML you'll never know the joy of only having to write code to handle well structured data.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Blinkz0rz posted:

I was like you, once. Then I learned the pain that comes with trying to parse a data structure without a fixed schema.

Until you surrender to XML you'll never know the joy of only having to write code to handle well structured data.

That's cute, you assume that most XML sent is well formed and sensible.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Blinkz0rz posted:

I was like you, once. Then I learned the pain that comes with trying to parse a data structure without a fixed schema.

Until you surrender to XML you'll never know the joy of only having to write code to handle well structured data.

But protobufs do have a fixed schema :confused:

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

Blinkz0rz posted:

Until you surrender to XML you'll never know the joy of only having to write code to handle well structured data.

Except that JSON is about 10000x better at doing the same thing.

Not to mention readability.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

down with slavery posted:

Except that JSON is about 10000x better at doing the same thing.

I hate XML as much as the next guy but this is absurd. While they are not a complete panacea, schemas are the single redeeming feature of XML and JSON can't compete in that regard (or at least standard JSON can't).

Dren
Jan 5, 2001

Pillbug
XML schemas are great because they allow management to define all of the data interchange formats without having to consult the engineers


:suicide:

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Jabor posted:

But protobufs do have a fixed schema :confused:

We have a winner!

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

pokeyman posted:

What language? Is the data at rest (saving to a file) or in motion (sending it through a network)?

All I can suggest without knowing the above is don't use XML.

Yeah it's going to end up as a config file that describes a particular setup, and the actual objects will be generated and connected according to whatever structure's described in that file. Some of them will be shared (multiple references to the same object basically) so if there's something more suited to managing shared elements, that would be nice

This is in Java (well Android specifically) but I figured I'd ask here since it's a general question, I haven't really touched on this kind of thing before outside of HTML and a dab of XML here and there. Since I'm having to define my own structure, I figured I should probably look at some fundamentals first. And why yes, I was considering XML, funny you should mention it!

Sorry if this is painfully low on detail, I don't really even know enough to describe what I need! Any reading material on the subject would be super appreciated


e- I should say that the data will be generated and parsed in code, so while it would be nice to be able to gracefully handle hand-written config files, it's not a real priority at the moment

baka kaba fucked around with this message at 18:57 on Aug 6, 2014

Hughmoris
Apr 21, 2007
Let's go to the abyss!

Thermopyle posted:

Dunno.

~works for me~ ~wontfix~

I stepped in it.

After someone higher up discovered my hacked together script that I created using AutoIt's Record tool, I've been asked something way beyond my knowledge.

They want to create several virtual machines, and have a script execute at the same time on all VMs in order to stress test a network application. Essentially, simulating multiple users using an application. Is that something that AutoIt can handle? Can I load up a VM, start an AutoIt script that simulates mouse movements and key strokes, then start up another VM and do the same thing?

The script would essentially simulate checking boxes and typing in blank fields.

*I'm not a programmer or an IT guy. I'm a nurse who recently started a clinical informatics position. I'm thinking I flew too close to the sun. My objections about having no clue what I'm doing went unheeded.

Dren
Jan 5, 2001

Pillbug

Hughmoris posted:

I stepped in it.

After someone higher up discovered my hacked together script that I created using AutoIt's Record tool, I've been asked something way beyond my knowledge.

They want to create several virtual machines, and have a script execute at the same time on all VMs in order to stress test a network application. Essentially, simulating multiple users using an application. Is that something that AutoIt can handle? Can I load up a VM, start an AutoIt script that simulates mouse movements and key strokes, then start up another VM and do the same thing?

The script would essentially simulate checking boxes and typing in blank fields.

*I'm not a programmer or an IT guy. I'm a nurse who recently started a clinical informatics position. I'm thinking I flew too close to the sun. My objections about having no clue what I'm doing went unheeded.

you've learned lesson 1: never tell anyone you wrote a script

I can't be much help re: autoit scripting but this task sounds like a lovely thing to me. is this a web app? if so i hear jmeter is good for stress testing. if not, then the thing they are asking you to do is kind of hosed unless load testing means "like 2 or 3 users at once" because you're not gonna load up a lot more VMs than that on a regular machine.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Hughmoris posted:

I stepped in it.

After someone higher up discovered my hacked together script that I created using AutoIt's Record tool, I've been asked something way beyond my knowledge.

They want to create several virtual machines, and have a script execute at the same time on all VMs in order to stress test a network application. Essentially, simulating multiple users using an application. Is that something that AutoIt can handle? Can I load up a VM, start an AutoIt script that simulates mouse movements and key strokes, then start up another VM and do the same thing?

The script would essentially simulate checking boxes and typing in blank fields.

*I'm not a programmer or an IT guy. I'm a nurse who recently started a clinical informatics position. I'm thinking I flew too close to the sun. My objections about having no clue what I'm doing went unheeded.

I think you might be better off simulating the network requests themselves rather than running an instance of the actual application. So instead of running a bunch of VMs that run the application you are just running curl commands or something that make it seem like the application is being used, if at all possible.

At any rate, if you want to go down the VM route, Vagrant would probably be appropriate for this.

Dren
Jan 5, 2001

Pillbug

fletcher posted:

I think you might be better off simulating the network requests themselves rather than running an instance of the actual application. So instead of running a bunch of VMs that run the application you are just running curl commands or something that make it seem like the application is being used, if at all possible.

this is what jmeter does

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Hughmoris posted:

I stepped in it.

After someone higher up discovered my hacked together script that I created using AutoIt's Record tool, I've been asked something way beyond my knowledge.

They want to create several virtual machines, and have a script execute at the same time on all VMs in order to stress test a network application. Essentially, simulating multiple users using an application. Is that something that AutoIt can handle? Can I load up a VM, start an AutoIt script that simulates mouse movements and key strokes, then start up another VM and do the same thing?

The script would essentially simulate checking boxes and typing in blank fields.

*I'm not a programmer or an IT guy. I'm a nurse who recently started a clinical informatics position. I'm thinking I flew too close to the sun. My objections about having no clue what I'm doing went unheeded.

If you really had to, you could make a VM where autoit would run when you booted the VM (just put it in the startup items folder), and you could use powershell or puppet or whatever to spin up the VMs.


However, step back from the technical. You're focused on one of the questions. There are three:

a) What are you measuring, and why?
b) How are you going to collect it?
c) Who wants the data, and why?

You're focused on b). I'd worry more about a) and c).

EAT THE EGGS RICOLA
May 29, 2008

Bruegels Fuckbooks posted:

If you really had to, you could make a VM where autoit would run when you booted the VM (just put it in the startup items folder), and you could use powershell or puppet or whatever to spin up the VMs.


However, step back from the technical. You're focused on one of the questions. There are three:

a) What are you measuring, and why?
b) How are you going to collect it?
c) Who wants the data, and why?

You're focused on b). I'd worry more about a) and c).

I agree with this post.

If you have to do this ridiculous thing, Docker might be the way to do it.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
Thanks for the input, everyone. Now that I'm off work, I can explain a little more about what's going on.

Bruegels Fuckbooks posted:

If you really had to, you could make a VM where autoit would run when you booted the VM (just put it in the startup items folder), and you could use powershell or puppet or whatever to spin up the VMs.


However, step back from the technical. You're focused on one of the questions. There are three:

a) What are you measuring, and why?
b) How are you going to collect it?
c) Who wants the data, and why?

You're focused on b). I'd worry more about a) and c).

The scenario is this. I work for a hospital that uses electronic charting and medical records. We have a Live environment, and we have a Test environment which are almost identical. Our medication-entry module was temporary taken offline due to bugs and complaints of slowness. We are bringing it back online in the Test environment. We want to simulate multiple doctors and nurses being in the module, ordering medications. We will time how long it takes to enter a list of medications for multiple patients. The list of medications being used is the same throughout the scenario.

The hospital would like 50 people using the medication module at the same time but we don't have 50 people available for testing. The current idea is now to use a number of VMs to log into the module and act as "doctors/nurses", and the VM will run through a AutoIt script in the module using keystrokes and mouseclicks. We aren't worried about the amount of time the VM takes to complete the process, we just want them to act as a load on the network/system.

At the same time the, there will be live people running the medication script through the module. We will be timing those people.

To answer your question:
A) What are you measuring, and why? We are testing the application responsiveness and network latency for this medication module when multiple users are on at the same time.
B) How are you going to collect it? We will use a stop watch to measure the amount of time it takes the live testers to run through a script, while the VMs "users" act as additional loads on the module.
C) Who wants the data, and why? The higher ups want the data, to show the physicians that the fixes to the medication module have improved the latency and response time.

Now, I know jack squat about VMs other than the basic idea of them. I will have nothing to do with setting them up. From what I was told by some random IT guy in a conference call, they will image everything I need. I will then essentially remote in to the VM, start the script, then move on to the next VM. I realize its probably much more complicated than that but that's what I got from them today.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
Your IT people should be working with your emr vendor on this. It's in no way your problem and the fact that they're asking you makes your IT department sound like a clown show.

Dren
Jan 5, 2001

Pillbug

LeftistMuslimObama posted:

Your IT people should be working with your emr vendor on this. It's in no way your problem and the fact that they're asking you makes your IT department sound like a clown show.

Yeah this whole thing is garbage town.

Here is one reason. You remoting into VMs and starting your script is not consistent and repeatable. That is, if you do it again the timing will be totally different. That will make the results from test to test not comparable. That's not even mentioning the stop watch bit for showing timing the latency. jfc this whole thing is amateur hour.

The worst part is that this should not even remotely be your problem. IT should be working with the software vendor to develop a benchmark process. Either IT, the vendor, or both are incompetent.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Hughmoris posted:

To answer your question:
A) What are you measuring, and why? We are testing the application responsiveness and network latency for this medication module when multiple users are on at the same time.
B) How are you going to collect it? We will use a stop watch to measure the amount of time it takes the live testers to run through a script, while the VMs "users" act as additional loads on the module.
C) Who wants the data, and why? The higher ups want the data, to show the physicians that the fixes to the medication module have improved the latency and response time.

There are multiple problems:
a) You can't rely on stopwatch measurements. Taking a bunch of numbers with a stop watch is really boring, and you won't get consistent results even with same person, different day, exact same scenario. If you get a bunch of different people, half won't understand the direction.
b) It's going to be very difficult to repeat the results with some autoit script that bangs on the keyboard anyway, to say nothing about using VMs and lack of controlled environments. You'll get different numbers every day of the week.
c) There is no scenario where the physicians are going to give a gently caress about your numbers. You probably don't have enough information to know if you're even reproducing the problem or not, so it's unlikely that your script is going to reproduce the problem in the old version, and demonstrate that the problem goes away in the new version.

What you need to do is get the impact analysis of the fix - e.g. what did the vendor say was the problem? What was the fix? How did they test it?

I work for a pretty major medical software company, I used to do this kind of testing for them for a living - if you don't have a dedicated group doing software testing in your hospital, your IT department is going to end up with serious problems when they install all this bullshit medical software that doesn't work.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
Edit: On second thought, I realize me complaining won't do any good. I guess I need to spend some time on the AutoIt forums and see what I can figure out.

Hughmoris fucked around with this message at 17:49 on Aug 7, 2014

JawnV6
Jul 4, 2004

So hot ...
The person/team that should be doing this work for the software vendor is almost certainly compensated better than your role. This sounds increasingly ridiculous that you're on the hook for this effort.

baquerd
Jul 2, 2007

by FactsAreUseless

Hughmoris posted:

Edit: On second thought, I realize me complaining won't do any good. I guess I need to spend some time on the AutoIt forums and see what I can figure out.

Just send CYA emails stating that you have no idea whether your code is HIPAA compliant and suggest an external audit of anything you produce.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
They created the VM this evening and I had a few minutes to play with it before I went home for the day. I'm 99% sure I can't do what they want by Monday but I can say I've learned a lot about using AutoIt to manipulate GUIs, so I guess this isn't a total loss.

Hughmoris fucked around with this message at 02:30 on Aug 8, 2014

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies
Thanks thread for the help with installers. Turns out Innosetup was remarkably simple to set-up and use for my particular usecase!

New question though. For a test framework, we want to automate resetting the databases (drop the tables, recreate the tables, reupload csv files into the tables) that would support most big DBs and would be reasonably easy to add a new DB into the framework unless it requires some special bit (like how Oracle doesn't have a time column type). I got recommended Hibernate and Liquibase. Hibernate seems like massive overkill for what we want, while Liquibase isn't necessarily used for what we want, but it could be wrangled to do it. What else is there beyond Liquibase as this isn't really the proper usage it seems for Liquibase (as I'd most likely use rollback to rest things, before re-adding the tables). Most threads I've found seem to compare it to Flyway but I'm not doing a "migration" really.

The build system utilizes gradle and the project is in Java.

Master_Odin fucked around with this message at 20:42 on Aug 11, 2014

nielsm
Jun 1, 2009



Master_Odin posted:

New question though. For a test framework, we want to automate resetting the databases (drop the tables, recreate the tables, reupload csv files into the tables) that would support most big DBs and would be reasonably easy to add a new DB into the framework unless it requires some special bit (like how Oracle doesn't have a time column type). I got recommended Hibernate and Liquibase. Hibernate seems like massive overkill for what we want, while Liquibase isn't necessarily used for what we want, but it could be wrangled to do it. What else is there beyond Liquibase as this isn't really the proper usage it seems for Liquibase (as I'd most likely use rollback to rest things, before re-adding the tables). Most threads I've found seem to compare it to Flyway but I'm not doing a "migration" really.

The build system utilizes gradle and the project is in Java.

Do you mean set up databases on a central server? Or on each student's own machine? Is it really a good idea to want to support multiple different database systems?

For the central server case, I'd write some DBMS-specific scripts to do it. I think most serious databases support some kind of template database system, meaning you can set up a pre-filled template database and then basically issue a command to clone it.
For those that don't, there's a good chance you might just be able to set up a template database anyway, copy its files on the filesystem, then run some GRANT/REVOKE commands on it to get permissions set up.

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

nielsm posted:

Do you mean set up databases on a central server? Or on each student's own machine? Is it really a good idea to want to support multiple different database systems?

For the central server case, I'd write some DBMS-specific scripts to do it. I think most serious databases support some kind of template database system, meaning you can set up a pre-filled template database and then basically issue a command to clone it.
For those that don't, there's a good chance you might just be able to set up a template database anyway, copy its files on the filesystem, then run some GRANT/REVOKE commands on it to get permissions set up.
This isn't related to students or a class. This is for a product where it currently tests features against several different DBMSs (Oracle, Postgres, SQL Server, Hana). We want it such that if someone goes in, accidently removes a row or something, we can just type in something like "gradle reset" and it would launch the tasks necessary to reset the databases back to how they are. This would be done by using one CSV file for all databases. Ideally, everything would be as identical as possible for each DBMS upload with only slight modifications depending on available types and things.

It was suggested to me that Liquibase would be the easiest thing to setup for it, and it would be doable with their changelog (with one change being adding the tables, then another inserting the data) which would support rollbacks for resetting.

I do see the appeal of doing something like this instead, but mainly, I'm just looking for various options at this point before committing to anything.

Master_Odin fucked around with this message at 22:45 on Aug 11, 2014

Colonel Taint
Mar 14, 2004


What might be a good way to document a somewhat complex asychronous system at a high level? I have a system with a number of distinct threads which need to interact with each other in different ways (not just a bunch of worker threads running a similar loop). Even as I code this up, I'm getting a bit lost in the complexities of some of the synchronization that has to happen and what each thread relies on. I don't think it's really that bad, but it's definitely going to be difficult code to come back to, and difficult to read without some sort of plain english or visual documentation.

nielsm
Jun 1, 2009



Can you describe the system in terms of message passing and responses?
If you can describe each "message" (even if it technically isn't done by message passing) in short, and what purpose it serves, then describe high-level tasks by what messages they involve, that might lets others get an understanding. Obviously this needs to be a hypertext document.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

SintaxError posted:

What might be a good way to document a somewhat complex asychronous system at a high level?
visual documentation

I guess this isn't standard nomenclature, but we used to draw "Feynman Diagrams" that described interactions between various parts of a system. Add more lines for more agents, show expected flow of complex or representative transactions.


Is there a better name for this type of diagram I'm unaware of?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply